English · 简体中文 · 日本語 · Español · Русский
This repository contains educational example scrapers for popular web scraping targets using the ScrapFly web scraping API and Python.
Most scrapers use a simple web scraping stack:
- Python version 3.10+
- Scrapfly's Python SDK for sending HTTP requests, getting past blocking and parsing the HTML with the built-in parsel selector.
- asyncio for writing concurrent code using the async/await syntax.
- JMESPath and nested-lookup for JSON parsing when needed.
- loguru for logging.
To learn more about web scraping, see our full tutorials on how to scrape these targets (and many others) in the scrapeguide directory.
For AI agents and LLM tools, llms.txt lists every scraper with its functions and sample output, and explains how to run a scraper and how to write a new one.
Every scraper lives in its own folder and runs on its own (Python 3.10+ and Poetry):
git clone https://github.com/scrapfly/scrapfly-scrapers.git
cd scrapfly-scrapers/airbnb-scraper # any scraper folder from the list below
export SCRAPFLY_KEY="YOUR SCRAPFLY KEY" # from https://scrapfly.io/dashboard
poetry install --no-root
poetry run python run.py # example scrape, saves its output in ./results
poetry run pytest test.py # the scraper's testsEach scraper folder's README lists what it scrapes.
Below is the list of available web scrapers for the supported domains along with their scrape guide, sample datasets, and status. 👇
The status comes from the nightly test run, which also orders the table: scrapers whose tests pass come first, failing and untested ones last.
A badge reads passing (every test passed), N/M passing (some tests passed), failing (none passed) or not run; click it to see that scraper's last results, with a link to each test's log.
This repository contains educational reference material to illustrate how accessible web scraping can be and the provided programs are not intended to be used in web scraping production. That being said, Scrapfly team is constantly updating and improving all of this code for optimal experience.
Scrapfly does not offer legal advice and as always, consult a lawyer when creating programs that interact with other people's websites though here's a good general intro of what NOT to do:
- Do not store PII (personally identifiable information) of EU citizens who are protected by GDPR.
- Do not scrape and repurpose entire public datasets which can be protected by database protection laws in some countries.
- Do not scrape at rates that could damage the website and scrape only publicly available data.
This repository is licensed under the Non-Profit Open Software License 3.0.