How to scrape a website
Tested · How we test
Based on our test of 12 open source tools on 26 public sites, from one machine with no proxy.
The four steps we follow
- Fetch the page with an HTTP client. Scrapling sends one request that looks like it came from Chrome. In our test it got 12 of 26 sites, with a median of 0.6 s and 39 MB per page.
- Check for the content, not the status code. Of the 230 pages that answered HTTP 200, 50 did not hold the content we asked for. They were empty shells, bot checks or the wrong country's page. Search the HTML for a word you expect, such as a product name or a price.
- Switch to a browser when the content is missing. A browser runs the site's JavaScript and sees what a person sees. Lightpanda was the lightest at about 196 MB per page and got 15 sites. Botasaurus got the most sites, 18 of 26.
- Try a proxy or a paid scraping API when every tool fails. On 5 sites, all 12 tools were refused or got a page without the content from our single machine. We have not tested proxies or paid APIs yet, so we cannot say which ones work there.
The 12 tools, ranked by sites they got
Each tool fetched the same page on each site once, from one machine with no proxy. Click a column to sort.
Look up your site first
If your site is one of the 26 we tested, its page tells you which tool got it and gives you the code. See every site we tested.