I would like to build a web scraper for a list of scientific papers libraries, what are the legal limits?
I am not a lawyer. This is a legal question. Get proper legal advice.
The legal framework is contract law, and intellectual property law. There may also be implications for other parts of the legal code if your scraping behaves like, or could be interpreted as, a denial-of-service attack or hacking.
Read each site's terms and conditions. Understand the contract of use for each site. Interpret each contract within the legal context of the contract's jurisdiction.
Take into account intellectual property law within your own country, and the publisher's country. You might also need to consider intellectual property law within the country where the web-server is located, too.
Do bear in mind that there have been recent attempts across several jurisdictions  to bring intellectual property within criminal, rather than civil law / contracts.
I am not a lawyer. This is a legal question. Get proper legal advice.