Shares of CBS Corp. (CBS - Get Report)  ended Friday higher as the New York-based entertainment company reported earnings that were short of analysts' forecasts but said revenue rose.

CBS stock rose 3% to end Friday at $50.64.

CBS reported that it earned $561 million, or $1.49 a share, in the fourth quarter, compared with a loss of $41 million, or 10 cents a share, in the comparable year-earlier period. Revenue rose 3% to $4.02 billion from $3.92 billion.

Analysts had been expecting per-share earnings of $1.54 and revenue of $4.19 billion.

For the full 2018 year, CBS said revenue increased 6% to $14.51 billion from $13.69 billion, driven in large part by an 8% gain in political advertising sales from the 2018 midterm elections, which came despite the absence of "Thursday Night Football," which went to Fox Sports last year.

Adjusted net earnings from continuing operations increased 16% to $1.98 billion for 2018 from $1.71 billion. Adjusted earnings came in at $5.19 a share for 2018 vs. $4.40 in 2017.

Separately, CBS said it had reached its goal of 8 million subscribers for its CBS All Access and Showtime streaming services nearly two years ahead of schedule, boosting affiliate and subscription fee revenue up 11% to $1.03 billion.

The company is now looking to sign on 25 million subscribers for both direct-to-consumer services by 2022.