There's an irony in President Donald Trump's attacks on the media, and The New York Times (NYSE:NYT) in particular. He refers to it as the "failing New York Times," yet his presidency could actually be the paper's saving grace.

The week before the presidential election, the Times reported an 8% decline in advertising revenue for the third quarter of 2016. In the paper's own words, it was an "anxious and challenging time for the newspaper industry."

But fast-forward to today, and the Times' fortunes have improved dramatically. Digital news subscriptions grew 67% in the second quarter compared to the year-ago period.

Graph showing growth of digital-only subscriptions at NYTimes

Data source: The New York Times. Chart by author.

And profits followed. Excluding one-time charges, the company earned $67.1 million in operating profit in the quarter versus $54.5 million in the same quarter last year, "principally driven by very strong digital revenues," according to the Q2 press release.

"We saw a significant increase in the number of paid digital-only subscriptions to our news products following the 2016 presidential election," noted the Times in a regulatory filing earlier this year. "Given that this increase occurred late in 2016, the revenue generated from these subscriptions is expected to be reflected more fully in 2017."

Another quarter like this, and Trump might have to come up with a new nickname for the nation's paper of record.

10 stocks we like better than The New York Times
When investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.*

David and Tom just revealed what they believe are the 10 best stocks for investors to buy right now... and The New York Times wasn't one of them! That's right -- they think these 10 stocks are even better buys.

Click here to learn about these picks!

*Stock Advisor returns as of July 6, 2017

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.