Extract the full text of a WeChat public account article into clean Markdown.
This skill is a source reader — it extracts and returns text. It does not summarize, rewrite, translate, or produce video.
How It Works
WeChat blocks external access to public account articles through User-Agent detection: the server checks for the MicroMessenger keyword and rejects normal browser requests.
This skill sends HTTP requests with a genuine WeChat iOS WebView User-Agent and the correct Referer header, which is sufficient to receive the full article HTML. No login, cookie, or API key is needed.
Extracts: title, author, publish time, and body text as Markdown.
Limitations:
- Images are not downloaded (WeChat uses lazy-loaded
data-src) - Some heavily JS-rendered articles may return partial content
- Rapid successive calls from the same IP may trigger CAPTCHA (wait and retry)
- Does not work on login-gated or paid articles
Locate The Skill
WX_HOME="$(
for d in "$(pwd)/.codex/skills/rn-wechat-extract" \
"$(pwd)/.agents/skills/rn-wechat-extract" \
"$(pwd)/.claude/skills/rn-wechat-extract" \
"$(pwd)/rnskill/skills/rn-wechat-extract" \
"$HOME/.codex/skills/rn-wechat-extract" \
"$HOME/.agents/skills/rn-wechat-extract" \
"$HOME/.claude/skills/rn-wechat-extract"; do
[ -f "$d/SKILL.md" ] && echo "$d" && break
done
)"
export WX_HOME
Workflow
-
Health check (optional):
python3 "$WX_HOME/scripts/fetch_wechat.py" --doctor -
Extract article:
python3 "$WX_HOME/scripts/fetch_wechat.py" "<mp.weixin.qq.com URL>" \ --output-dir "<desired output directory>" -
The script prints a JSON result to stdout:
{ "status": "ok", "title": "文章标题", "author": "公众号名称", "publish_time": "2026-07-14 00:18", "char_count": 7025, "output_path": "path/to/extracted.md" } -
Read the output file and present the full text or pass it to the next skill.
-
On failure:
- Exit 1 (fetch/CAPTCHA): suggest retry after a few minutes or ask the user to paste text
- Exit 2 (parse failure): rerun with
--rawto save HTML for debugging
Command Reference
fetch_wechat.py <url> [options]
Arguments:
url mp.weixin.qq.com article URL
Options:
--output-dir <dir> Output directory (default: current directory)
--raw Also save the raw HTML alongside the Markdown
--doctor Check dependencies and exit
No external dependencies — Python stdlib only (urllib, re, html, json).
Integration Examples
This skill provides text for any downstream content workflow:
| Scenario | Call chain |
|---|---|
| Rewrite article into video script | rn-wechat-extract → rewrite skill |
| Save article as topic idea | rn-wechat-extract → topic management |
| Read and discuss an article | rn-wechat-extract (standalone) |
| Turn article into image cards | rn-wechat-extract → content adaptation |