Extract structured data from any web page. Supports CSS selectors, auto-detection of tables and lists, JSON/CSV output formats. Use when asked to scrape a we...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install smart-web-scraper或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install smart-web-scraper⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/smart-web-scraper/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: smart-web-scraper description: Extract structured data from any web page. Supports CSS selectors, auto-detection of tables and lists, JSON/CSV output formats. Use when asked to scrape a website, extract data from a page, pull product info, gather contact details, or collect listings from a URL. ---
Extract structured data from web pages into clean JSON or CSV.
# Scrape a page, extract all text content
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py extract "https://example.com"
# Extract specific elements with CSS selector
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py extract "https://example.com/products" -s ".product-card"
# Auto-detect and extract tables
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py tables "https://example.com/pricing"
# Extract all links from a page
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py links "https://example.com"
# Extract structured data (title, meta, headings, links)
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py structure "https://example.com"
# Output as JSON
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py extract "https://example.com" -s ".item" -f json
# Output as CSV
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py extract "https://example.com" -s "table tr" -f csv
# Save to file
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py extract "https://example.com" -s ".product" -f json -o products.json
# Multi-page scrape (follow pagination)
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py crawl "https://example.com/page/1" --pages 5 -s ".article"
| Command | Args | Description | |---------|------|-------------| | extract | | Extract content, optionally filtered by CSS selector | | tables | | Auto-detect and extract all HTML tables | | links | | Extract all links (href + text) | | structure | | Extract page structure: title, meta, headings, images, links | | crawl | | Follow pagination links, extract from multiple pages |
| Format | Flag | Description | |--------|------|-------------| | Text | -f text | Plain text (default) | | JSON | -f json | Structured JSON array | | CSV | -f csv | Comma-separated values | | Markdown | -f md | Markdown-formatted |
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py extract "https://shop.example.com" -s ".product" -f json
Output:
[
{"text": "Widget Pro - $29.99", "tag": "div", "class": "product"},
{"text": "Widget Max - $49.99", "tag": "div", "class": "product"}
]
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py tables "https://example.com/pricing" -f csv
uv run --with beautifulsoup4 --with lxml python scripts/scraper.py links "https://example.com" --external
--delay 0.5 (seconds between requests)robots.txt by default (override with --ignore-robots)beautifulsoup4 and lxml (auto-installed by uv run --with)安装 Smart Web Scraper 后,可以对 AI 说这些话来触发它
Help me get started with Smart Web Scraper
Explains what Smart Web Scraper does, walks through the setup, and runs a quick demo based on your current project
Use Smart Web Scraper to extract structured data from any web page
Invokes Smart Web Scraper with the right parameters and returns the result directly in the conversation
What can I do with Smart Web Scraper in my data & analytics workflow?
Lists the top use cases for Smart Web Scraper, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/smart-web-scraper/ 目录(个人级,所有项目可用),或 .claude/skills/smart-web-scraper/(项目级)。重启 AI 客户端后,用 /smart-web-scraper 主动调用,或让 AI 根据上下文自动发现并使用。
Smart Web Scraper 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Smart Web Scraper 可免费安装使用。请查阅仓库了解许可证信息。
Extract structured data from any web page. Supports CSS selectors, auto-detection of tables and lists, JSON/CSV output formats. Use when asked to scrape a we...
Smart Web Scraper 属于「Data & Analytics」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my data & analytics tasks using Smart Web Scraper
Identifies repetitive steps in your workflow and sets up Smart Web Scraper to handle them automatically