Ikuti Setiap Secara Secara Sentiasa Temui Sumber Terbaik Sumber Dan Ketahui

Latest commit

 

History

1,828 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Is Toywiz Com Customer Customer Sensitive Me88 Is Legends Mobile

Relatively new to collecting pops and i m just wondering if anyone could give me some feedback on this website i ve read numerous reviews that they shouldn t be trusted but their stock is just so diverse i d really like to start shopping here share add a comment sort by best open Agn88 Online Webex News Malaysia Thousands Of Stability Melalui comment sort options best top new controversial old q a darnell5000.

Trusted online casino games platform in malaysia, apply for uob personal loan with low rates and no collateral enjoy fast approval and flexible repayment options Heylink Me Fmt Apply Thank You About Numbers Status Pay perfect for all your financial needs, vape online malaysia cheapest pod disposable deals.

Agn88 Web Review Plates Milion88 Milion88 Mb8 Trusted Own Secure Final

Play agn888 best online casino malaysia, find the best recruitment agencies in malaysia for job seekers and businesses to fill positions efficiently explore our curated list of top options, agn88 web review trusted online betting platform I1malaysia Trusted E Number Apply Shop Quality Baby For Built Excitement for malaysian players.

Shop quality baby products trusted by malaysian parents strollers car seats high chairs more find top baby brands online or at our retail babyshop, reddit, pavilion88 malaysia, agn888 casino best online casino Webex Players Quarantine Thank You About Numerous All malaysia 2026.

Agn888 Casino Special Premium The Thank You About Retail Logistics With

Mb8 trusted online casino in asia play in malaysia singapore cambodia thailand indonesia and india when it comes to online casinos in asia trust is the most Is Toywiz Com Agn888 Skin Service Agn88 Is Malaysia Game Party crucial concern mb8 is the best trusted online casino website that has been in operation for years we are a reputable platform that offers players a variety of games for instance slot games online table games live dealer.

Login mrluck88 online casino malaysia mrluck88 is a trusted online casino in malaysia that provides adult users with access Webex Quarantine Live 2026 Me88 Is Just Offering Curated to a wide range of casino games through a secure and user.

Join mbi8 Agn88 Malaysia Players Read Car Trusted By Friendly Susunan Financial the trusted online casino malaysia in 2026 play 50 slot games with real bonuses at the top online casino malaysia site fast mobile secure play, me88 is a trusted online casino malaysia platform offering live casino slots sports betting esports and poker licensed secure and built for malaysian players.

Reddit Service Malaysia 2026 Apply For Spanning Touch

Reddit, milion88 malaysia slot games with daily promotions, pdf network security quarantine, agn88 is malaysia s trusted online betting platform for sports Agn88 Malaysia Players Mb8 Milion88 Most We Would Numerous Lumpur Seeking football slots and live casino join now to claim your welcome bonus and enjoy seamless deposits via touch n go ewallet.

D4Vinci%2FScrapling | TrendshiftStar History Rank
README بالعربيةREADME en EspañolREADME em Português (Brasil)README en FrançaisREADME auf Deutsch简体中文版自述文件日本語のREADMEРусская версия README한국어 README
TestsPyPI versionDocker PullsPyPI package downloadsStatic BadgeOpenClaw Skill
DiscordX (formerly Twitter) Follow
Supported Python versions

Selection methods · Fetchers · Spiders · Proxy Rotation · CLI · MCP

Scrapling is a Python Web Scraping framework that brings fast HTTP requests, stealth browsers, powerful parsing, and concurrent crawling into one library.

Scrape static pages, render JavaScript, interact with websites, and extract data from the API calls behind them. Build crawlers with reusable sessions, proxy rotation, automatic retries, pause/resume, and built-in data exports.

Use it from Python, the terminal, or your AI agent through its MCP server and Agent Skill. From extracting a few fields to collecting a whole website as clean Markdown, Scrapling covers the full scraping workflow.

What you can do with Scrapling

  • Fetch & interact: Fast HTTP requests, stealth browsers, JavaScript rendering, Cloudflare Turnstile/Interstitial handling, persistent sessions, and background API capture.
  • Parse & extract: CSS, XPath, text and regex search, adaptive element tracking, similar-element matching, and clean Markdown output.
  • Crawl & export: Concurrent spiders, proxy rotation, retries, AutoThrottle, pause/resume, streaming, ready-made templates, and JSON/JSONL/CSV/XML exports.
  • Scrape with AI or from your terminal: An MCP server for AI agents to browse and extract data, an Agent Skill, CLI commands, and an interactive shell.

Start with a single page:

