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
累計下載
1609
星標
1
全站排名
#4,697
全站前 93% · 「資料分析」前 93%
平台累計安裝累計下載星標評論
ClawHub ↗401431--
SkillHub ↗10416091—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

它介紹將文章儲存為 Markdown、下載媒體檔案、批次處理 URL,以及按平台選擇抓取或下載策略;也列出輸出目錄、清晰度、方法、選擇器和跳過圖片等選項。部分方式可能使用瀏覽器 Cookie,訪問需登入的內容或下載檔案前應確認授權、隱私和輸出目錄,並審查不可信內容。 僅使用可信 URL,並限制網路訪問與輸出目錄。

資料釋出於 2026-10-29

可以用來做什麼

  • 將公開網頁文章整理為本地 Markdown 檔案。
  • 批次抓取 URL 列表或下載受支援平台的影片。
  • 根據網站型別和需求選擇方法、質量或媒體處理選項。

什麼時候用

  • 需要將網頁文章或影片儲存到本地時。
  • 處理需要登入態或 Cookie 的內容前,需要確認帳戶授權與隱私風險時。
  • 計劃批次下載時,已檢查 URL 與輸出目錄時。

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

從這些可信 URL 提取文章並儲存為 Markdown,列出將寫入的檔案。
下載此影片前說明使用的賬號 Cookie、儲存位置和可能的外部請求。

月度資料趨勢

累計下載1609
349102617022026-03 · 累計下載 4422026-05 · 累計下載 9402026-06 · 累計下載 10622026-07 · 累計下載 12652026-08 · 累計下載 13502026-09 · 累計下載 160926-0326-09
星標1
0112026-03 · 星標 -2026-05 · 星標 -2026-06 · 星標 -2026-07 · 星標 -2026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-091609—1
2026-081350+6.7%1
2026-071265+19.1%-
2026-061062+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),按月更新。口徑說明見資料方法。