Depends on a country. And in practice on how much money the people behind the website can throw at the lawyers when annoyed.
For the US you may want to read about https://en.wikipedia.org/wiki/Aaron_Swartz
For the US you may want to read about https://en.wikipedia.org/wiki/Aaron_Swartz