wechat-article-fetcher

Fetch WeChat public account articles into Markdown with locally downloaded image assets.

4|Updated May 20, 2024
One-click install
npx skills add https://github.com/SpreadZhao/spreadconfig --skill wechat-article-fetcher-spreadzhao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wechat-article-fetcher
Source: https://github.com/SpreadZhao/spreadconfig/tree/main/skills/local/wechat-article-fetcher
Command: npx skills add https://github.com/SpreadZhao/spreadconfig --skill wechat-article-fetcher-spreadzhao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? WeChat public account articles are hard to archive: images live on the mmbiz.qpic.cn CDN, pages may show CAPTCHA redirects, and raw copies contain WeChat UI noise. This Skill converts an mp.weixin.qq.com article URL into a clean local Markdown file with all images downloaded to a sibling assets directory and links rewritten to relative paths. ## Core Features & Use Cases - Multi-backend fetching: Tries a configurable wechat-article-exporter API, then Jina Reader, then defuddle.md, then raw HTML, and detects CAPTCHA or verification pages. - Local image archiving: Downloads every Markdown and HTML image into an assets folder, rewrites links to relative paths, and fails loudly on download errors unless best-effort mode is enabled. - WeChat UI cleanup: Removes slide prompts, mini-program controls, repeated author lines, and inserts an H1 title from frontmatter metadata. - Use Case: Archive a 微信公众号 tutorial offline by running the bundled Python script with the article URL, producing article.md plus an article_assets folder ready for a notes vault or static site. ## Quick Start Ask the assistant to fetch a WeChat article URL and save it as Markdown with images downloaded into a local assets folder using the bundled fetch_wechat_article.py script.

Frequently Asked Questions about wechat-article-fetcher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save a WeChat article as Markdown with local images?

Run the bundled fetch_wechat_article.py script with the article URL and an output path, for example python3 fetch_wechat_article.py URL -o article.md. It downloads all images into an article_assets directory and rewrites Markdown image links to relative local paths.

What Python packages are needed to fetch WeChat articles?

No third-party packages are required; the script uses only the Python 3 standard library such as urllib, re, and argparse. On NixOS without a global Python, run it via nix shell nixpkgs#python3.

Why does fetching a WeChat article return a CAPTCHA or verification page?

WeChat sometimes serves verification pages instead of article content, detected via markers like environment anomaly text. The script then falls back through Jina Reader, defuddle.md, and raw HTML, and a configured wechat-article-exporter API via WECHAT_API_URL can bypass this.

Can I archive a WeChat article even if some images fail to download?

Yes, pass --best-effort-images to keep remote links for images that fail instead of aborting. By default the script fails on any image download error so archives never silently keep broken remote links.

Does the script handle WeChat captcha redirect URLs?

Yes, it unwraps wappoc_appmsgcaptcha redirect URLs by extracting the target_url query parameter before fetching. This lets you paste the redirected link directly without manually recovering the original article URL.