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 | $0.00023 | $0.00488 |
| Sonnet 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 12d 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.
- 12d 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 1mo ago), licensed MIT. It adds 47 tokens to every session and 976 once invoked, about $0.0002 per session on Opus 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
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.
technology-search
Search tech blogs, developer forums, and IT media (TechCrunch, Hacker News, 36氪, etc.) for software and hardware industry updates with heat ranking and EN↔CN translation. Use this skill only when the topic is clearly about programming, software, hardware, AI, or IT infrastructure.
develop-web-game
Use when Codex is building or iterating on a web game (HTML/JS) and needs a reliable development + testing loop: implement small changes, run a Playwright-based test script with short input bursts and intentional pauses, inspect screenshots/text, and review console errors with rendergametotext.
imap-smtp-email
Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.
article-writer
Multi-style article creation skill. Supports 5 writing styles (deep analysis, practical guide, story-driven, opinion, news brief), including complete workflow: material collection → outline → content → formatting. Activated when users mention "write article", "write post", "create", or "draft".
skin-creator
Create and apply a two-asset LobsterAI visual skin from the user's style description. Use only when the AI Skin Designer kit supplies the structured skinpack workflow marker; do not use for ordinary theme or image requests.