A skill for extracting content from WeChat public account article links.
Quick Start
python3 scripts/fetch_wx_article.py https://mp.weixin.qq.com/s/xxx
Install Dependencies
Dependencies must be installed before use:
pip install "scrapling[ai]" html2text
Usage Instructions
Use this Skill in the following cases:
- The user shares a WeChat public account article link (
mp.weixin.qq.com/s/xxxformat) - Need to extract the plain text content of an article
- Need to obtain information such as title, author, and body text
Output Format
- Returns plain text content in Markdown format
- Links and images are ignored by default (the script can be adjusted as needed)
Script Features
scripts/fetch_wx_article.py Supports:
- Pass the article URL via command-line argument
- Error handling and exception prompts
- Function encapsulation for easy invocation
- Automatically converts HTML to Markdown
Technical Notes
- Uses
scraplingto handle complex WeChat public account pages - Uses
html2textto convert HTML to Markdown - Supports WeChat public account article links:
https://mp.weixin.qq.com/s/xxx
Precautions
- Requires a network connection
- WeChat public account articles usually contain complex CSS/JS, and scrapling is specifically designed to handle such scenarios
Extract content from WeChat public accounts for subsequent processing and archiving.