Token导航 LogoToken导航

Agent Skill · 研究检索

web-scraper(网络爬虫)

web-scraper 用于处理浏览器自动化、网页检查和页面信息提取,适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

web-scraper 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 43,194。

总安装 1,004周安装 41GitHub Stars 1下载 325核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:web-scraper(网络爬虫)
来源仓库:https://github.com/igosuki/claude-skills
仓库路径:skills/web-scraper
安装命令:
npx skills add https://github.com/igosuki/claude-skills --skill web-scraper
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/igosuki/claude-skills --skill web-scraper

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

web-scraper 用于浏览器自动化、网页检查和页面信息提取。适合让 Agent 打开页面、读取网页或验证前端流程。可在 Codex、Claude、Cursor、Gemini CLI 中用于前端调试场景。安装前建议确认权限范围、维护状态及是否触发联网或文件操作。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/web-scraper

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/igosuki/claude-skills --skill web-scraper;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

web-scraper 怎么安装?

在终端执行 npx skills add https://github.com/igosuki/claude-skills --skill web-scraper。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

web-scraper 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

web-scraper 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

web-scraper 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

web-scraper 用的人多吗?

公开数据是累计安装 1,004 次,近一周安装 41 次,下载 325 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

web-scraper 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
web-scraper

网络爬虫 · 本页

1,0041需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Web Scraper

Overview

Recursively scrape web pages with concurrent processing, extracting clean text content while following links. The scraper automatically handles URL deduplication, creates proper directory hierarchies based on URL structure, filters out unwanted content, and respects domain boundaries.

When to Use This Skill

Use this skill when users request:

  • Scraping content from websites
  • Downloading documentation from online sources
  • Extracting text from web pages at scale
  • Crawling websites to gather information
  • Archiving web content locally
  • Following and downloading linked pages
  • Research data collection from web sources
  • Building text datasets from websites

Prerequisites

Install required dependencies:

pip install aiohttp beautifulsoup4 lxml aiofiles

These libraries provide:

  • aiohttp - Async HTTP client for concurrent requests
  • beautifulsoup4 - HTML parsing and content extraction
  • lxml - Fast HTML/XML parser
  • aiofiles - Async file I/O

Core Capabilities

1. Basic Single-Page Scraping

Scrape a single page without following links:

python scripts/scrape.py <URL> <output-directory> --depth 0

Example:

python scripts/scrape.py https://example.com/article output/

This downloads only the specified page, extracts clean text content, and saves it to output/example.com/article.txt.

2. Recursive Scraping with Link Following

Scrape a page and follow links up to a specified depth:

python scripts/scrape.py <URL> <output-directory> --depth <N>

Example:

python scripts/scrape.py https://docs.example.com output/ --depth 2

Depth levels:

  • --depth 0 - Only the start URL(s)
  • --depth 1 - Start URLs + all links on those pages
  • --depth 2 - Start URLs + links + links found on those linked pages
  • --depth 3+ - Continue following links to the specified depth

3. Limiting the Number of Pages

Prevent excessive scraping by setting a maximum page limit:

python scripts/scrape.py <URL> <output-directory> --depth 3 --max-pages 100

Example:

python scripts/scrape.py https://docs.example.com output/ --depth 3 --max-pages 50

Useful for:

  • Testing scraper configuration before full run
  • Limiting resource usage
  • Sampling content from large sites
  • Staying within rate limits

4. Concurrent Processing

Control the number of simultaneous requests for faster scraping:

python scripts/scrape.py <URL> <output-directory> --concurrent <N>

Example:

python scripts/scrape.py https://docs.example.com output/ --depth 2 --concurrent 20

Default is 10 concurrent requests. Increase for faster scraping, decrease for more conservative resource usage.

Guidelines:

  • Small sites or slow servers: --concurrent 5
  • Medium sites: --concurrent 10 (default)
  • Large, fast sites: --concurrent 20-30
  • Be respectful of server resources

5. Domain Restrictions

By default, the scraper only follows links on the same domain as the start URL. This can be controlled:

Same domain only (default):

python scripts/scrape.py https://example.com output/ --depth 2

Follow external links:

python scripts/scrape.py https://example.com output/ --depth 2 --follow-external

Specify allowed domains:

python scripts/scrape.py https://example.com output/ --depth 2 --allowed-domains example.com docs.example.com blog.example.com

