Skip to content

scraplingvsphpscraper

BSD-3-Clause 7 2 36,206
397.4 thousand (month) Aug 01 2024 0.4.5(2026-04-07 04:22:27 ago)
583 2 28 GPL-3.0-or-later
May 04 2020 104 (month) 3.0.0(2024-04-09 15:34:59 ago)

Scrapling is an adaptive web scraping framework for Python that introduces "self-healing" selectors — selectors that can track and find elements even when the website's DOM structure changes. This solves one of the biggest maintenance headaches in web scraping: broken selectors after website updates.

Key features include:

  • Self-healing selectors Scrapling uses smart element matching that can identify target elements even after the page structure changes. It builds a fingerprint of the element based on multiple attributes (text, position, siblings, attributes) and uses fuzzy matching to relocate it.
  • Multiple parsing backends Supports different parsing engines including lxml (fast) and a custom engine, allowing you to choose the right balance of speed and features.
  • Scrapy-like Spider API Provides a familiar Spider class pattern for organizing crawling logic, similar to Scrapy but with the added benefit of adaptive selectors.
  • CSS and XPath selectors Full support for CSS selectors and XPath, plus the adaptive matching system on top.
  • Type hints and modern Python Built with full type annotations and 92% test coverage for reliability.
  • Async support Supports asynchronous crawling for efficient concurrent scraping.

Scrapling gained massive traction in 2025 as one of the most starred new Python scraping libraries. It is particularly useful for scraping targets that frequently update their HTML structure, where traditional selector-based scrapers would break.

PHPScraper is a universal web-util for PHP. The main goal is to get stuff done instead of getting distracted with selectors, preparing & converting data structures, etc. Instead, you can just go to a website and get the relevant information for your project.

PHPScraper is a minimalistic scraper framework that is built on top of other popular scraping tools.

Features:

  • Direct access to page basic features like: Meta data, Links, Images, Headings, Content, Keywords etc.
  • File downloading.
  • RSS, Sitemap and other feed processing.
  • CSV, XML and JSON file processing.

Highlights


css-selectorsxpathfastpopular

Example Use


```python from scrapling import Fetcher, StealthFetcher, PlayWrightFetcher # Simple fetching with adaptive parsing fetcher = Fetcher() page = fetcher.get("https://example.com/products") # CSS selectors work as expected products = page.css(".product-card") for product in products: name = product.css_first(".name").text() price = product.css_first(".price").text() print(f"{name}: {price}") # Adaptive selector - finds the element even if DOM changes # Uses element fingerprinting for resilient matching element = page.find("Product Title", auto_match=True) # Stealth fetching with anti-bot bypass stealth = StealthFetcher() page = stealth.get("https://protected-site.com") # Playwright-based fetching for JS-rendered pages pw = PlayWrightFetcher() page = pw.get("https://spa-example.com", headless=True) ```
```javascript // create scraper object $web = new \Spekulatius\PHPScraper\PHPScraper; // go to URL $web->go('https://test-pages.phpscraper.de/content/selectors.html'); // elements can be found using XPath: echo $web->filter("//*[@id='by-id']")->text(); // "Content by ID" // or pre-defined variables covering basic page data: $web->links; // for all links $web->headings; $web->images; $web->contentKeywords; $web->orderedLists; $web->unorderedLists; $web->paragraphs; $web->outline; // basic page outline $web->cleanOutlineWithParagraphs; // basic page outline ```

Alternatives / Similar


Was this page helpful?