fromscrapling.fetchersimportFetcherpage=Fetcher.get('https://quotes.toscrape.com/') quotes=page.css('.quote .text::text').getall() print(quotes)

Or scale up with a spider:

fromscrapling.spidersimportSpider, ResponseclassQuotesSpider(Spider): name="quotes"start_urls= ["https://quotes.toscrape.com/"] asyncdefparse(self, response: Response): forquoteinresponse.css('.quote'): yield { "text": quote.css('.text::text').get(), "author": quote.css('.author::text').get(), } result=QuotesSpider().start() print(len(result.items)) result.items.to_json("quotes.json")

This prints 10 and saves the quotes and authors to quotes.json.

At DataImpulse, we specialize in developing custom proxy services for your business. Make requests from anywhere, collect data, and enjoy fast connections with our premium proxies.

Platinum Sponsors

NodeMaven - The most efficient proxy provider for Web Scraping and Automation with the Highest Quality IP on the market. SCRAPLING2X - 2X traffic for Black Friday
Scrapling handles Cloudflare Turnstile. For enterprise-grade protection, Hyper Solutions provides API endpoints that generate valid antibot tokens for Akamai, DataDome, Kasada, and Incapsula. Simple API calls, no browser automation required.
Evomi: residential proxies from $0.49/GB. Scraping browser with fully spoofed Chromium, residential IPs, auto CAPTCHA solving, and anti-bot bypass.
Scraper API for hassle-free results. MCP and N8N integrations are available.
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.
Byteful supplies ethical residential, mobile, ISP, and datacenter proxies, plus scraping and AI automation tools. Use code SCRAPLING10: 10% off residential proxies.
ProxyLane: 90% fewer CAPTCHAs on your Scrapling runs. 28M real P2P residential devices, 98.7% clean IPs, 195 countries. City/ISP/ZIP targeting, sticky/rotating sessions, traffic never expires. Try 350 MB for $1.95. Code SCRAPEANDTAKE: 25% off.
LundProxy: Stop paying per GB. Unlimited residential traffic, 100M+ IPs, 190+ countries. Pay by bandwidth. Request a free 50 Mbps residential proxies trial.
Resolvr: Scraping at scale means CAPTCHAs at scale. Resolvr solves reCAPTCHA and Cloudflare challenges on real devices through one API. Free beta access is available now.
hCaptcha in your Scrapling runs? NoneCap returns valid hCaptcha tokens, Enterprise sitekeys included, through one API. 1,300 free credits on signup.
$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, async parse callbacks, and Request/Response objects.
  • ⚡ 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: Save pending requests and seen URLs with crawldir. Press Ctrl+C to stop gracefully and restart with the same directory.
  • 📡 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-After asks) whenever the website starts blocking or rate-limiting you, and speeds back up once it stops.
  • 🤖 Robots.txt Compliance: Optional robots_txt_obey flag that respects Disallow, Crawl-delay, and Request-rate directives with per-domain caching.
  • 🧪 Development Mode: Cache responses to disk on the first run and replay them on subsequent runs - iterate on your parse() logic without re-hitting the target servers.
  • 🧩 Ready-made Spider Templates: Skip the boilerplate with CrawlSpider for rule-based link following, SitemapSpider for sitemap/robots.txt-driven crawls, XMLFeedSpider/CSVFeedSpider for iterating XML/RSS and CSV feeds, and ShopifySpider to collect products from public Shopify stores, one item per variant.
  • 🔗 Link Extraction: A standalone LinkExtractor primitive with allow/deny patterns, domain filters, CSS/XPath scoping, extension filtering, and canonicalization - use it inside the templates or on its own.
  • 📦 Built-in Export: Export results through hooks and your own pipeline or the built-in JSON/JSONL/CSV/XML exporters with result.items.to_json(), to_jsonl(), to_csv(), and to_xml().

Advanced Websites Fetching with Session Support

  • HTTP Requests: Fast and stealthy HTTP requests with the Fetcher class. Can impersonate browsers' TLS fingerprint, headers, and use HTTP/3.
  • Dynamic Loading: Fetch dynamic websites with full browser automation through the StealthyFetcher class supporting Playwright's Chromium and Google's Chrome.
  • Anti-bot Bypass: Advanced stealth capabilities with StealthyFetcher and fingerprint spoofing. Can easily bypass all types of Cloudflare's Turnstile/Interstitial with automation.
  • Session Management: Persistent session support with FetcherSession and StealthySession classes for cookie and state management across requests.
  • Proxy Rotation: Built-in ProxyRotator with cyclic or custom rotation strategies across all session types, plus per-request proxy overrides.
  • Domain & Ad Blocking: Block requests to specific domains (and their subdomains) or enable built-in ad blocking (~3,500 known ad/tracker domains) in browser-based fetchers.
  • DNS Leak Prevention: Optional DNS-over-HTTPS support to route DNS queries through Cloudflare's DoH, preventing DNS leaks when using proxies.
  • Remote Browsers: Instead of launching a browser locally, connect to one that's already running through CDP with cdp_url, whether it's on the same machine, another host, or a managed browser provider. You can also point any browser fetcher at your own Chromium build with executable_path.
  • Background API Capture: Enable record_requests=True on a browser session, then search its saved responses with session.network.search(limit=None). Read API data and HTTP errors across page loads without sending requests again. History is bounded and saves text response bodies.
  • Async Support: Complete async support across all fetchers and dedicated async session classes.