Use --allowed-domains when:

  • Documentation is split across multiple subdomains
  • Content spans related domains
  • You want to limit to specific trusted domains

6. Multiple Start URLs

Scrape from multiple starting points simultaneously:

python scripts/scrape.py <URL1> <URL2> <URL3> <output-directory>

Example:

python scripts/scrape.py https://example.com/docs https://example.com/guides https://example.com/tutorials output/ --depth 2

All start URLs are processed with the same configuration (depth, domain restrictions, etc.).

7. Request Configuration

Customize HTTP request behavior:

python scripts/scrape.py <URL> <output-directory> --user-agent "MyBot/1.0" --timeout 60

Options:

  • --user-agent - Custom User-Agent header (default: "Mozilla/5.0 (compatible; WebScraper/1.0)")
  • --timeout - Request timeout in seconds (default: 30)

Example:

python scripts/scrape.py https://example.com output/ --depth 2 --user-agent "MyResearchBot/1.0 (+https://mysite.com/bot)" --timeout 45

8. Verbose Output

Enable detailed logging to monitor scraping progress:

python scripts/scrape.py <URL> <output-directory> --verbose

Verbose mode shows:

  • Each URL being fetched
  • Successful saves with file paths
  • Errors and timeouts
  • Detailed error information

Output Structure

Directory Hierarchy

The scraper creates a directory hierarchy that mirrors the URL structure:

output/
├── example.com/
│   ├── index.txt              # https://example.com/
│   ├── about.txt              # https://example.com/about
│   ├── docs/
│   │   ├── index.txt          # https://example.com/docs/
│   │   ├── getting-started.txt
│   │   └── api/
│   │       └── reference.txt
│   └── blog/
│       ├── post-1.txt
│       └── post-2.txt
├── docs.example.com/
│   └── guide.txt
└── _metadata.json

File Format

Each scraped page is saved as a text file with the following structure:

URL: https://example.com/docs/guide
Title: Getting Started Guide
Scraped: 2025-10-21T14:30:00

================================================================================

[Clean extracted text content]

Metadata File

_metadata.json contains scraping session information:

{
  "start_time": "2025-10-21T14:30:00",
  "end_time": "2025-10-21T14:35:30",
  "pages_scraped": 42,
  "total_visited": 45,
  "errors": {
    "https://example.com/broken": "HTTP 404",
    "https://example.com/slow": "Timeout"
  }
}

Content Extraction and Filtering

What Gets Extracted

The scraper extracts clean text content by:

  1. Focusing on main content - Prioritizes <main>, <article>, or <body> tags
  2. Removing unwanted elements - Strips out:

- Scripts and styles - Navigation menus - Headers and footers - Sidebars (aside tags) - Iframes and embedded content - SVG graphics - Comments

  1. Filtering common patterns - Removes:

- Cookie consent messages - Privacy policy links - Terms of service boilerplate - UI elements (arrows, single numbers) - Very short lines (likely navigation items)

  1. Preserving structure - Maintains line breaks between content blocks

What Gets Filtered Out

Common unwanted patterns automatically removed:

  • "Accept cookies" / "Reject all"
  • "Cookie settings"
  • "Privacy policy"
  • "Terms of service"
  • Navigation arrows (←, →, ↑, ↓)
  • Isolated numbers
  • Lines shorter than 3 characters

Common Usage Patterns

Download Documentation Site

Scrape an entire documentation site with reasonable limits:

python scripts/scrape.py https://docs.example.com docs-archive/ --depth 3 --max-pages 200 --concurrent 15

Archive a Blog

Download all blog posts from a blog (following pagination):

python scripts/scrape.py https://blog.example.com blog-archive/ --depth 2 --max-pages 500

Research Data Collection

Gather text content from multiple related sources:

python scripts/scrape.py https://research.edu/papers https://research.edu/publications research-data/ --depth 2 --allowed-domains research.edu --concurrent 20

Sample a Large Site

Test configuration on a small sample before full scrape:

python scripts/scrape.py https://largeSite.com sample/ --depth 2 --max-pages 20 --verbose

Then run full scrape after confirming results:

python scripts/scrape.py https://largeSite.com full-archive/ --depth 3 --max-pages 500 --concurrent 15

Multi-Domain Knowledge Base

Scrape across multiple authorized domains:

python scripts/scrape.py https://main.example.com knowledge-base/ --depth 3 --allowed-domains main.example.com docs.example.com wiki.example.com --max-pages 300

