In 2020 state,
Open data (everyone can read without login) scraping is basically legal. But there are the following notes: 1. use(over copyright(like re-publish) is illegal) 2. access volume(site attack is illegal) 3. robots.txt(site denied contents scraping might be illegal)
Closed data(need login) scraping is follow the site's terms. Consider many service bans scrape it terms, there are the high legal risk. If it don't grow legal trouble, site close the scraping account easily.
So scraping open data and store your side is thought legal(like google or many other bots do), other scraping situation include illegal case.