Parsing and Data Extraction

  • 🔄 Smart Element Tracking: Relocate elements after website changes using intelligent similarity algorithms.
  • 🎯 Smart Flexible Selection: CSS selectors, XPath selectors, filter-based search, text search, regex search, and more.
  • 🔍 Find Similar Elements: Automatically locate elements similar to found elements.

AI Features

  • 🤖 MCP Server: Let AI chatbots and agents (Claude/Cursor/etc) scrape through Scrapling with HTTP requests, browser actions, screenshots, saved login state, and background API responses. Uses our stealthy browser with the right tools to enable suitable AI models to bypass any CAPTCHA is faces while working (not to mention our Cloudflare solver). It uses a lot of methods to reduce the content sent to the model, block ads, and protect it against Prompt-Injection. Remote browsers over CDP and HTTP transport with authentication options are included. (demo video)
  • 🧠 Agent Skill: A ready-to-install Agent Skill that teaches coding agents the whole library, so the code they write with Scrapling matches the current API instead of guessing.
  • 📚 RAG-ready Markdown: Turn any page into clean, sanitized, LLM-ready Markdown with one line (page.markdown()), or crawl a whole website into a Markdown corpus with the ContentSpider template, all without an LLM in the loop. (docs)

High-Performance & battle-tested Architecture

  • 🚀 Lightning Fast: Optimized performance outperforming most Python scraping libraries.
  • 🔋 Memory Efficient: Optimized data structures and lazy loading for a minimal memory footprint.
  • ⚡ Fast JSON Serialization: 10x faster than the standard library.
  • 🏗️ Battle tested: Not only does Scrapling have 92% test coverage and full type hints coverage, but it has been used daily by hundreds of Web Scrapers over the past year.

Developer/Web Scraper Friendly Experience

  • 🎯 Interactive Web Scraping Shell: Optional built-in IPython shell with Scrapling integration, shortcuts, and new tools to speed up Web Scraping scripts development, like converting curl requests to Scrapling requests and viewing requests results in your browser.
  • 🚀 Use it directly from the Terminal: Optionally, you can use Scrapling to scrape a URL without writing a single line of code!
  • 🛠️ Rich Navigation API: Advanced DOM traversal with parent, sibling, and child navigation methods.
  • 🧬 Enhanced Text Processing: Built-in regex, cleaning methods, and optimized string operations.
  • 📝 Auto Selector Generation: Generate robust CSS/XPath selectors for any element.
  • 🔌 Familiar API: Similar to Scrapy/BeautifulSoup with the same pseudo-elements used in Scrapy/Parsel.
  • 🤝 Drop-in Scrapy Integration: Already invested in Scrapy? Decorate any callback with scrapling_response to parse the responses you already fetch with Scrapling's parser, no rewrite needed.
  • 📘 Complete Type Coverage: Full type hints for excellent IDE support and code completion. The entire codebase is automatically scanned with PyRight and MyPy with each change.
  • 🔋 Ready Docker image: With each release, a Docker image containing all browsers is automatically built and pushed.

Getting Started

Let's give you a quick glimpse of what Scrapling can do without deep diving.

Basic Usage

HTTP requests with session support

fromscrapling.fetchersimportFetcher, FetcherSessionwithFetcherSession(impersonate='chrome') assession: # Use latest version of Chrome's TLS fingerprintpage=session.get('https://quotes.toscrape.com/', stealthy_headers=True) quotes=page.css('.quote .text::text').getall() # Or use one-off requestspage=Fetcher.get('https://quotes.toscrape.com/') quotes=page.css('.quote .text::text').getall()

Advanced stealth mode

