President Donald Trump has a long history of attacking and discrediting journalists whose coverage he disagrees with.