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.
npx skills add xyva-yuangui/XyvaClaw --skill web-scrapergit clone --depth 1 https://github.com/xyva-yuangui/XyvaClawWrote 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.
[](https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/web-scraper)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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(增强版)
✅ 状态:增强版已上线,功能完整。
功能
核心功能
- HTTP 请求:GET/POST 请求,支持自定义 headers
- 会话管理:Cookie 持久化,会话复用
- 多模式提取:
- CSS 选择器提取
- XPath 表达式提取
- 正则表达式提取
- 并发抓取:多 URL 并发抓取(3个并发)
- 反爬虫增强:
- User-Agent 轮换
- 请求延迟随机化
- 代理支持(预留接口)
- 元数据提取:自动提取页面标题、描述、链接等
输出格式
- 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 实现,提供完整的抓取解决方案。
高级功能
- 会话持久化:自动保存和加载 Cookie
- 智能重试:网络错误自动重试
- 延迟控制:随机延迟避免封禁
- 错误处理:详细的错误信息和恢复建议
- 性能监控:记录抓取时间和大小
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.
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.
- 1mo ago First seen · 116 lines · 47 tokens per session scan A 1304dea90ca0
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.
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 /…
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.
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.
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.
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…
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.