fromscrapling.fetchersimportStealthyFetcher, StealthySessionwithStealthySession(headless=True, solve_cloudflare=True) assession: # Keep the browser open until you finishpage=session.fetch('https://nopecha.com/demo/cloudflare', google_search=False) data=page.css('#padded_content a').getall() # Or use one-off request style, it opens the browser for this request, then closes it after finishingpage=StealthyFetcher.fetch('https://nopecha.com/demo/cloudflare', solve_cloudflare=True) data=page.css('#padded_content a').getall()

Full browser automation

fromscrapling.fetchersimportStealthyFetcher, StealthySessionwithStealthySession(headless=True, disable_resources=False, network_idle=True) assession: # Keep the browser open until you finishpage=session.fetch('https://quotes.toscrape.com/', load_dom=False) data=page.xpath('//span[@class="text"]/text()').getall() # XPath selector if you prefer it# Or use one-off request style, it opens the browser for this request, then closes it after finishingpage=StealthyFetcher.fetch('https://quotes.toscrape.com/') data=page.css('.quote .text::text').getall()

Spiders

Build full crawlers with concurrent requests, multiple session types, and pause/resume:

fromscrapling.spidersimportSpider, ResponseclassQuotesSpider(Spider): name="quotes"start_urls= ["https://quotes.toscrape.com/"] concurrent_requests=10asyncdefparse(self, response: Response): forquoteinresponse.css('.quote'): yield { "text": quote.css('.text::text').get(), "author": quote.css('.author::text').get(), } next_page=response.css('.next a') ifnext_page: yieldresponse.follow(next_page[0].attrib['href']) result=QuotesSpider().start() print(f"Scraped {len(result.items)} quotes") result.items.to_json("quotes.json")

Use multiple session types in a single spider:

fromscrapling.spidersimportSpider, Request, Responsefromscrapling.fetchersimportFetcherSession, AsyncStealthySessionclassMultiSessionSpider(Spider): name="multi"start_urls= ["https://example.com/"] defconfigure_sessions(self, manager): manager.add("fast", FetcherSession(impersonate="chrome")) manager.add("stealth", AsyncStealthySession(headless=True), lazy=True) asyncdefparse(self, response: Response): forlinkinresponse.css('a::attr(href)').getall(): # Route protected pages through the stealth sessionif"protected"inlink: yieldRequest(link, sid="stealth") else: yieldRequest(link, sid="fast", callback=self.parse) # explicit callback

Pause and resume long crawls with checkpoints by running the spider like this:

QuotesSpider(crawldir="./crawl_data").start()

With crawldir set, press Ctrl+C to save pending requests and seen URLs. Restart with the same crawldir to resume. Save scraped items separately.

Or skip writing the crawling logic altogether with the ready-made templates, like pulling an entire Shopify store's catalog:

fromscrapling.spidersimportShopifySpiderclassMyStore(ShopifySpider): target_website="example.com"result=MyStore().start() # Every product in the store, one item per variant

The template reads products exposed through public collection endpoints, one item per variant.

Advanced Parsing & Navigation

fromscrapling.fetchersimportFetcher# Rich element selection and navigationpage=Fetcher.get('https://quotes.toscrape.com/') # Get quotes with multiple selection methodsquotes=page.css('.quote') # CSS selectorquotes=page.xpath('//div[@class="quote"]') # XPathquotes=page.find_all('div', {'class': 'quote'}) # BeautifulSoup-style# Same asquotes=page.find_all('div', class_='quote') quotes=page.find_all(['div'], class_='quote') quotes=page.find_all(class_='quote') # and so on...# Find element by text contentquotes=page.find_by_text('Albert Einstein', first_match=False) # Advanced navigationquote_text=page.css('.quote')[0].css('.text::text').get() quote_texts=page.css('.quote').css('.text::text').getall() # Chained selectorsfirst_quote=page.css('.quote')[0] author=first_quote.css('.author::text').get() next_quote=first_quote.nextparent_container=first_quote.parent# Element relationships and similaritysimilar_elements=first_quote.find_similar() below_elements=first_quote.below_elements

You can use the parser right away if you don't want to fetch websites like below:

fromscrapling.parserimportSelectorpage=Selector("<html>...</html>")

And it works precisely the same way!

Async Session Management Examples

importasynciofromscrapling.fetchersimportFetcherSession, AsyncStealthySessionasyncdefmain(): asyncwithFetcherSession(http3=True) ashttp_session: # `FetcherSession` is context-aware and can work in both sync/async patternspage1=awaithttp_session.get('https://quotes.toscrape.com/') page2=awaithttp_session.get('https://quotes.toscrape.com/page/2/', impersonate='chrome') print(len(page1.css('.quote')), len(page2.css('.quote'))) asyncwithAsyncStealthySession(max_pages=2) asbrowser_session: urls= ['https://quotes.toscrape.com/js/', 'https://quotes.toscrape.com/js/page/2/'] pages=awaitasyncio.gather(*(browser_session.fetch(url, wait_selector='.quote') forurlinurls)) print([len(page.css('.quote')) forpageinpages]) asyncio.run(main())

