Some Democrats have taken a page right out of President Donald Trump's playbook and attacked the media for reports they don't like.

The tactic, popularized by the president to challenge stories critical of him or his administration, seems to have crossed party lines as Democrats such as New York City Mayor Bill de Blasio and House Minority Leader Nancy Pelosi make use of the maneuver.

Pelosi has accused the media of bias, telling MSNBC's Jonathan Capehart that NBC News had repeatedly tried to "undermine" her chances of becoming speaker if Democrats recapture the House of Representatives in November.

"NBC has been on a jag of this, this is one of their priorities, to undermine my prospects as speaker," Pelosi told Capehart during their interview on August 12. Her comments came after the news network ran a story called "Democrats Opposing Nancy," which included a list of 51 Democratic candidates and incumbents who have said they won't support Pelosi for speaker should the party win back the House.

Nancy Pelosi presser
House Minority Leader Nancy Pelosi, a Democrat from California, holds her weekly press conference in the Capitol on July 12. Pelosi, taking a page from President Donald Trump, accused the media bias and undermining her efforts to become speaker if Democrats take back the House in the upcoming midterms.Bill Clark/CQ Roll Call/Getty Images

De Blasio slammed right-wing news organizations run by News Corp's Rupert Murdoch, such as the New York Post and Fox News, for allowing Donald Trump to rise to the presidency in the first place.

"There is no comparison between a progressive critique of the media–and overwhelmingly corporate media, by the way–and a president who does not believe in free speech and is trying to undermine the norms of democracy," de Blasio toldThe Guardian. "If you see a steady decline in democracy, we're going to have to vividly defend a lot of media we don't agree with. But I don't want to give them a free pass on what they have done to all of us."

The mayor also stood by as his security detail hauled away a Post reporter who attempted to ask him a question at the start of New York's annual Dominican Day Parade. The altercation called to mind Trump's refusal to answer questions from reporters and even barring CNN journalists from a presidential event in the White House Rose Garden.

All of this comes amid an editorial-writing initiative spearheaded by The Boston Globe, the American Society of News Editors, the New England Newspaper and Press Association and others to enlist newspapers across the country to publish editorials on the dangers of the president's escalating rhetoric against the press and reporters. CNN's Brian Stelter reported that more than 100 publications would participate, publishing their pieces in a coordinated effort on August 16.

In the meantime, Trump has continued his usual line of attack, calling the media the "enemy of the people," claiming that the media "can also cause war" and that journalists are "very sick and dangerous."