Install
openclaw skills install wechat-article-for-aiConvert WeChat Official Account (微信公众号) articles to clean Markdown files with locally downloaded images.
openclaw skills install wechat-article-for-aiConverts WeChat public account articles into clean Markdown files with:
pip install -r requirements.txtpython main.py "https://mp.weixin.qq.com/s/ARTICLE_ID"
python main.py -f urls.txt -o ./output -v
| Flag | Description |
|---|---|
-f FILE | Text file with URLs (one per line) |
-o DIR | Output directory (default: ./output) |
-c N | Image download concurrency (default: 5) |
--no-images | Skip image download, keep remote URLs |
--no-headless | Show browser (for solving CAPTCHAs) |
--force | Overwrite existing output |
--no-frontmatter | Use blockquote metadata instead of YAML |
-v | Verbose/debug logging |
Run as an MCP server for AI tool integration:
python mcp_server.py
Exposes two tools:
convert_article(url, output_dir, download_images, concurrency, use_frontmatter) — Convert a single articlebatch_convert(urls, output_dir, download_images, concurrency) — Convert multiple articles{
"mcpServers": {
"wechat-to-md": {
"command": "python",
"args": ["mcp_server.py"],
"cwd": "<path-to-this-project>"
}
}
}
output/
<article-title>/
<article-title>.md # Markdown file with YAML frontmatter
images/
img_001.png
img_002.jpg
...
--no-headless to manually solve the CAPTCHA in the browser window, then retry.--force to retry.mp.weixin.qq.com