‹ 首页

web-scraper

@guia-matthieu · 收录于 1 周前

Extract structured data from websites. Use when: collecting competitor pricing; scraping product listings; extracting contact information; gathering research data; monitoring website changes

适合你,如果需要从网页批量抓取数据进行分析或监控

/ 下载安装
web-scraper.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add guia-matthieu/clawfu-skills/web-scraper
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- guia-matthieu/clawfu-skills/web-scraper
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify guia-matthieu/clawfu-skills/web-scraper
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
132GitHub stars
~801最小装载
~3.1K含声明引用
~3.1K文本包总量
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · a69bf67

Web Scraper

Extract structured data from websites using BeautifulSoup and requests - turn any webpage into usable data.
When to Use This Skill
  • Competitor research - Scrape pricing, features, positioning
  • Lead generation - Extract contact info from directories
  • Content audit - Pull headings, links, meta data
  • Price monitoring - Track competitor pricing changes
  • Data collection - Gather research data from multiple sources
What Claude Does vs What You Decide

| Claude Does | You Decide | |-------------|------------| | Structures analysis frameworks | Strategic priorities | | Synthesizes market data | Competitive positioning | | Identifies opportunities | Resource allocation | | Creates strategic options | Final strategy selection | | Suggests implementation approaches | Execution decisions |

Dependencies
pip install beautifulsoup4 requests pandas click lxml
Commands
Scrape Elements
python scripts/main.py scrape https://example.com --selector "h1,h2,p"
python scripts/main.py scrape https://example.com --selector ".product-price"
Extract Links
python scripts/main.py links https://example.com
python scripts/main.py links https://example.com --internal-only
Extract Emails
python scripts/main.py emails https://example.com
python scripts/main.py emails https://example.com --depth 2
Extract Structured Data
python scripts/main.py structured https://example.com/article --schema article
python scripts/main.py structured https://example.com/product --schema product
Examples
Example 1: Scrape Competitor Pricing
python scripts/main.py scrape https://competitor.com/pricing --selector ".price,.plan-name"

# Output:
# Extracted 6 elements
# 1. Starter - $29/mo
# 2. Pro - $99/mo
# 3. Enterprise - Contact us
Example 2: Extract Article Content
python scripts/main.py structured https://blog.example.com/post --schema article

# Output: article_data.json
# {
#   "title": "How to Scale Your Startup",
#   "author": "Jane Doe",
#   "date": "2024-01-15",
#   "content": "...",
#   "word_count": 1523
# }
CSS Selector Reference

| Selector | Description | Example | |----------|-------------|---------| | tag | Element type | h1, p, div | | .class | Class name | .price, .title | | #id | Element ID | #main-content | | tag.class | Tag with class | div.product | | tag[attr] | Has attribute | a[href] | | parent > child | Direct child | ul > li | | tag1, tag2 | Multiple | h1, h2, h3 |

Ethical Scraping Guidelines
  1. Check robots.txt - Respect site's scraping policy
  2. Rate limit - Don't overload servers (1-2 req/sec)
  3. Identify yourself - Use descriptive User-Agent
  4. Cache requests - Don't re-scrape unchanged pages
  5. Terms of Service - Check if scraping is allowed
Skill Boundaries
What This Skill Does Well
  • Structuring strategic analysis
  • Identifying market opportunities
  • Creating strategic frameworks
  • Synthesizing competitive data
What This Skill Cannot Do
  • Replace market research
  • Guarantee strategic success
  • Know proprietary competitor info
  • Make executive decisions
Related Skills
  • [competitor-monitor](../competitor-monitor/) - Monitor competitor changes
  • [pdf-extractor](../pdf-extractor/) - Extract from PDFs
Skill Metadata
  • Mode: centaur
category: automation
subcategory: data-extraction
dependencies: [beautifulsoup4, requests, pandas]
difficulty: intermediate
time_saved: 5+ hours/week
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。