TL;DR
Scrapling là Python web scraping framework mã nguồn mở (BSD-3-Clause) với 37.5k GitHub stars. Điểm nổi bật: bypass Cloudflare Turnstile out of the box, parser tự "heal" khi website redesign, nhanh hơn BeautifulSoup 1,775 lần, và tích hợp MCP server cho AI-assisted scraping. Phiên bản mới nhất v0.4.6 (04/2026).
What's new
Scrapling không phải thư viện scraping thông thường. Được xây dựng bởi Karim Shoair (D4Vinci), framework này giải quyết 3 vấn đề lớn nhất của web scraping hiện đại:
- Anti-bot bypass tích hợp: StealthyFetcher bypass Cloudflare Turnstile/Interstitial, TLS fingerprint impersonation (Chrome, Firefox), block ~3,500 ad/tracker domains, DNS-over-HTTPS chống DNS leak
- Self-healing spiders: Adaptive parser "học" cấu trúc website — khi trang web redesign, Scrapling tự động relocate elements mà không cần update code
- MCP Server tích hợp: Kết nối với Claude, Cursor để scraping bằng natural language — giảm token usage và chi phí vận hành
Version 0.3 là bước ngoặt lớn nhất: rewrite kiến trúc hoàn toàn, thêm session classes (FetcherSession, StealthySession, DynamicSession) cho persistent cookies và state management. Interactive IPython shell với shortcuts tích hợp, CLI scrapling extract để scrape không cần viết code. Đặc biệt, v0.3 giới thiệu browser tab pooling qua tham số max_pages — cho phép concurrent fetching với rotating tabs, tối ưu resource usage khi crawl nhiều trang cùng lúc.
Why it matters
Web scraping năm 2026 đã rất khác. Hầu hết website đều dùng Cloudflare, DataDome, hoặc các anti-bot solution khác. Scrapers truyền thống (BeautifulSoup + requests) gần như vô dụng với các trang này.
Scrapling giải quyết bằng cách tích hợp mọi thứ vào một framework duy nhất:
- Fetcher — HTTP requests nhanh với TLS fingerprint impersonation, HTTP/3
- StealthyFetcher — Bypass anti-bot với fingerprint spoofing
- DynamicFetcher — Browser automation qua Playwright (thay thế Selenium)
Thêm vào đó, spider framework có API giống Scrapy (start_urls, parse callbacks) nhưng built-in pause/resume, streaming mode (async for item in spider.stream()), proxy rotation — không cần plugin bên thứ 3. Spider hỗ trợ configurable concurrent request limits, per-domain throttling, download delays, và optional robots.txt compliance. Development mode cho phép cache responses lần đầu và replay ở các lần chạy sau — rất tiện khi debug.
Technical facts
| Benchmark | Scrapling | Đối thủ | Chênh lệch |
|---|---|---|---|
| Text extraction (5000 elements) | 2.02ms | BeautifulSoup+lxml: 1,584ms | 784x nhanh hơn |
| Text extraction (html5lib) | 2.02ms | BeautifulSoup+html5lib: 3,391ms | 1,679x nhanh hơn |
| Element similarity search | 2.39ms | AutoScraper: 12.45ms | 5.1x nhanh hơn |
| JSON serialization | — | Standard library | 10x nhanh hơn |
Cải tiến hiệu năng từ v0.3:
- Fetcher: 4x nhanh hơn
- DynamicFetcher: ~60% nhanh hơn
- StealthyFetcher: 20-30% nhanh hơn
- Text cleaning: 5x nhanh hơn
- Core selection methods: 50%+ gains
Code quality: 92% test coverage, 100% type hints, Python 3.10+.
So sánh với đối thủ
| Tính năng | Scrapling | BeautifulSoup | Scrapy | Selenium |
|---|---|---|---|---|
| Anti-bot bypass | ✅ Built-in | ❌ | ❌ (cần plugin) | ❌ (dễ detect) |
| Self-healing parser | ✅ Adaptive | ❌ | ❌ | ❌ |
| Spider framework | ✅ | ❌ | ✅ | ❌ |
| Browser automation | ✅ Playwright | ❌ | ❌ (cần Splash) | ✅ WebDriver |
| MCP/AI integration | ✅ | ❌ | ❌ | ❌ |
| Proxy rotation | ✅ Built-in | ❌ | ✅ (middleware) | ❌ |
| Parse speed | 2.02ms | 1,584ms | 2.04ms | N/A |
Use cases
- Data pipeline automation: Crawl hàng nghìn trang concurrent với spider framework, export JSON/JSONL. Hỗ trợ throttle per-domain và respect robots.txt
- Scraping trang có anti-bot: Bypass Cloudflare không cần config phức tạp — StealthyFetcher xử lý Turnstile tự động
- Self-healing scrapers: Website redesign? Scrapling tự tìm lại elements. Không cần maintain selectors thủ công
- AI-assisted extraction: Dùng MCP server + Claude để extract data bằng câu hỏi tự nhiên, giảm thiểu code boilerplate
- Quick prototyping: CLI
scrapling extract+ interactive shell — test scraping logic mà không cần viết script - Price monitoring & competitive intelligence: Multi-session với cookie persistence, proxy rotation automatic
Limitations & pricing
Pricing: Hoàn toàn miễn phí, mã nguồn mở BSD-3-Clause. Không có paid tier. Revenue từ GitHub Sponsors và partnerships với proxy providers.
Limitations:
- Yêu cầu Python 3.10+ (dropped 3.9 từ v0.3)
- Browser automation (StealthyFetcher, DynamicFetcher) tốn resource hơn HTTP-only
- Enterprise anti-bot (Akamai, DataDome, Kasada) vượt khả năng built-in → cần dịch vụ bên thứ 3 như Hyper Solutions
- Status: Beta (PyPI classifier) — dù đã có 37.5k stars và 92% test coverage
- Docker image khá lớn do bundle browsers
What's next
Với 37.5k GitHub stars, 3.3k forks, 44 releases, và cộng đồng Discord active, Scrapling đang trên đà trở thành tiêu chuẩn mới cho Python web scraping. Framework đã được dùng hàng ngày bởi hàng trăm web scrapers trong hơn một năm qua. Documentation đa ngôn ngữ (Arabic, Spanish, French, German, Chinese, Japanese, Russian, Korean) cho thấy cộng đồng toàn cầu. Hướng phát triển tập trung vào mở rộng AI integration, cải thiện anti-bot coverage, và thêm fetcher types mới.
Nếu bạn đang tìm một framework scraping hiện đại thay thế combo BeautifulSoup + Selenium + proxy middleware, Scrapling xứng đáng là lựa chọn đầu tiên để thử.
Cài đặt nhanh:
pip install "scrapling[all]"
Hoặc dùng Docker:
docker pull pyd4vinci/scrapling
Nguồn: GitHub - D4Vinci/Scrapling, PyPI, Scrapling Docs.