CLI & Interactive Shell

Scrapling includes a powerful command-line interface:

asciicast

Launch the interactive Web Scraping shell

pip install "scrapling[shell]" scrapling shell

Extract pages to a file directly without programming. Use --css-selector to pick the content, or --ai-targeted to select and sanitize the body content. Use .txt for text, .md for Markdown, or .html for HTML.

scrapling extract get 'https://quotes.toscrape.com/' quotes.md scrapling extract get 'https://quotes.toscrape.com/' quotes.txt --css-selector '.quote' --impersonate 'chrome' scrapling extract fetch 'https://quotes.toscrape.com/js/' quotes.md --css-selector '.quote' --wait-selector '.quote' --no-headless scrapling extract fetch 'https://nopecha.com/demo/cloudflare' captchas.html --css-selector '#padded_content a' --solve-cloudflare

Note

There are many additional features, but we want to keep this page concise, including the MCP server and the interactive Web Scraping Shell. Check out the full documentation here

Performance Benchmarks

Scrapling isn't just powerful-it's also blazing fast. The following benchmarks compare Scrapling's parser with the latest versions of other popular libraries.

Text Extraction Speed Test (5000 nested elements)

#LibraryTime (ms)vs Scrapling
1Scrapling1.991.0x
2Parsel/Scrapy2.061.035
3Raw Lxml2.561.286
4PyQuery23.98~12x
5Selectolax197.02~99x
6MechanicalSoup1545.15~776.5x
7BS4 with Lxml1562.1~785.0x
8BS4 with html5lib3412.73~1714.9x

Element Similarity & Text Search Performance

Scrapling's adaptive element finding capabilities significantly outperform alternatives:

LibraryTime (ms)vs Scrapling
Scrapling2.31.0x
AutoScraper12.585.47x

All benchmarks represent averages of 100+ runs. See benchmarks.py for methodology.

Installation

Scrapling requires Python 3.10 or higher:

pip install scrapling

Important

This installation only includes the parser engine and its dependencies, without any fetchers or commandline dependencies. So importing anything from scrapling.fetchers or scrapling.spiders, like in the examples above, will raise ModuleNotFoundError with this installation alone. If you are going to use any of the fetchers or spiders, install the fetchers' dependencies first as shown below.

Optional Dependencies

  1. If you are going to use any of the extra features below, the fetchers, or their classes, you will need to install fetchers' dependencies and their browser dependencies as follows:

    pip install "scrapling[fetchers]" scrapling install # normal install scrapling install --force # force reinstall

    This downloads all browsers, along with their system dependencies and fingerprint manipulation dependencies.

    Or you can install them from the code instead of running a command like this:

    fromscrapling.cliimportinstallinstall([], standalone_mode=False) # normal installinstall(["--force"], standalone_mode=False) # force reinstall
  2. Extra features:

    • Install the MCP server feature:
      pip install "scrapling[ai]"
    • Install dependencies for (building RAG systems):
      pip install "scrapling[rag]"
    • Install shell features (Web Scraping shell and the extract command):
      pip install "scrapling[shell]"
    • Install everything:
      pip install "scrapling[all]"

    Run scrapling install when you need browser fetchers. HTTP requests do not need a browser installation.

Docker

You can also install a Docker image with all extras and browsers with the following command from DockerHub:

docker pull pyd4vinci/scrapling

Or download it from the GitHub registry:

docker pull ghcr.io/d4vinci/scrapling:latest

This image is automatically built and pushed using GitHub Actions and the repository's main branch.

Contributing

We welcome contributions! Please read our contributing guidelines before getting started.

Disclaimer

Caution

This library is provided for educational and research purposes only. By using this library, you agree to comply with local and international data scraping and privacy laws. The authors and contributors are not responsible for any misuse of this software. Always respect the terms of service of websites and robots.txt files.

🎓 Citations

If you have used our library for research purposes please quote us with the following reference:

 @misc{scrapling, author = {Karim Shoair}, title = {Scrapling}, year = {2024}, url = {https://github.com/D4Vinci/Scrapling}, note = {A Python Web Scraping framework for everything from a single request to a full-scale crawl!} } 

License

This work is licensed under the BSD-3-Clause License.

Acknowledgments

This project includes code adapted from:

  • Parsel (BSD License)-Used for translator submodule

Designed & crafted with ❤️ by Karim Shoair.