Scrapling
D4Vinci · D4Vinci/Scrapling
Một framework Python thu thập dữ liệu web thích ứng xử lý từ một yêu cầu đơn lẻ đến thu thập dữ liệu quy mô lớn, với tính năng bỏ qua anti-bot, xoay vòng proxy và MCP server để tích hợp tác nhân.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Xem trước
Bạn có thể làm gì với nó
- Tự động trích xuất dữ liệu có cấu trúc từ các trang web để nghiên cứu thị trường hoặc phân tích dữ liệu.
- Xây dựng các trình thu thập dữ liệu web mạnh mẽ có thể vượt qua các biện pháp chống bot và thích ứng với thay đổi thiết kế trang web.
- Tích hợp khả năng thu thập dữ liệu web nâng cao vào quy trình làm việc của tác nhân AI thông qua MCP server của nó.
Thử hỏi agent của bạn
- “Sử dụng Scrapling, trích xuất tất cả tiêu đề bài đăng blog và URL của chúng từ 'https://www.example.com/blog/'.”
- “Thu thập dữ liệu từ 'https://www.fakestore.com/products' để lấy tên, giá và URL hình ảnh của 10 sản phẩm đầu tiên, xử lý các biện pháp chống bot tiềm năng.”
- “Giám sát định kỳ 'https://news.example.com' để tìm các bài viết mới chứa từ khóa 'AI' và báo cáo tiêu đề của chúng.”
Kiểm tra an toàn
Không thấy dấu hiệu rủi ro trong các file đã quét.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
Effortless Web Scraping for the Modern Web
<strong>Selection methods</strong>
·
<strong>Fetchers</strong>
·
<strong>Spiders</strong>
·
<strong>Proxy Rotation</strong>
·
<strong>CLI</strong>
·
<strong>MCP</strong>
Scrapling is an adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl.
Its parser learns from website changes and automatically relocates your elements when pages update. Its fetchers bypass anti-bot systems like Cloudflare Turnstile out of the box. And its spider framework lets you scale up to concurrent, multi-session crawls with pause/resume, automatic proxy rotation, and a crawl speed that adapts to how fast each website responds and backs off when it starts blocking you - all in a few lines of Python. One library, zero compromises.
Blazing fast crawls with real-time stats and streaming. Built by Web Scrapers for Web Scrapers and regular users, there's something for everyone.
from scrapling.fetchers import Fetcher, AsyncFetcher, StealthyFetcher, DynamicFetcher
StealthyFetcher.adaptive = True
p = StealthyFetcher.fetch('https://example.com', headless=True, network_idle=True) # Fetch website under the radar!
products = p.css('.product', auto_save=True) # Scrape data that survives website design changes!
products = p.css('.product', adaptive=True) # Later, if the website structure changes, pass `adaptive=True` to find them!
Or scale up to full crawls
from scrapling.spiders import Spider, Response
class MySpider(Spider):
name = "demo"
start_urls = ["https://example.com/"]
async def parse(self, response: Response):
for item in response.css('.product'):
yield {"title": item.css('h2::text').get()}
MySpider().start()
Platinum Sponsors
NodeMaven - The most efficient proxy provider for Web Scraping and Automation with the Highest Quality IP on the market. Use code SCRAPLING35 for 35% discount.
Scrapling handles Cloudflare Turnstile. For enterprise-grade protection,
<b>Hyper Solutions</b>
provides API endpoints that generate valid antibot tokens for <b>Akamai</b>, <b>DataDome</b>, <b>Kasada</b>, and <b>Incapsula</b>. Simple API calls, no browser automation required.
<b>Evomi</b>
: residential proxies from $0.49/GB. Scraping browser with fully spoofed Chromium, residential IPs, auto CAPTCHA solving, and anti-bot bypass. </br>
<b>Scraper API for hassle-free results. MCP and N8N integrations are available.</b>
TikHub.io provides 900+ stable APIs across 16+ platforms including TikTok, X, YouTube & Instagram, with 40M+ datasets. Also offers DISCOUNTED AI models - Claude, GPT, GEMINI & more up to 71% off.
Read a full review of Scrapling on The Web Scraping Club (Nov 2025), the #1 newsletter dedicated to Web Scraping.
Swiftproxy provides scalable residential proxies with 80M+ IPs across 195+ countries, delivering fast, reliable connections, automatic rotation, and strong anti-block performance. Free trial available.
Byteful supplies ethical residential, mobile, ISP, and datacenter proxies, plus scraping and AI automation tools. Use code SCRAPLING10: 10% off residential proxies.
ProxyLane: Reduce blocks and CAPTCHAs by 90%. 28M Premium Residential IPs for Heavy Web Scraping. 195 countries. City/ISP/ZIP targeting. Sticky/rotating sessions. Non-expiring traffic from $2/GB. Code <strong>SCRAPEANDTAKE</strong>: <em>25% off</em>.
LundProxy: Stop paying per GB. Unlimited residential traffic, 100M+ IPs, 190+ countries. Pay by bandwidth. Request a free 50 Mbps residential proxies trial.
$1/GB at DataImpulse. Ethical first-party proxies. 90M+ IPs, 195+ countries. Residential, datacenter, mobile. Pay-as-you-go = no subscription. Traffic never expires.
Do you want to show your ad here? Click here
Sponsors
Do you want to show your ad here? Click here and choose the tier that suits you!
Key Features
Spiders - A Full Crawling Framework
- 🕷️ Scrapy-like Spider API: Define spiders with
start_urls, asyncparsecallbacks, andRequest/Responseobjects. - ⚡ Concurrent Crawling: Configurable concurrency limits, per-domain throttling, and download delays.
- 🔄 Multi-Session Support: Unified interface for HTTP requests, and stealthy headless browsers in a single spider - route requests to different sessions by ID.
- 💾 Pause & Resume: Checkpoint-based crawl persistence. Press Ctrl+C for a graceful shutdown; restart to resume from where you left off.
- 📡 Streaming Mode: Stream scraped items as they arrive via
async for item in spider.stream()with real-time stats - ideal for UI, pipelines, and long-running crawls. - 🛡️ Blocked Request Detection: Automatic detection and retry of blocked requests with customizable logic.
- 🚦 AutoThrottle: Stop guessing delays. The spider tunes the delay of each domain on its own from how fast the website responds, then doubles it (or waits what
Retry-Afterasks) whene