AI Agent Hub
Back to skills
WeChat Official Account Article Fetcher icon

WeChat Official Account Article Fetcher

Data Analysis Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please refer to https://skillhub.cn/install/skillhub.md to install @user_6eb4c6c0/wxpublic-fetch.

About this skill

The Specific Problem

WeChat Official Account articles are scattered across a timeline. Manually opening and copying each one for batch analysis, archiving, or offline reading is inefficient. You also have to contend with image hotlink protection, format conversion, and file organization.

How the Skill Works

This skill provides an automated pipeline to fetch all articles from a specified Official Account within a date range and save them as local Markdown files. The workflow is divided into five clear steps:

  1. Smart Parameter Parsing: You only need to provide the account name and an optional date range (defaults to the last week). The skill automatically reads the necessary AppID and SecureKey from parameters or environment variables. If the time span exceeds 60 days, it will proactively warn about potential costs and await confirmation.
  2. Precise Article Listing: The skill calls a backend script (wxpublic_list.py) to retrieve a complete list of all article URLs and their publication dates within the target range, ensuring strict one-to-one mapping.
  3. Batch Parallel Fetching: This is the core capability. The skill uses multiple threads (default 5 for url2md) to efficiently convert each article's HTML to Markdown. Simultaneously, another set of threads (default 8) downloads images. All images are saved to a shared images/ directory to avoid duplicate downloads.
  4. Error Handling and Retry: For a failed conversion of a single article, the system automatically retries once to maximize success rates. Whether it's an API balance issue or a conversion error, it provides a clear prompt.
  5. Summary and Indexing: After processing, the file paths of all successfully converted .md files, along with their dates and original URLs, are compiled and stored in the conversation context. This makes it easy to directly summarize or query these articles later.

Applicability and Notes

Please confirm the following before use:

  • Credentials Required: You must have a WeChat Official Account platform AppID and SecureKey. Register at wxpub.aibana.art to obtain them, and provide them via --app-id / --secret parameters or the WXPUBLIC_APP_ID / WXPUBLIC_SECURE_KEY environment variables.
  • Time and Cost: While you can query a long time range, requests over 60 days will trigger a secondary confirmation due to potentially high API call volume and cost.
  • File Naming: Generated Markdown filenames automatically remove illegal characters like /\:*?"| to ensure compatibility across operating systems.
  • Image Handling: For images from mmbiz.qpic.cn, the script attempts to download them by following redirects (-L). If this fails, the original image URL is retained in the Markdown.

Use Cases

  • A market analysis team needs to fetch all articles from a target competitor's Official Account within the last quarter to analyze its content strategy, publishing frequency, and hot topics.
  • Academic researchers need to batch download all historical articles from an authoritative Official Account for a social media communication study, converting them to plain text for text mining and sentiment analysis.
  • A content operations specialist plans to export a series of original articles from an Official Account into structured Markdown files for easy compilation into digital documents or import into a knowledge base system.
  • Data engineers need to regularly automate the fetching of the latest article content from multiple industry Official Accounts as a data source input into the company's public opinion monitoring platform or machine learning training pipeline.

Best For

  • Market Analysts: Need to regularly scrape content data from competitor or industry Official Accounts for market analysis reports and trend forecasting.
  • Academic Researchers: Need to collect large volumes of Official Account articles in a specific field as a corpus for social media studies or computational social science analysis.
  • Content Planners and Operators: Need to export and convert Official Account article content for cross-platform publishing, content consolidation, or knowledge accumulation.
  • Software Developers: Need to automatically fetch Official Account article data via APIs or scripts for integration into custom data processing tools, applications, or databases.