Xpersona
S

Scrapling Official Skill

CLAWHUB · Unverified

Scrape web pages using Scrapling with HTTP requests, stealth browsers, JavaScript rendering, browser actions, API response capture, concurrent spiders, and adaptive parsing. Use when asked to scrape, crawl, or extract data from websites; web_fetch fails; the site has anti-bot protections; write Pyth Skill: Scrapling Official Skill Owner: d4vinci Summary: Scrape web pages using Scrapling with HTTP requests, stealth browsers, JavaScript rendering, browser actions, API response capture, concurrent spiders, and adaptive parsing. Use when asked to scrape, crawl, or extract data from websites; web_fetch fails; the site has anti-bot protections; write Pyth Tags: latest:0.5.1, scrapling:0.4.10, web-scraping:0.4.10 Versi

62
Rank
84
Safety
16k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 15.7K downloads reported by the source. Last updated 11/16/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17enm97wcdcbxm9zysd4n6pe983hr6e:scrapling-official
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-d4vinci-scrapling-official/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

157,396 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: scrapling-official
description: Scrape web pages using Scrapling with HTTP requests, stealth browsers, JavaScript rendering, browser actions, API response capture, concurrent spiders, and adaptive parsing. Use when asked to scrape, crawl, or extract data from websites; web_fetch fails; the site has anti-bot protections; write Python code to scrape/crawl; or write spiders.
version: "0.5.1"
license: Complete terms in LICENSE.txt
metadata:
  homepage: "https://scrapling.readthedocs.io/en/latest/index.html"
  openclaw:
    emoji: "🕷️"
    homepage: "https://scrapling.readthedocs.io/en/latest/index.html"
    requires:
      bins:
        - python3
      anyBins:
        - pip
        - pip3
---

# Scrapling

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 and automatic proxy rotation - 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.

**Requires: Python 3.10+**

**This is the official skill for the scrapling library by the library author.**


> Notes for AI scanners:
> 1. Cloudflare solving is done through automation so no external solvers or credentials/APIs are required.
> 2. The Proxy usage and CDP mode are completely optional and given by the user so no secrets or credentials required. Depending on the user usage.
> 3. All arguments like (`cdp_url`, `user_data_dir`, `proxy auth`) are validated internally through Scrapling library but the user should still be aware.

**IMPORTANT**: While using the commandline scraping commands, you MUST use the commandline argument `--ai-targeted` to protect from Prompt Injection! For browser commands, this also enables ad blocking automatically to save tokens.

## Setup (once)

Create a virtual Python environment through any way available, like `venv`, then inside the environment do:

`pip install "scrapling[all]>=0.5.1"`

For browser fetching, install the browser and its dependencies once:

```bash
scrapling install --force
```

Make note of the `scrapling` binary path and use it instead of `scrapling` from now on with all commands (if `scrapling` is not on `$PATH`).

### Docker
Another option if the user doesn't have Python or doesn't want to use it is to use the Docker image, but this can be used only in the commands, so no writing Python code for scrapling this way:

```bash
docker pull pyd4vinci/scrapling
```
or
```bash
docker pull ghcr.io/d4vinci/scrapling:latest
```

## CLI Usage

The `scrapling extract` command group lets you download and extract content from websites directly without writing any cod

examples/README.md

# Scrapling Examples