Implementation Approach

When users request web scraping:

  1. Identify the scope:

- What URLs to start from? - Should links be followed? How deep? - Any domain restrictions needed? - Is there a reasonable page limit?

  1. Configure the scraper:

- Set appropriate depth (typically 1-3) - Set max-pages to avoid runaway scraping - Choose concurrent level based on site size - Determine domain restrictions

  1. Run with monitoring:

- Start with verbose mode or small sample - Monitor output for errors or unexpected content - Adjust configuration if needed

  1. Verify output:

- Check the output directory structure - Review _metadata.json for statistics - Sample a few text files for quality - Check for errors in metadata

  1. Process the content:

- Text files are ready for loading into context - Use Read tool to examine specific files - Use Grep to search across all scraped content - Load files as needed for analysis

Quick Reference

Command structure:

python scripts/scrape.py <URL> [URL2 ...] <output-dir> [options]

Essential options:

  • -d, --depth N - Maximum link depth (default: 2)
  • -m, --max-pages N - Maximum pages to scrape
  • -c, --concurrent N - Concurrent requests (default: 10)
  • -f, --follow-external - Follow external links
  • -a, --allowed-domains - Specify allowed domains
  • -v, --verbose - Detailed output
  • -u, --user-agent - Custom User-Agent
  • -t, --timeout - Request timeout in seconds

Get full help:

python scripts/scrape.py --help

Best Practices

  1. Start small - Test with --depth 1 --max-pages 10 before large scrapes
  2. Respect servers - Use reasonable concurrency and timeouts
  3. Set limits - Always use --max-pages for initial runs
  4. Check robots.txt - Manually verify the site allows scraping
  5. Use verbose mode - Monitor for errors and unexpected behavior
  6. Identify yourself - Use a descriptive User-Agent with contact info
  7. Monitor output - Check _metadata.json for errors and statistics
  8. Handle errors gracefully - Review error log in metadata for problematic URLs

Troubleshooting

Common issues:

  • "Missing required dependency": Run pip install aiohttp beautifulsoup4 lxml aiofiles
  • Too many timeouts: Increase --timeout or reduce --concurrent
  • Scraping too slow: Increase --concurrent (e.g., 20-30)
  • Memory issues with large scrapes: Reduce --concurrent or use --max-pages to chunk the work
  • Following too many links: Reduce --depth or enable same-domain-only (default)
  • Missing content: Some sites may require JavaScript; this scraper only handles static HTML
  • HTTP errors: Check _metadata.json errors section for specific issues

Limitations:

  • Does not execute JavaScript (single-page apps may not work)
  • Does not handle authentication or login
  • Does not follow links in JavaScript or dynamically loaded content
  • No built-in rate limiting (use --concurrent to control request rate)

Advanced Use Cases

Loading Scraped Content

After scraping, use the Read tool to load content into context:

# Read a specific scraped page
Read file_path: output/docs.example.com/guide.txt

# Search across all scraped content
Grep pattern: "API endpoint" path: output/ -r

Selective Re-scraping

The scraper tracks visited URLs in memory during a session but doesn't persist this between runs. To avoid re-downloading:

  1. Run initial scrape with limits
  2. Check output directory for what was downloaded
  3. Run additional scrapes with different start URLs or configurations

Combining with Other Tools

Chain the scraper with other processing:

# Scrape then process with custom script
python scripts/scrape.py https://example.com output/ --depth 2
python your_analysis_script.py output/

Resources

scripts/scrape.py

The main web scraping tool implementing concurrent crawling, content extraction, and intelligent filtering. Key features:

  • Async/concurrent processing - Uses asyncio and aiohttp for high-performance concurrent requests
  • URL normalization - Removes fragments and trailing slashes for proper deduplication
  • Visited tracking - Maintains visited_urls and queued_urls sets to prevent re-downloading
  • Smart content extraction - Removes scripts, styles, navigation, and common unwanted patterns
  • Directory hierarchy - Converts URLs to safe filesystem paths maintaining structure
  • Error handling - Tracks and reports errors in metadata file
  • Metadata generation - Creates _metadata.json with scraping statistics and errors

The script can be executed directly and includes comprehensive command-line help via --help.

平台分布

Codex

33.81%
按下载量换算110

Claude

29.79%
按下载量换算97

Cursor

19.58%
按下载量换算64

Gemini CLI

9.88%
按下载量换算32

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills