McCain was well-liked by the press during his Presidential campaign, and enjoyed friendly relations that extended to The Daily Show and Saturday Night Live. Mike Huckabee, too The media had pretty good relations with Rudy Guliani back then. I don't think they ever warmed up to Mitt Romney,
The same press gently elevated Barack Obama at the expense of Hillary Clinton. They really didn't care for the Clinton circus. If you'll recall, the rightwing media never liked John McCain and was agitating for anyone else. McCain lost a lot of respect from most intelligent people when he chose Sarah Palin.
By and large, did the national media prefer Barack Obama over McCain/Palin, swayed by the historical importance of the U.S. electing its first Black president?
Sure. Why not?