The adaptive scraping framework

One library.Zero compromises.

Scrapling's parser learns from website changes and relocates your elements when pages update. Its fetchers bypass anti-bot systems like Cloudflare Turnstile out of the box. And its spiders scale to concurrent, multi-session crawls — all in a few lines of Python.

Run it liveGet started
0
GitHub stars
0
Forks
0
Test coverage %
0.00
Parse time · ms
scroll
  • ADAPTIVE PARSING
  • STEALTH FETCHERS
  • CLOUDFLARE BYPASS
  • SPIDER FRAMEWORK
  • AUTO-THROTTLE
  • PROXY ROTATION
  • MCP SERVER
  • RAG-READY MARKDOWN
  • CAPTURE_XHR
  • HTTP/3
  • PAUSE & RESUME
  • STREAMING CRAWLS
  • 92% TEST COVERAGE
  • 10x FASTER JSON
  • DOCKER READY
  • FULL TYPE HINTS
Live lab · real engine

Don't read about it. Run it.

A real scraping engine lives on this page — pick a target, watch the console stream live, then interrogate the captured DOM with CSS selectors. Every run is saved to your browser's local vault.

sandboxengine idle
$ scrapling — awaiting target…
pick a preset or paste a URL, then hit SCRAPE

the engine runs 100% in your browser through public CORS relays — this page ships with zero backend. private networks and non-standard ports are refused.

WHY SCRAPLING

One library. Zero compromises.

Three pillars that make Scrapling feel like cheating: a parser that remembers, fetchers that disappear, and spiders that scale themselves.

01 / REMEMBER

Adaptive Parser

Your selectors survive redesigns. The parser learns the page, then relocates elements when the structure changes.

page.css('.product', adaptive=True)
  • Smart element tracking with similarity scoring
  • CSS · XPath · text · regex · find_similar()
  • Auto-generated robust selectors for any element
02 / DISAPPEAR

Stealth Fetchers

Bypass Cloudflare Turnstile out of the box. Impersonate real browsers down to the TLS fingerprint.

StealthyFetcher.fetch(url, solve_cloudflare=True)
  • Fingerprint spoofing & anti-bot evasion
  • Chrome/Firefox TLS impersonation + HTTP/3
  • DNS-over-HTTPS, proxy rotation, ad blocking
03 / SCALE

Spider Framework

From one request to a full-scale crawl: concurrent, multi-session, pause/resume, self-throttling.

MySpider(crawldir='./crawl_data').start()
  • Scrapy-like API with async parse callbacks
  • AutoThrottle adapts delay per domain, backs off on blocks
  • CrawlSpider, SitemapSpider, ShopifySpider templates
ADAPTIVE SCRAPING

The site changed. Your scraper didn't notice.

Scrapling memorizes element characteristics, then relocates them with similarity scoring when the DOM mutates. Watch it happen:

idle

Simulation: the scraper memorizes the product element on the old page, detects that the redesigned page changed its markup, and relocates the product with a 98.4 percent similarity match.

store.html — v1 (yesterday)
shop.example.com
store.html — v2 (today — redesigned)
shop.example.com
page.css('.product', auto_save=True)page.css('.product', adaptive=True)
Live code

A few lines of Python

Real examples, straight from the docs — switch disciplines, steal the code.

quickstart.py

HTTP requests with session support, browser TLS impersonation and stealthy headers.

quickstart.py
1from scrapling.fetchers import Fetcher, FetcherSession
2 
3with FetcherSession(impersonate='chrome') as session:
4 page = session.get('https://quotes.toscrape.com/', stealthy_headers=True)
5 quotes = page.css('.quote .text::text').getall()
6 
7# Or one-off requests
8page = Fetcher.get('https://quotes.toscrape.com/')
9quotes = page.css('.quote .text::text').getall()
THE ARSENAL

Four ways to vanish

Pick your fetcher per target — from featherweight HTTP to a fully stealthed browser — or mix them in one spider.

Fetcher

HTTP

Fast, stealthy HTTP requests that can impersonate a real browser's TLS fingerprint and speak HTTP/3.

impersonate='chrome'http3=Truestealthy_headers
Speed
5/5
Stealth
3/5
Lightness
5/5

StealthyFetcher

Stealth browser

Headless Chromium with advanced stealth capabilities — solves every type of Cloudflare Turnstile with automation.

solve_cloudflare=Trueheadless=Truenetwork_idle=True
Speed
3/5
Stealth
5/5
Lightness
2/5

DynamicFetcher

Full automation

Full browser automation via Playwright's Chromium — or connect to a remote browser over CDP.

playwrightcdp_url=...capture_xhr=...
Speed
2/5
Stealth
4/5
Control
5/5

Sessions

Stateful

FetcherSession, StealthySession & DynamicSession keep cookies, state and rotating proxies across requests.

