scrapling

scrapling is a skill for Claude Code, Codex from KCNyu/clawock. It costs 0 tokens per session (998 once invoked), scanned A, original, MIT.

A Python framework for collecting information from websites, including pages whose content is created by JavaScript. It provides CSS and XPath selectors for extracting text, links, and other page data, and includes browser-based fetching for sites with anti-bot checks.

In plain words
What is it for?
Use it to fetch web pages, extract titles, text, links, attributes, and selected elements, or scrape JavaScript-heavy sites with a headless browser.
Why use it?
It reduces the need to rewrite scraping code when a website’s structure changes. It also covers both quick static requests and browser-rendered pages in one tool.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kcnyu/clawock/scrapling
Any agent
npx skills add KCNyu/clawock --skill scrapling
Clone the repo
git clone --depth 1 https://github.com/KCNyu/clawock

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scrapling

README.md
[![agentmods](https://agentmods.dev/badge/skills/kcnyu/clawock/scrapling.svg)](https://agentmods.dev/skills/kcnyu/clawock/scrapling)
Your own site
<a href="https://agentmods.dev/skills/kcnyu/clawock/scrapling"><img src="https://agentmods.dev/badge/skills/kcnyu/clawock/scrapling.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 998 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00998
Opus 5 $0.00000 $0.00499
Sonnet 5 $0.00000 $0.00200
Haiku 4.5 $0.00000 $0.00100

Measured 3d ago against content hash e45852302340, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scrapling scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

sp = StealthyFetcher.fetch(url, headless=True, network_idle=True)
skills/scrapling/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Scrapling Web Scraping

简介

Scrapling 是一个自适应 Web 爬虫框架,能自动适应网站结构变化、支持绕过反爬(Cloudflare Turnstile 等),从单次请求到大规模爬取均可。

安装: pip3 install scrapling --break-system-packages(依赖:playwright, browserforge, patchright, msgspec)

核心 API

Fetcher 类(静态爬取,快速但无 JS 支持)

from scrapling.fetchers import Fetcher
p = Fetcher.get('https://example.com')
title = p.css('h1::text').get()
links = p.css('a::attr(href)').getall()

StealthyFetcher(绕过反爬,支持 JS 渲染)

from scrapling.fetchers import StealthyFetcher
sp = StealthyFetcher.fetch('https://example.com', headless=True)
title = sp.css('h1::text').get()
text = sp.css('p::text').get()
href = sp.css('a::attr(href)').get()

参数:

  • headless=True:无头浏览器模式
  • network_idle=True:等待网络空闲
  • adaptive=True:自适应网站结构变化

CSS 选择器

# 获取文本
p.css('h1::text').get()          # 单个值
p.css('p::text').getall()        # 全部

# 获取属性
p.css('a::attr(href)').get()     # 获取 href 属性

# 选择特定元素
p.css('.product')[0]             # 第一个
p.css('#id')                     # 按 id
p.css('.product h2')             # 嵌套

# 按内容过滤
p.css('h1:contains("Phone")::text').get()

XPath 选择器

title = p.xpath('//h1//text()').get()
p.xpath('//*[@class="product"]')
p.xpath('//a/@href')

链式选择

p.css('.product')[0].css('h2::text').get()
p.xpath('//div')[0].css('span::text').get()

自适应模式(网站结构变化时仍能找到元素)

# 第一次抓取时保存选择器映射
products = page.css('.product', auto_save=True)
# 之后网站改版,加 adaptive=True 自动适应
products = page.css('.product', adaptive=True)

Spider 框架(大规模爬取)

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()

常用模式

# 简单静态页面
from scrapling.fetchers import Fetcher
p = Fetcher.get('https://example.com')
print(p.css('title::text').get())

# 有反爬的动态页面
from scrapling.fetchers import StealthyFetcher
sp = StealthyFetcher.fetch(url, headless=True, network_idle=True)

# POST 请求
p = Fetcher.post('https://example.com/api', json={'key': 'value'})

# 带 Header
from scrapling.fetchers import Fetcher
p = Fetcher.configure(headers={'User-Agent': '...'}).get('https://example.com')

Read the full file on GitHub · 126 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 126 lines · 0 tokens per session scan A e45852302340

Subscribe to this mod's changes

scrapling is a skill published in the GitHub repository KCNyu/clawock (14 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 998 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

agenthub-models

Call model APIs through @prismshadow/agenthub — streaming text generation, image generation, speech synthesis, embeddings and the supported-model registry with one client.

Prism-Shadow/penguin-harness · 37 tokens

remote-claude-code

Run Claude Code on a remote host over SSH — a persistent expect-driven login session, headless claude -p with the stdin fix, the interactive TUI inside a remote tmux driven by send-keys/capture-pane (one keystroke at a time, capture-verified; relayed user messages go through verbatim), and multi-turn continuity via…

Prism-Shadow/penguin-harness · 107 tokens

data-access

A 股零鉴权取数手册。当需要真实的行情 / 市值 / 估值快照、季度报告期累计财务数据、机构一致预期 EPS、PE 历史序列、公告标题、日 K 线、交易日历时使用;只允许运行本 skill 登记的脚本取数(腾讯 / 新浪 / 同花顺 / baostock / 深交所 / 东财),禁止凭模型记忆给数,禁止自造爬虫。概念解释、观点讨论等不需要取数的话题不要加载。.

simonlin1212/Vibe-Research · 127 tokens

skill-porting

Install skills from external ecosystems into this agent's agentstate/skills/ — resolve Claude Code plugin marketplaces, the Codex plugin repo, skills.sh registry names, GitHub repos, or local folders to their skill directories, review every file, and normalize SKILL.md frontmatter to the Penguin format.

Prism-Shadow/penguin-harness · 64 tokens

web-design

Penguin visual language for generated web pages and app UIs — GitHub-style simplicity with a single blue accent, light and pure-black dark themes, design tokens, component and chat-interface recipes, plus an opt-in warm paper editorial theme.

Prism-Shadow/penguin-harness · 51 tokens

penguin-harness-frontend

Use when changing the PenguinHarness Web App (packages/web) — adding or restyling any UI, picking a status colour, adding an icon, laying out a row or a form field, writing user-facing copy, or building a popup. Covers the semantic tone tokens, the icon size/stroke/gap scale, the semantic-versus-formatting rule for…

Prism-Shadow/penguin-harness · 104 tokens