web-content-fetcher
Extract article content from any URL as clean Markdown. Uses Scrapling script as primary method (with auto fast→stealth fallback), Jina Reader as alternative for simple pages. Preserves headings, links, images, lists, and code blocks. Use this skill whenever the user wants to fetch, read, extract, scrape, or summarize content from a URL — including blog posts, news articles, WeChat articles (微信公众号), documentation pages, or any web page. Also trigger when the user says things like "帮我读一下这篇文章", "抓取这个网页", "提取正文", or "read this page for me".
- License 许可
- Apache-2.0
- 最近更新
- 2026-08-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- web-content-fetcher
- description
- Extract article content from any URL as clean Markdown. Uses Scrapling script as primary method (with auto fast→stealth fallback), Jina Reader as alternative for simple pages. Preserves headings, links, images, lists, and code blocks. Use this skill whenever the user wants to fetch, read, extract, scrape, or summarize content from a URL — including blog posts, news articles, WeChat articles (微信公众号), documentation pages, or any web page. Also trigger when the user says things like "帮我读一下这篇文章", "抓取这个网页", "提取正文", or "read this page for me".
02 资源文件 4
- 其他.gitignore14 B
- 参考文档README.md6.1 KB
- 参考文档requirements.txt30 B
- 脚本scripts/fetch.py9.5 KB
03 SKILL.md 正文
Web Content Fetcher
Given a URL, return its main content as clean Markdown — headings, links, images, lists, code blocks all preserved.
Extraction Strategy
Always try one method per URL — don't cascade blindly. Pick the right one upfront.
URL
│
├─ 1. Scrapling script (preferred)
│ Run fetch.py — check the domain routing table to decide fast vs --stealth.
│ Works for most sites. Returns clean Markdown directly.
│
└─ 2. Jina Reader (fallback — only if Scrapling fails or dependencies not installed)
web_fetch("https://r.jina.ai/<url>")
Free tier: 200 req/day. Fast (~1-2s), good Markdown output.
Does NOT work for: WeChat (403), some Chinese platforms.
Scrapling script
python3 <SKILL_DIR>/scripts/fetch.py "<url>" [max_chars] [--stealth]
<SKILL_DIR> is the directory where this SKILL.md lives. Resolve it before calling the script.
The script has two modes built in:
- Default (fast): HTTP fetch, ~1-3s, works for most sites
--stealth: Headless browser, ~5-15s, for JS-rendered or anti-scraping sites
When run without --stealth, the script automatically falls back to stealth if the fast result has too little content. So you rarely need to specify --stealth manually — the only reason to force it is when you already know the site needs it (see routing table), which saves the initial fast attempt.
Domain Routing
Use this table to pick the right mode on the first call:
| Domain | Command | Why |
|---|---|---|
mp.weixin.qq.com |
fetch.py <url> |
Fast mode usually produces cleaner article Markdown; automatically falls back to stealth when needed |
zhuanlan.zhihu.com |
fetch.py <url> --stealth |
Anti-scraping + JS |
juejin.cn |
fetch.py <url> --stealth |
JS-rendered SPA |
sspai.com |
fetch.py <url> |
Static HTML |
blog.csdn.net |
fetch.py <url> |
Static HTML |
ruanyifeng.com |
fetch.py <url> |
Static blog |
openai.com |
fetch.py <url> |
Static HTML |
blog.google |
fetch.py <url> |
Static HTML |
| Everything else | fetch.py <url> |
Auto-fallback handles it |
Script Options
# Basic — auto-selects fast or stealth
python3 <SKILL_DIR>/scripts/fetch.py "https://sspai.com/post/73145"
# Force stealth only when the fast result is incomplete
python3 <SKILL_DIR>/scripts/fetch.py "https://mp.weixin.qq.com/s/xxx" --stealth
# Limit output to 15000 characters (default: 30000)
python3 <SKILL_DIR>/scripts/fetch.py "https://example.com/article" 15000
# JSON output with metadata (url, mode, selector, content_length, metadata, content)
python3 <SKILL_DIR>/scripts/fetch.py "https://example.com" --json
Install Dependencies
First use only — the script checks and tells you if anything is missing:
pip install 'scrapling[fetchers]' html2text
If on system-managed Python (macOS/Linux), add --break-system-packages or use a venv.
For stealth mode, install the browser once with python3 -m patchright install chromium.
FlyWiki Adapter Contract
FlyWiki invokes this skill only for mp.weixin.qq.com/s/... URLs through its
WeChatPublicAccountFetcher. Keep scripts/fetch.py <url> <max_chars> --json
backward compatible, including its fast-to-stealth fallback. JSON output must
contain content and may include metadata.title,
metadata.author, and metadata.published_at. Failures must exit non-zero or
return an error field so FlyWiki can continue to the generic capture fallback.
Failure Rules
- Same URL fails once → give up, tell the user "unable to extract content from this URL"
- Do not retry — each failed call wastes context tokens
04 同仓库更多 Skills
writing-shape
Writing, exploit — shape raw material into an article, paragraph by paragraph.
writing-great-skills
Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.
writing-fragments
Writing, explore — mine raw fragments, no structure yet.
writing-beats
Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.
teach
Teach the user a new skill or concept, within this workspace.
qa
Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues. Explores the codebase in the background for context and domain language. Use when user wants to report bugs, do QA, file issues conversationally, or mentions "QA session".