House Minority Leader Nancy Pelosi (D-Calif.) seems to have been a bit irritated in speaking with The Post’s Dave Weigel this week.

Discussion of impeaching President Trump, she said, was a distraction — however popular it might be as a topic of conversation on cable news. She complained about “all these shows that only talk about the president and the court and the this and the that.” What she’d rather be talking about, she said, was “better jobs and better wages.”

We decided to put that assertion to the test. Using the Internet Archive’s TV Archive, a database of closed-captioning on news programs, and an index of tweets by members of Congress created by developer Alex Litel, we compared mentions of certain words in those tweets to mentions on cable news over the last week. The tweets were broken out both by party and by type of account. Members of Congress have both campaign accounts and official accounts that can’t be used for electoral politics.

The short version of what we found: Pelosi has a point.

Let’s compare mentions of health (as in health care) with mentions of Cohen (as in Trump’s personal attorney Michael Cohen). Congress — particularly congressional Democrats — are a lot more likely to mention health in tweets. Cable news is much more likely to talk about Cohen (though much less so Fox News).

Nearly everyone in Congress talks about Trump in their tweets (with the exception of the official accounts for Republican lawmakers). But only cable news spends much time talking about special counsel Robert S. Mueller III.

That disparity between what members of Congress want to talk about and what’s on TV isn’t unique to Democrats. Republicans are more likely to talk about tax issues and jobs than Democrats are, but neither get much mention on cable news.

The same pattern holds with business and cuts (as in tax cuts).

Members of Congress were more likely to talk about Iran from their official accounts than their campaign accounts. Elected officials were more prone to talking about working (as in working class) than cable news networks.

Other favorite groups of political candidates were also much more commonly mentioned in congressional tweets than on TV, like women and families. Cable news hardly ever mentioned family or families.

The comparison that makes Pelosi’s point most directly is this one. Members of Congress talk about the economy. Cable news talks about Stormy Daniels, the woman who alleges a sexual encounter with Trump that she was paid not to talk about.

That comparison is also a good reminder of why the discrepancy exists. Which would you rather watch on television, a debate about the economy or a conversation about an alleged affair between the president and a porn star?

Cable news often aims to inform viewers, but it also needs to get people to watch. Pelosi’s complaint isn’t wrong, but asking CNN and MSNBC to air more policy discussions than fights about adult film stars is like asking Marvel Studios to make the next “Avengers” movie about the threat of rising sea levels from climate change.

More people would be informed, sure. But ticket sales might drop a bit.