Thanks to the 2016 race, ratings are up for cable news and readership is up for online news. (Justin Sullivan/Getty Images)

Thanks to Donald Trump, the news media has enjoyed a feast of public attention for the past year or more. But a crash diet could be just around the corner.

News about Trump and opponent Hillary Clinton has helped fatten cable-news ratings and profits to their highest level in history. It has also helped generate new traffic records virtually every month at sites such as, Yahoo News and ­ The Washington Post’s online traffic has reached a peak almost every month this year, topped by September’s figure: 83.1 million unique visitors, according to ComScore.

The good times, however, are unlikely to last as the election’s ups and downs are replaced by more routine news cycles. If recent history is any guide, the months leading up to an election stoke far more public interest than the cooling that occurs in the months after one.

Worse, there are already signs that even a campaign boost hasn’t been enough to avert further financial deterioration in some parts of the news business.

CNN Worldwide President Jeff Zucker recently told colleagues that he expects the domestic network’s ratings to fall as much as 25 percent next year from the election-inflated gains of 2016. Zucker, whose division’s profits will approach $1 billion this year for the first time, has said he’s not alarmed by such a prospect; CNN’s average rating this year has been so strong that the loss of 1 in 4 viewers would still make 2017 its second-highest-rated year since 2009.

But Zucker may be understating the likely drop-off. According to Nielsen, 49 percent of CNN’s audience had drifted away in the last three months of 2009, compared with the same period in 2008, when the last non­incumbent election was at its climax. MSNBC was down 47 percent. Fox News, though, with its heavy dose of criticism of the then-new Obama administration, lost just 7 percent of its viewers in the same comparison.

CNN is counting on mitigating its post-election losses through some new tactics developed by Zucker. The network has found that it can attract a relatively steady audience by covering a single story endlessly, such as the missing Malaysian Air jetliner, and scheduling “appointment” programs like Anthony Bourdain’s travel-and-food series “Parts Unknown.”

MSNBC, too, has altered its strategy, dropping liberal talk shows during daytime hours in favor of more news.

Others hope the exposure from election coverage will translate into interest in other news they produce. Martin Baron, The Post’s executive editor, said the paper’s online audience grew across several subjects, not just politics, over the past year. “It’s only natural that we’ll see a more normal pattern of traffic in a post-election period,” he said. But “a new administration will give us a lot to work on,” too, regardless of who wins on Tuesday.

The New York Times, meanwhile, said Wednesday that it added 116,000 new digital subscribers over the past three months, a gain of almost 10 percent — apparent evidence that it’s building “a larger and more engaged audience [that] will stay with us after the election,” said Kinsey Wilson, the Times’ editor for innovation and strategy.

Even so, the Times is expected to announce layoffs early next year, continuing a long trend of shrinking “legacy” newsrooms. In recent weeks, the Wall Street Journal, the Guardian and Gannett newspapers have also disclosed plans for further cuts in their news staffs.

The reason: The continued shriveling of print advertising, which has offset much of the good news online this year. Print ads still make up the vast majority of newspaper revenue, and they appear to be evaporating at an accelerating pace. The New York Times Co., for one, lost 19 percent of its print-ad revenue over the past three months.

Without the digital dollars to make up for the disappearing print ones, news organizations face a “vicious cycle” of staff cutbacks that leads to less news coverage, which leads to fewer readers and advertisers, said Rick Edmonds, the media-business analyst at the Poynter Institute, a journalism think tank.

He predicted that more newspapers will stop printing papers on typically money-losing days of the week, such as Tuesdays. The Advance Newspaper chain, owner of the leading papers in New Orleans and Portland, Ore., among other cities, has already done so.

The most financially secure part of the media industry may be local broadcast TV stations, Edmonds said, because they face neither cable’s “cord cutting” issues nor newspaper’s print problems. The election “has become part of [TV stations’] cycle. They can sit around and count their money,” he said. When the campaign commercials dry up next week, “they can put their local car dealers back on the air and they should be fine.”

It might have been wiser not to have grown too dependent on campaign news.

BuzzFeed, the website that has soared in popularity by combining viral GIFs and frivolous listicles with solid news reporting, expects to lose some of its readership next year when the political horse race is over, said Kate Nocera, managing editor of its Washington bureau.

But the losses should be minimal, as politics aren’t “a hugely relevant part of our traffic,” she said. “It’s not the thing that drives people to BuzzFeed.”

Still, BuzzFeed is expanding its Washington staff, adding two new reporters to its 18-member newsroom in the capital in recent weeks. “We’ve found that our readers are interested in what’s happening with the election,” Nocera said. “We’re betting that people will still be interested after it, no matter who’s president.”