There are organizations who record essentially all the news, and have people catalog it and tag it etc., and have been doing this for a very long time. So if for example The Daily Show wants to do a bit where they show 50 different local news reporters reading the same phrase from some AP story they all ran, they just go to the news catalog people and say "give me all the clips from the last 2 days containing [whatever phrase]."
There was a news story about the whole process a few days ago, but ironically I can't remember where I saw it and I don't have it recorded.