The New York Times Co, assailed by a U.S. president who brands it as ¡°failing,¡± signed up more than 200,000 paying online subscribers in the third quarter, helping it top Wall Street estimates for both profit and revenue.

Shares in the publisher rose 8 percent after quarterly results on Thursday showed digital-only subscribers rose to 3.1 million at the end of September, the result of a combination of aggressive discounting and heavy spending on marketing.

The company¡¯s stock has now risen 54 percent in value this year.

¡°NYT is successfully making the transition to a digital platform from a print-based model and continues to be one of our best long-term investment ideas in the internet/media sector,¡± said Douglas Arthur, an analyst at Huber Research Partners.

Online subscriptions have become central to the Times¡¯ future as revenue from print advertisements dry up and the increase was the highest since a bump at the start of last year driven by President Trump¡¯s repeated mentions of the paper.

In early September, Trump railed against an anonymous op-ed in the Times that said senior officials in his administration were working from within to frustrate parts of his agenda.

The paper has continued to discount heavily while marketing itself as a source of unbiased reporting in a deeply divided America. Some digital subscriptions begin at just $1 a week.

¡°The first, and probably most significant driver, was the $1 a week introductory offer domestically, which ran I think the last 6 weeks to the quarters,¡± Chief Operating Officer Meredith Kopit Levien said on a conference call with analysts.

The company¡¯s digital advertising revenue, now responsible for over 70 percent of overall advertising revenue, jumped about 17 percent to $57.8 million in the third quarter, while print advertising revenue continued to decline.

The newspaper¡¯s net income, however, fell 22.7 percent to $25 million, as total expenses climbed 8.4 percent, led by higher marketing costs.

Excluding one-time items, the Times earned 15 cents per share from continuing operations, while total revenue rose 8.2 percent to $417.3 million.

Analysts on average had expected earnings of 11 cents per share and $408.5 million in revenue, according to IBES data from Refinitiv.