A jump in political advertising before the 2018 midterm elections buoyed third-quarter sales at Comcast despite a decline in cable-television subscribers.

Revenue at the cable communications division that includes video, voice, Internet, and advertising, rose 3.4 percent to $13.8 billion, even with the loss of 106,000 cable subscribers in the quarter, Comcast said in a statement. It was the sixth straight quarter that the video unit lost customers.

The drop was mitigated by a 15 percent increase in advertising revenue, largely driven by campaign ads in the months before the November vote. Excluding political advertising, revenue increased only 0.6 percent.

Another source of gains was high-speed Internet service, where Comcast added 363,000 customers in the three months through September, a sign of the growing demand for online video platforms like Netflix, Hulu, and others.

Chief Executive Officer Brian Roberts, in a statement, highlighted the "best broadband net additions for a third quarter in 10 years."

Companywide, revenue at Philadelphia-based Comcast grew 5 percent to $22.1 billion. Profit rose 9 percent to $2.9 billion, or 62 cents a share. Both were higher than analysts expected.

Comcast climbed 1.7 percent to $34.70 in pre-market trading in New York.