Does Google take action on automatically generated pages that provide no added value?

What does Google do against sites that have a script that automatically picks up the search query and makes a page about it? Ex: you Google [risks of drinkin…