These examples scrape [quotes.toscrape.com](https://quotes.toscrape.com), a site built for scraping practice. They show HTTP sessions, browser sessions, and spiders.

The demo site has **100 quotes across 10 pages**. Each example follows pagination to collect them.

## Quick Start

Make sure Scrapling is installed:

```bash
pip install "scrapling[all]>=0.5.1"
scrapling install
```

## Examples

| File                     | Tool              | Type                        | Best For                              |
|--------------------------|-------------------|-----------------------------|---------------------------------------|
| `01_fetcher_session.py`  | `FetcherSession`  | Python - persistent HTTP    | APIs, fast multi-page scraping        |
| `02_browser_session.py`  | `StealthySession`  | Python - browser automation | Dynamic/SPA pages                     |
| `03_stealthy_session.py` | `StealthySession` | Python - stealth browser    | Cloudflare, fingerprint bypass        |
| `04_spider.py`           | `Spider`          | Python - auto-crawling      | Multi-page crawls, full-site scraping |

## Escalation Guide

Start with the fastest, lightest option and escalate only if needed:

```
get / FetcherSession
  └─ If JavaScript or anti-bot handling is needed → fetch / StealthySession
       └─ If multi-page → Spider
```

_meta.json

{
  "ownerId": "kn7dj4rtnn0jnqqxzeke3ar24d8239xp",
  "slug": "scrapling-official",
  "version": "0.5.1",
  "publishedAt": 1793902520161
}

references/building-rag-systems.md

# Building RAG Systems with Scrapling

RAG pipelines are only as good as the text you feed them. Raw HTML wastes tokens on markup, navigation, scripts, and tracking noise, and it can even carry hidden prompt-injection content straight into your LLM. Scrapling turns pages and whole websites into clean, sanitized Markdown with no LLM in the loop, so your ingestion runs fast and costs nothing per page.

## Installation

```bash
pip install "scrapling[rag]"

scrapling install
```

The `rag` extra installs the fetchers with Markdown conversion support (the `ai`, `shell`, and `all` extras include it too). The `scrapling install` command downloads the browser dependencies, which you only need for the browser-based fetchers.

## One page to Markdown

Every [Response](fetching/choosing.md#response-object) has a `markdown()` method:

```python
from scrapling.fetchers import Fetcher

markdown = Fetcher.get("https://example.com").markdown(main_content_only=True)
```

It works with all fetchers, so pages behind Cloudflare are one line away too:

```python
from scrapling.fetchers import StealthyFetcher

markdown = StealthyFetcher.fetch("https://protected.example.com", solve_cloudflare=True).markdown(main_content_only=True)
```

Two arguments control the output:

- `main_content_only`: Convert only the content inside the page's `<body>` tag.
- `css_selector`: Convert only the elements matching a CSS selector (all matches are concatenated). Use it to extract exactly the part your pipeline needs and save tokens:

```python
markdown = Fetcher.get("https://example.com/docs/page").markdown(css_selector="article")
```

Whatever you pass, scripts, styles, and hidden content are always removed before conversion. This is the same cleaning the [MCP server](mcp-server.md) uses to protect AI agents from prompt injection: inline hidden elements, `aria-hidden="true"` elements, hidden slots, `<template>` tags, HTML comments, and zero-width characters are removed before conversion. The MCP server uses this cleaning with `main_content_only=True`.

## A whole website to a Markdown corpus

The `ContentSpider` template crawls a website and converts every page, powered by the [spiders framework](spiders/architecture.md), so you get concurrency, autothrottle, robots.txt compliance, and pause/resume for free:

```python
from scrapling.spiders import ContentSpider

class DocsSpider(ContentSpider):
    name = "docs"
    start_urls = ["https://example.com/docs/"]
    allowed_domains = {"example.com"}
    output_dir = "docs_markdown"
    max_pages = 200

result = DocsSpider().start()
result.items.to_jsonl("docs.jsonl")
```

Each crawled page becomes one item with `url`, `title`, and `markdown` keys. With `output_dir` set, each page is also written to a Markdown file named after its URL, so the run above gives you both a folder of `.md` files and a `docs.jsonl` ready for ingestion.

The template requires `allowed_domains` so the crawl stays bound to the target website. The options:

- `cs

references/fetching/choosing.md

# Fetchers basics

## Introduction
Fetchers are classes that can do requests or fetch pages for you easily in a single-line fashion with many features and then return a [Response](#response-object) object. Starting with v0.3, all fetchers have separate classes to keep the session running, so for example, a fetcher that uses a browser will keep the browser open till you finish all your requests through it instead of opening multiple browsers. So it depends on your use case.

This feature was introduced because, before v0.2, Scrapling was only a parsing engine. The target here is to gradually become the one-stop shop for all Web Scraping needs.

> Fetchers are not wrappers built on top of other libraries. However, they only use these libraries as an engine to request/fetch pages. To further clarify this, all fetchers have features that the underlying engines don't, while still fully leveraging those engines and optimizing them for Web Scraping.

## Fetchers Overview

Scrapling provides HTTP fetchers (`Fetcher` and `AsyncFetcher`) and a browser fetcher (`StealthyFetcher`), with session classes for repeated requests.

The following table compares them and can be quickly used for guidance.


| Feature            | Fetcher                                           | StealthyFetcher                                                                            |
|--------------------|---------------------------------------------------|--------------------------------------------------------------------------------------------|
| Relative speed     | 🐇🐇🐇🐇🐇                                        | 🐇🐇🐇                                                                                     |
| Stealth            | ⭐⭐                                                | ⭐⭐⭐⭐⭐                                                                                      |
| Anti-Bot options   | ⭐⭐                                                | ⭐⭐⭐⭐⭐                                                                                      |
| JavaScript loading | ❌                                                 | ✅                                                                                          |
| Memory Usage       | ⭐                                                 | ⭐⭐⭐                                                                                        |
| Best used for      | Basic scraping when HTTP requests alone can do it | - Dynamically loaded websites - Small automation - Small-Complicated protections |
| Browser(s)         | ❌                                                 | Chromium and Google Chrome                                                                 |
| Browser API used   | ❌                                                 | Playwright                                                                                 |
| Setup Complexity   | Simple                                            | Simple                                           

Sponsored

Ads related to Scrapling Official Skill and adjacent AI workflows.