alexxiong

Web Fetcher

数据分析v0.1.1
作者:alexxiong更新于 2026-05-17web-fetcher@clawhub_alexxxiong/web-fetcher
网页抓取#Feishu#WeChat

据 AlphaMoat 统计,截至 2026-09,Web Fetcher 累计下载 1,609 次、获 1 个星标,在全部 5,078 个 AI 技能中排名第 4,697 位,在「数据分析」分类(399 个)中排名第 369 位。

累计安装
104
累计下载
1,609
星标
1
全站排名
#4,697
全站前 93% · 「数据分析」前 93%
平台累计安装累计下载星标评论
ClawHub ↗401,431--
SkillHub ↗1041,6091—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

它介绍将文章保存为 Markdown、下载媒体文件、批量处理 URL,以及按平台选择抓取或下载策略;也列出输出目录、清晰度、方法、选择器和跳过图片等选项。部分方式可能使用浏览器 Cookie,访问需登录的内容或下载文件前应确认授权、隐私和输出目录,并审查不可信内容。 仅使用可信 URL,并限制网络访问与输出目录。

资料发布于 2026-10-29

可以用来做什么

  • 将公开网页文章整理为本地 Markdown 文件。
  • 批量抓取 URL 列表或下载受支持平台的视频。
  • 根据网站类型和需求选择方法、质量或媒体处理选项。

什么时候用

  • 需要将网页文章或视频保存到本地时。
  • 处理需要登录态或 Cookie 的内容前,需要确认账户授权与隐私风险时。
  • 计划批量下载时,已检查 URL 与输出目录时。

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

从这些可信 URL 提取文章并保存为 Markdown,列出将写入的文件。
下载此视频前说明使用的账号 Cookie、保存位置和可能的外部请求。

月度数据趋势

累计下载1,609
3491,0261,7022026-03 · 累计下载 4422026-05 · 累计下载 9402026-06 · 累计下载 1,0622026-07 · 累计下载 1,2652026-08 · 累计下载 1,3502026-09 · 累计下载 1,60926-0326-09
星标1
0112026-03 · 星标 -2026-05 · 星标 -2026-06 · 星标 -2026-07 · 星标 -2026-08 · 星标 12026-09 · 星标 126-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-091,609—1
2026-081,350+6.7%1
2026-071,265+19.1%-
2026-061,062+13.0%-
2026-05940—-
2026-03442—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

4.6 KB · ClawHub v0.1.1
---
name: web-fetcher
description: "Smart web content fetcher - articles and videos from WeChat, Feishu, Bilibili, Zhihu, Toutiao, YouTube, etc. Triggers: '抓取文章', '下载网页', '保存文章', 'fetch URL', '下载视频', '抓取飞书文档', '抓取微信文章', '把这个链接内容保存下来', '下载B站视频', 'download video', 'scrape article'."
version: 0.1.1
license: Complete terms in LICENSE
---

# Web Fetcher

Smart web content fetcher for Claude Code. Automatically detects platform and uses the best strategy to fetch articles or download videos.
展开全部(共 126 行)

## Quick Start

```bash
# Fetch an article
python3 {SKILL_DIR}/fetcher.py "URL" -o ~/docs/

# Download a video
python3 {SKILL_DIR}/fetcher.py "https://b23.tv/xxx" -o ~/videos/

# Batch fetch from file
python3 {SKILL_DIR}/fetcher.py --urls-file urls.txt -o ~/docs/
```

## Install Dependencies

Install only what you need — dependencies are checked at runtime:

| Dependency | Purpose | Install |
|-----------|---------|---------|
| scrapling | Article fetching (HTTP + browser) | `pip install scrapling` |
| yt-dlp | Video download | `pip install yt-dlp` |
| camoufox | Anti-detection browser (Xiaohongshu, Weibo) | `pip install camoufox && python3 -m camoufox fetch` |
| html2text | HTML to Markdown conversion | `pip install html2text` |

## Smart Routing

The fetcher automatically detects the platform from the URL:

| Platform | Method | Notes |
|----------|--------|-------|
| mp.weixin.qq.com | scrapling | Extracts `data-src` images, handles SVG placeholders |
| *.feishu.cn | Virtual scroll | Collects all blocks via scrolling, downloads images with cookies |
| zhuanlan.zhihu.com | scrapling | `.Post-RichText` selector |
| www.zhihu.com | scrapling | `.RichContent` selector |
| www.toutiao.com | scrapling | Handles `toutiaoimg.com` base64 placeholders |
| www.xiaohongshu.com | camoufox | Anti-bot protection requires stealth browser |
| www.weibo.com | camoufox | Anti-bot protection requires stealth browser |
| bilibili.com / b23.tv | yt-dlp | Video download, supports quality selection |
| youtube.com / youtu.be | yt-dlp | Video download |
| douyin.com | yt-dlp | Video download |
| Unknown URLs | scrapling | Generic fetch with fallback tiers |

## CLI Reference

```
python3 {SKILL_DIR}/fetcher.py [URL] [OPTIONS]

Arguments:
  url                    URL to fetch

Options:
  -o, --output DIR       Output directory (default: current)
  -q, --quality N        Video quality, e.g. 1080, 720 (default: 1080)
  --method METHOD        Force method: scrapling, camoufox, ytdlp, feishu
  --selector CSS         Force CSS selector for content extraction
  --urls-file FILE       File with URLs (one per line, # for comments)
  --audio-only           Extract audio only (video downloads)
  --no-images            Skip image download (articles)
  --cookies-browser NAME Browser for cookies (e.g., chrome, firefox)
```

## Platform Notes

### WeChat (mp.weixin.qq.com)
- Images use `data-src` attribute with `mmbiz.qpic.cn` URLs
- Visible `<img>` tags contain SVG placeholders (lazy loading)
- Image download requires `Referer: https://mp.weixin.qq.com/` header
- Scrapling GET usually works; no browser needed

### Feishu (*.feishu.cn)
- Uses virtual scroll — content blocks are rendered on-demand
- The fetcher scrolls through the entire document, collecting `[data-block-id]` elements
- Images require authenticated fetch (cookies), downloaded via browser's fetch API
- May show "Unable to print" artifacts which are auto-cleaned

### Bilibili
- Short links (b23.tv) are auto-resolved
- For premium/member content, use `--cookies-browser chrome`
- Default quality is 1080p, adjustable with `-q`

## Troubleshooting

| Problem | Solution |
|---------|----------|
| `scrapling not found` | `pip install scrapling` |
| `yt-dlp not found` | `pip install yt-dlp` |
| Article content too short | Try `--method camoufox` for JS-heavy pages |
| Feishu returns login page | The doc may require authentication |
| Bilibili 403 | Use `--cookies-browser chrome` |
| Image download fails | Check network; WeChat images need Referer header (auto-handled) |

## Manual Usage

When the CLI doesn't fit your needs, use the modules directly:

```python
from lib.router import route, check_dependency
from lib.article import fetch_article
from lib.video import fetch_video
from lib.feishu import fetch_feishu

# Route a URL
r = route("https://mp.weixin.qq.com/s/xxx")
# {'type': 'article', 'method': 'scrapling', 'selector': '#js_content', 'post': 'wx_images'}

# Fetch article
fetch_article(url, output_dir="/tmp/out", route_config=r)

# Download video
fetch_video(url, output_dir="/tmp/out", quality="720")

# Fetch Feishu doc
fetch_feishu(url, output_dir="/tmp/out")
```

「数据分析」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。