cookiesproxy_rotatorasync-ready
Speed
4/5
Stealth
4/5
Control
4/5
FEATURE DENSITY

A whole toolkit, one grid

Every tile below is a real Scrapling capability — most of them animated, all of them battle-tested.

MCP Server

Let Claude, Cursor and any MCP agent scrape through Scrapling. Pages are stripped of prompt-injection before the AI ever sees them.

AutoThrottle

The spider tunes each domain's delay by itself and backs off the second a site starts blocking you.

Pause & Resume

Ctrl+C mid-crawl — checkpoints save everything. Resume exactly where you stopped.

Streaming Mode

async for item in spider.stream() — items as they arrive, with live stats.

Proxy Rotation

Built-in ProxyRotator with cyclic or custom strategies — across every session type.

Background API Capture

Pass a pattern to capture_xhr and every matching XHR response the page makes is collected for you.

Ad & Tracker Blocking

~3,500 known ad and tracker domains blocked by default in browser fetchers.

DNS-over-HTTPS

Route DNS through Cloudflare's DoH — zero leaks while proxied.

Remote Browsers

Connect to an already-running browser via cdp_url — local, remote, or managed.

RAG-Ready Markdown

page.markdown() turns any page into clean, LLM-ready Markdown — no LLM in the loop.

Scrapy Drop-In

Decorate any callback with scrapling_response. Keep your pipeline, upgrade the parser.

Docker & Full Types

Ready-made image with all browsers. 100% type hints, PyRight + MyPy scanned.

BENCHMARKS

Others parse. Scrapling teleports

Text extraction on 5,000 nested elements — averages of 100+ runs. Lower is better.

0.00ms

Scrapling — text extraction, 5k elements

0×

faster than BS4 + html5lib

Text extraction times: Scrapling 1.99 milliseconds; Parsel / Scrapy 2.06; Raw Lxml 2.56; PyQuery 23.98; Selectolax 197.02; MechanicalSoup 1545.15; BS4 with Lxml 1562.1; BS4 with html5lib 3412.73.

Scrapling
1.0×
1.99 msbaseline
Parsel / Scrapy
2.06 ms×1.03
Raw Lxml
2.56 ms×1.29
PyQuery
23.98 ms×12
Selectolax
197.0 ms×99
MechanicalSoup
1,545 ms×777
BS4 with Lxml
1,562 ms×785
BS4 with html5lib
3,413 ms×1,715

log-ish scale — real ratios in labels

Element similarity & text search

AutoScraper comparison — lower is better.

Scrapling
1.0×
2.30 msbaseline
AutoScraper
12.58 ms×5.47

Methodology

Averages of 100+ runs · methodology: benchmarks.py in the repo.

Bars use a power scale so every row stays visible — the millisecond labels carry the true ratios.

benchmarked with benchmarks.py — reproducible locally
GET STARTED

Scraping in 30 seconds

One command for the parser, two for the full stealth arsenal. Python 3.10+.

Python 3.10+BSD-3-Clause

The parser engine

Just the parsing engine — zero browser dependencies. Selector() works standalone on any HTML.

pip install scrapling
01

Install

pip install "scrapling[all]"
02

Fetch the browsers

scrapling install
03

Scrape everything

StealthyFetcher.fetch(url)
TERMINAL NATIVE

Scrape without writing a single line

Scrapling ships a CLI and an interactive IPython scraping shell — with curl-to-Scrapling conversion and browser preview built in.

  • scrapling shell — IPython with Scrapling shortcuts
  • scrapling extract — pages to .md/.txt/.html from the terminal
  • convert curl requests to Scrapling requests instantly
scrapling — zsh

Scrapling CLI demo transcript:

  1. scrapling shell
  2. [+] Scrapling shell ready — IPython 8.x
  3. In [1]: page = fetch('https://quotes.toscrape.com/', stealthy_headers=True)
  4. In [2]: page.css('.quote .text::text').getall()[:2]
  5. Out[2]: ['“The world as we have created it…”', '“It is our choices…”]
  6. In [3]: exit
  7. scrapling extract stealthy-fetch \ 'https://nopecha.com/demo/cloudflare' out.html --solve-cloudflare
  8. [✓] Cloudflare solved in 3.2s — saved out.html (128 KB)

more extract variants

scrapling extract get 'https://example.com' content.md
scrapling extract fetch 'https://example.com' content.md --css-selector '#products'
scrapling extract stealthy-fetch 'https://nopecha.com/demo/cloudflare' captcha.html --solve-cloudflare
QUESTIONS

Before you ask

The stuff everyone wants to know about stealth, adaptivity and migrations.

Your scrapers just became unkillable.

Adaptive parsing that survives redesigns. Stealth fetchers that walk past Cloudflare. Spiders that throttle themselves. One pip install away.

pip install "scrapling[all]"

83,280 stars and counting