Former President Barack Obama is right when he says his administration’s attacks on the press can't be compared to President Trump's current crusade against the news media.

The Obama White House was far worse for press freedoms.

The former president spoke Friday afternoon at the University of Illinois at Urbana-Champaign, urging students to get involved in the November midterm elections. He dedicated a good deal of his address to drawing contrasts between his administration and the administration of President Trump. It was the regular sort of material from Obama. There was a lot about optimism, hope, change, etc.

The real whopper of a lie didn’t come until later in his address when he criticized Trump for routinely attacking the press.

“It shouldn’t be Democratic or Republican to say that we don’t threaten the freedom of the press because they say things or publish stories we don’t like,” the former president said. “I complained plenty about Fox News, but you never heard me threaten to shut them down or call them enemies of the people.”

This is some grade-A, primo historical revisionism.

When it comes to being anti-media, Trump only talks a big game. And, boy, does he talk. Obama, on the other hand, is a man of action. As president, he did much more than complain about Fox News. His administration spent eight long years curbing the press freedoms of journalists of every stripe. Obama was a pro at this.

Trump’s war against the press is indeed ugly and often over-the-top. But let that criticism come from someone who’s not guilty of far worse.

In 2009, for example, the Obama White House intentionally excluded Fox News’ Chris Wallace from participating in a round of interviews pertaining to the president’s push for healthcare reform. Later that same year, the administration officials tried to block Fox reporters from interviewing “pay czar” Kenneth Feinberg. The White House initially lied about this, and many in the press went along with it. It wasn’t until 2011 that the public learned the truth of the Feinberg episode. An internal email dated Oct. 22, 2009, showed the White House director of broadcast media told Treasury officials specifically, “We’d prefer if you skip Fox please.”

The bigger point is that Feinberg was not the only administration official to have his network appearances limited by the White House.

The Obama White House communications director, Anita Dunn, said at the time, “We’re going to treat them the way we would treat an opponent. As they are undertaking a war against Barack Obama and the White House, we don’t need to pretend that this is the way that legitimate news organizations behave.”

That language about "legitimate news organizations" and "opponents" is only different from the things Trump says by degree, not by kind.

In 2010, the Obama administration renewed the bogus Bush-era subpoena against the New York Times' James Risen in a prolonged attempt to determine whether the reporter was the recipient of leaked CIA information. In February 2011, federal investigators were revealed to have spied on Risen. Federal investigators pored over Risen's credit reports and his personal bank records. The feds even tracked his phone logs and movements.

Later, in 2012, Fox was mysteriously excluded from a White House conference call pertaining to the terrorist attacks on the U.S. consulate in Benghazi, Libya. Fox was also excluded from an all-network CIA briefing regarding the attacks.

In 2013, the Obama Justice Department labeled then-Fox News reporter James Rosen a “criminal co-conspirator” under the Espionage Act of 1917. And all because the reporter used a State Department contractor as a source for a story. Rosen was also labeled a "flight risk."

The Justice Department seized the records of at least five phone lines connected to Fox News. The federal law enforcement agency even seized the phone records of Rosen’s parents. The FBI also got a warrant to search Rosen's emails from 2010.

In May 2013, the Associated Press revealed that the Justice Department had secretly collected two months' worth of personal and work-related phone calls made by AP reporters and editors.

Federal officials secretly obtained records on incoming and outgoing calls made by specific AP journalists, as well as general news staff, the news group reported, potentially compromising many sources totally unrelated to the investigation. Federal investigators even collected data on calls made by AP reporters in the House of Representatives press gallery.

In 2014, the Obama administration set the record for denying the most Freedom of Information Act requests of any administration. It topped this feat in 2015.

There are only two actions that the Trump administration has taken that can be compared to the Obama-era war on the press. First, the Trump White House barred a CNN reporter in July from a Rose Garden event. Second, the Trump Justice Department seized electronic correspondences between New York Times reporter Ali Watkins and her ex-lover, former Senate Intelligence Committee aide James Wolfe.

Other than the fact that Obama has an extraordinarily ugly legacy of anti-press behavior, he made some great points Friday. He never actually called the news media the “enemy of the people.” He and his lieutenants simply prosecuted and spied on reporters, all while claiming Fox is "an opponent" and not “ really a news station.”

Obama is right to draw a contrast between himself and Trump. One of them has been an actual clear and grave threat to the press, and the other one has an orange tan.