web-scraper

web-scraper is a skill for Claude Code, Codex from xyva-yuangui/XyvaClaw. It costs 47 tokens per session (976 once invoked), scanned A, original, MIT.

A command-line web scraper that can send HTTP GET or POST requests and extract data with CSS selectors, XPath, or regular expressions. It also supports saved sessions, concurrent requests, page metadata, and JSON output.

In plain words
What is it for?
Use it to fetch pages, extract titles or other fields, reuse cookies, scrape several URLs concurrently, perform a health check, and save structured results.
Why use it?
It removes the need to write separate scraping code for common extraction methods, session reuse, and multiple URLs.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to fetch pages, extract titles or other fields, reuse cookies, scrape several URLs concurrently, perform a health check, and save structured results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xyva-yuangui/xyvaclaw/web-scraper
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.

Any agent
npx skills add xyva-yuangui/XyvaClaw --skill web-scraper
Clone the repo
git clone --depth 1 https://github.com/xyva-yuangui/XyvaClaw

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 web-scraper

README.md
[![agentmods](https://agentmods.dev/badge/skills/xyva-yuangui/xyvaclaw/web-scraper/github.svg)](https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/web-scraper)
Your own site
<a href="https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/web-scraper"><img src="https://agentmods.dev/badge/skills/xyva-yuangui/xyvaclaw/web-scraper/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for web-scraper

Your own site · 80×15
<a href="https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/web-scraper"><img src="https://agentmods.dev/badge/skills/xyva-yuangui/xyvaclaw/web-scraper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 976 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00047 $0.00976
Opus 5.5 $0.00019 $0.00390
Sonnet 5.5 $0.00009 $0.00195
Haiku 4.5 $0.00005 $0.00098

Measured 1mo ago against content hash 1304dea90ca0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

web-scraper scanned grade A with 0 findings 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 1mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/check.py, scripts/scraper_cli.py, scripts/scraper_enhanced.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

config-base/workspace/skills/web-scraper/SKILL.md · 116 lines

How it starts

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

🕷️ web-scraper(增强版)

✅ 状态:增强版已上线,功能完整。

功能

核心功能

  1. HTTP 请求:GET/POST 请求,支持自定义 headers
  2. 会话管理:Cookie 持久化,会话复用
  3. 多模式提取:
    • CSS 选择器提取
    • XPath 表达式提取
    • 正则表达式提取
  4. 并发抓取:多 URL 并发抓取(3个并发)
  5. 反爬虫增强:
    • User-Agent 轮换
    • 请求延迟随机化
    • 代理支持(预留接口)
  6. 元数据提取:自动提取页面标题、描述、链接等

输出格式

  • JSON 结构化数据
  • 保存到 __LEGACY_HOME__/.openclaw/output/scraping/
  • 会话保存到 __LEGACY_HOME__/.openclaw/sessions/web-scraper/

使用方法

通过技能调用

用户说"抓取网页"或"提取数据"时自动触发。

命令行接口

# 健康检查
python3 scripts/scraper_cli.py --check

# 基础抓取
python3 scripts/scraper_cli.py --url "https://example.com" --css '{"title": "h1"}'

# 使用会话
python3 scripts/scraper_cli.py --url "https://example.com" --session "my_session"

# XPath 提取
python3 scripts/scraper_cli.py --url "https://example.com" --xpath '{"title": "//h1/text()"}'

# 正则提取
python3 scripts/scraper_cli.py --url "https://example.com" --regex '{"emails": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"}'

# 并发抓取
python3 scripts/scraper_cli.py --urls "https://example1.com" "https://example2.com" --concurrent

# 指定输出文件
python3 scripts/scraper_cli.py --url "https://example.com" --output "result.json"

# 会话管理
python3 scripts/scraper_cli.py --list-sessions
python3 scripts/scraper_cli.py --clear-session --session "old_session"

Python API

from scraper_enhanced import scrape_enhanced, SessionManager, DataExtractor

# 简单抓取
result = scrape_enhanced(
    url="https://example.com",
    selectors={"title": "h1", "content": ".article"},
    session_name="my_session"
)

# 使用会话管理器
session = SessionManager("test_session")
fetch_result = session.fetch("https://example.com")

# 使用数据提取器
extractor = DataExtractor(fetch_result["content"])
css_data = extractor.extract_css({"title": "h1"})
xpath_data = extractor.extract_xpath({"title": "//h1/text()"})

技术实现

基于 requests + BeautifulSoup4 + lxml 实现,提供完整的抓取解决方案。

高级功能

  1. 会话持久化:自动保存和加载 Cookie
  2. 智能重试:网络错误自动重试
  3. 延迟控制:随机延迟避免封禁
  4. 错误处理:详细的错误信息和恢复建议
  5. 性能监控:记录抓取时间和大小

Read the full file on GitHub · 116 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 116 lines · 47 tokens per session scan A 1304dea90ca0

Subscribe to this mod's changes

web-scraper is a skill published in the GitHub repository xyva-yuangui/XyvaClaw (21 stars, last pushed 2mo ago), licensed MIT. It adds 47 tokens to every session and 976 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. 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

ha-browser

Hope Agent browser automation — the standard status → tabs → snapshot → act loop, stale-ref recovery rules, and what to do when login / 2FA / captcha / camera-prompt / dialog blocks progress. Load this skill whenever you reach for the browser tool. Trigger on: user asks the agent to open / control / click / scrape /…

shiwenwen/hope-agent · 140 tokens

web_scraper

Scrape and extract content from web pages. Supports extracting text, links, headings, and structured data. Use when the user asks to read a web page, extract information from a URL, or scrape website content.

ericwang915/PythonClaw · 47 tokens

playwright

Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via playwright-cli or the bundled wrapper script.

netease-youdao/LobsterAI · 45 tokens

interactive-map

Shows an interactive Google Maps view for a given location (city, landmark, address) or for the user's own current position. Use when the user asks to show, display, or find a place on a map, or to show where they are.

jgouviergmail/LIA-Assistant · 53 tokens

chrome-browser

Read this skill before the first step that uses Claude in Chrome, the browser extension whose tools are named mcpclaude-in-chrome (also called Chrome, the browser extension, or the external browser) and which acts in the person's real Chrome with their own sign-ins; before those tools are turned on there may be a…

asgeirtj/system_prompts_leaks · 176 tokens

add-tavily-tool

Add Tavily Search and Extract as keyless remote MCP tools for selected NanoClaw agent groups. Use when installing Tavily web search or URL extraction without an API key.

nanocoai/nanoclaw · 41 tokens