
On a Monday morning, a crawl job reported success, but the data table was half empty. The target site had moved to JavaScript rendering: in a browser the content was all there, while the HTML the script fetched was just an empty frame. Scrapling bets on exactly this gap: a Python library covering fetch, parsing, crawling, and export in one place.
Why Python website crawling keeps breaking, stage by stage
Stage 1: static pages work, JS pages lose content. The initial HTML is only a frame; the real data sits behind background API requests or waiting for an element to appear.
Stage 2: requests get blocked, sessions drop, IPs get banned on a schedule. A job run once by hand usually passes; a job run every hour does not, because the site recognises the repeated pattern.
Stage 3: data exists, but parser, crawler, export, and a stable schedule are missing. Work remains: extracting the right fields when the site changes an HTML class, following subpages without looping forever, pausing and resuming after interruption, and exporting CSV, JSON, or Markdown that downstream systems can read.
What is Scrapling, and which problem does it solve?
Scrapling is a Python web scraping framework, licensed under BSD-3-Clause, released on 2024-10-13. At check time on 2026-11-03, the project had 93,510 stars and 9,829 forks on GitHub, its latest update was 2026-11-02, and its newest release at that time was v0.5 on 17/10/2026.
Scrapling has four layers: fetch to get pages, parser to extract data, spider for concurrent crawling, and outputs such as a CLI or an MCP server for AI agents. The parser is separate from the fetcher, so the same element-selection approach works for pages fetched over plain HTTP and with a real browser.
It fits developers and data engineers collecting structured web data on a schedule; sysadmins and DevOps engineers running scheduled jobs needing sessions, retries, and proxy rotation; homelab users wanting a small Markdown-export job; and AI-agent users needing clean data for RAG. In my view, you do not need it for one simple static page, for distributed large-scale crawling, or to bypass a site’s access controls.
Scrapling architecture: how Fetcher, StealthyFetcher, Parser, and Spider work
flowchart LR
Site[Target website] --> Choice{Page needs JS?}
Choice -- No --> Fetcher[Fetcher: HTTP + TLS fingerprint impersonation + HTTP/3]
Choice -- Yes --> Stealth[StealthyFetcher: Playwright Chromium/Chrome]
Fetcher --> Session[FetcherSession / StealthySession: session, cookies, retry]
Stealth --> Session
Proxy[ProxyRotator: rotate proxies, per-request override] -.-> Session
Session --> Parser[Parser: CSS / XPath / text / regex + adaptive element tracking]
Parser --> Spider[Spider: concurrent crawling, pause/resume]
Spider --> Export[Export Markdown / CSV / JSON]
Export --> Consumer[Script, scheduled job, or AI agent via MCP]
Session -. Domain/ad blocking, background API capture .-> Parser
The fork sits on JavaScript need; session, proxy, and retry surround both fetch branches; the parser sits in the middle, separate from how the page was fetched.
Fetcher and StealthyFetcher differ in nature. Fetcher is the HTTP branch, suited to static pages and background APIs. StealthyFetcher is the real-browser branch via Playwright, using Chromium or Chrome, suited to JS-rendered pages.
FetcherSession and StealthySession keep sessions and cookies across requests. ProxyRotator rotates proxies or uses a custom list. In my view, do not enable both by default: a session needs continuity, and rotation deliberately breaks that continuity.
Parser and Spider: the parser extracts with CSS selectors, XPath, text, and regex. The spider crawls concurrently, pauses and resumes, with built-in export. The CLI and MCP are two additional outputs.
Limits, stated plainly: Scrapling requires Python 3.10 or higher, and the base install only includes the parser. The browser branch pulls in Playwright and system dependencies, so it is much heavier than pure HTTP. The project is still young, at v0.5, so its API may change.
Deploying Scrapling: installation, verification, and common errors
Prepare Python 3.10+ and a separate virtual environment for the crawl job. Choose an extra for your need: scrapling only has the parser, scrapling[fetchers] for fetch and spider, scrapling[ai] for the MCP server, scrapling[rag] for a RAG system, scrapling[shell] for the shell and extract command, scrapling[all] for everything. Container images: pyd4vinci/scrapling and ghcr.io/d4vinci/scrapling:latest; pin a tag for production.
python -m venv .venv
source .venv/bin/activate
pip install scrapling
This installs only the parser. Importing scrapling.fetchers or scrapling.spiders without the matching extra then reports ModuleNotFoundError — a signal you are missing the layer you need. To get the fetch and spider layers:
pip install "scrapling[fetchers]"
scrapling install
The scrapling install command downloads browsers and system dependencies. Pure HTTP fetching does not need it, but StealthyFetcher does: without it, there is no real browser to run. For a clean reinstall, use scrapling install --force. For CLI and shell, also install pip install "scrapling[shell]".
python --version
pip show scrapling
python -c "import scrapling.fetchers"
python -c "import scrapling.spiders"
scrapling --help
Next, try CLI extract on a sample page:
scrapling extract get 'https://quotes.toscrape.com/' quotes.md
The expected output is a quotes.md file containing extracted content, not raw HTML. Limit the extraction area with --css-selector and impersonate a browser fingerprint with --impersonate 'chrome'. For JavaScript pages, use the fetch variant with --wait-selector. Output format follows the file extension: .txt, .md, .html. Using get instead of fetch with --wait-selector on a JS page may return incomplete content — a sign you chose the wrong fetch branch, not that the tool is broken.
| Symptom | Fix |
|---|---|
ModuleNotFoundError | Install pip install "scrapling[fetchers]" |
| Missing browser | Run scrapling install or --force |
| JS page missing content | Use StealthyFetcher, fetch + --wait-selector |
| Session drops during proxy rotation | Separate the strategy per domain |
| Blocked / banned IP | Reduce frequency, check robots.txt and ToS |
Technical assessment of Scrapling: strengths, weaknesses, and security
Strengths: you do not have to wire requests to Playwright, Playwright to a parser, a parser to a crawl queue, and export yourself. Session, retry, proxy rotation, parser, spider, and export share one model.
Weaknesses: you take on a wider failure surface, with transport, browser, parser, and spider combined in one still-young project. The StealthyFetcher branch costs real browser resources, so running it for every page burns CPU and RAM without a matching rise in success rate.
Security and compliance: the project documentation states the library is for educational and research purposes only, and that users must comply with data-collection and privacy laws and respect websites’ terms of use and robots.txt. It also states that StealthyFetcher can easily bypass all forms of Cloudflare Turnstile and Interstitial. This is the project’s claim, which I have not independently verified, and this article does not use it as guidance for bypassing access controls.
The practical boundary, in my view, should be this: only crawl your own websites, public data you have the right to collect, or price and content monitoring permitted by contract. When a site offers an official API, prefer that API first. Do not send credentials, tokens, or sensitive data through a crawl job. Crawled web content is untrusted data: feeding it straight into an agent or RAG without filtering risks prompt injection.
Performance, operations, and rollback: the HTTP Fetcher is lighter and faster than the real-browser StealthyFetcher. Concurrent crawling raises throughput but also raises the risk of being blocked. Pause and resume help long jobs continue after interruption, but they do not replace dedup. Logs should record success and failure counts, pages missing JS content, and the block rate. Prepare rollback in advance: pin the installed extra version and keep the old version, and revert to it if a new version performs worse, instead of raising proxy or concurrency counts to compensate.
Comparing Scrapling with Scrapy, Playwright, and BeautifulSoup on the same criteria
Do not confuse Scrapling with Scrapy, despite the similar names: they are different projects, at different levels of maturity.
| Criterion | Scrapling | Scrapy | Playwright | requests + BeautifulSoup |
|---|---|---|---|---|
| Scope | Fetch, parse, crawl, export | Mature crawl framework | Browser rendering | Static pages, simple parsing |
| JS rendering | Yes, StealthyFetcher | No | Strongest | No |
| Anti-bot, TLS | Yes, bundled | No | Configure yourself | No |
| Session, proxy, retry | Built in | Via middleware | Write yourself | Write yourself |
| Crawl, pause/resume | Built in | Strong, larger scale | Write yourself | No |
| Extraction, export | CSS, XPath, text, regex | Selector, pipeline | Write yourself | CSS, write yourself |
| AI agent integration | MCP, Agent Skill | No | No | No |
| Weight, maturity | Heavy with browser; young, v0.5 | Medium; mature | Heavy; mature | Lightest; mature |
In my view, Scrapling wins on packaging the full chain for medium scale, but loses to Scrapy on maturity and large-scale crawling, and to plain Playwright on raw browser control. No benchmark numbers appear here, because I have not measured them independently.
Real use cases
Business: price and content monitoring when permitted, on a schedule. The input is a list of URLs the business is contractually entitled to monitor. Use a spider with a stable session, run on a schedule, and export CSV or JSON for the pricing system. Limit: if the terms do not allow automated collection, or the site already has an API, do not use a spider to work around that.
Homelab: a small crawl job in a container, exporting Markdown for lookup. The input is a few dozen documentation or technical blog pages. Use CLI extract or a small spider in a container, exporting Markdown for offline lookup. The HTTP branch is usually enough; switch to StealthyFetcher only for pages that truly need JS.
AI workflow: clean Markdown via CLI or MCP for RAG, with a filtering step. The input is public documentation pages. Use CLI extract to produce Markdown, or the MCP server so an agent can fetch structured data, then filter it before it enters RAG. Related to this, you can compare how Xerj organises local data for AI agents.
DevOps and IT admin: testing your own websites. This is the cleanest use case for compliance. Use Fetcher for static pages and StealthyFetcher to check JS-rendered pages after each deployment. See also Lightpanda: Lightpanda is a headless browser, while Scrapling is a scraping framework that uses a browser via Playwright when needed.
Conclusion: who Scrapling fits, who it does not, and the next step
Scrapling fits teams needing one framework covering fetch, parse, crawl, and export, accepting browser-resource costs for JS rendering, and working within robots.txt and terms of use. It does not fit someone parsing only a static page, a team needing distributed large-scale crawling, or anyone seeking a tool to bypass access controls.
The next step, in my view, should go small to large: start with CLI extract on a sample page such as quotes.toscrape.com, check whether the fetched content is complete, and only then move to a spider with session and proxy when the job runs on a schedule.
References
- Official repo: https://github.com/D4Vinci/Scrapling
- Official documentation: https://scrapling.readthedocs.io
- Trending ranking: https://trendshift.io
Lessons learned
- Choose the fetch branch by rendering need: static pages use the HTTP Fetcher, only JS pages use StealthyFetcher.
- Install the right extra from the start: the base install only has the parser, and a
ModuleNotFoundErrorsignals a missing extra, not a code bug. - Session and proxy rotation must be designed together, not both enabled by default: a session needs continuity, and rotation deliberately breaks that continuity.
- A vendor anti-bot claim does not replace respecting robots.txt, terms of use, and official APIs: that claim was not independently verified in this article.
- A crawl job needs monitoring by missing-content and block rates, and a rollback path via a pinned version.
Verification scope
Checked on: 2026-11-03 (ICT). Verified against the official README and documentation: Python 3.10+ requirement, extras and installation commands, CLI extract, Docker images, class and feature list, BSD-3-Clause licence, v0.5 on 17/10/2026, and star and fork counts via the GitHub API. The parser is the base default; fetchers/spiders, shell/extract, and MCP/RAG are opt-in extras. These numbers are project information, not independent benchmarks. Not verified here: installation, crawl runs, benchmarks, or Cloudflare bypass tests.
Bình luận
Bình luận được duyệt trước khi hiển thị.Đang tải bình luận…
Để lại bình luận