SuperAPI AI Directory

fetch-wx-article

Writing & research

View repository

Updated 10-15 17:26

About this skill

Fetch WeChat Article - 获取微信公众号文章

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:

  1. The user shares a WeChat public account article link (mp.weixin.qq.com/s/xxx format)
  2. Need to extract the plain text content of an article
  3. 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 scrapling to handle complex WeChat public account pages
  • Uses html2text to 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.