SuperAPI AI Directory

weixin-article-reader

Writing & research

View repository

Updated 10-15 21:35

About this skill

Weixin Article Reader

Quick Start

Use the bundled script first:

python3 scripts/read_weixin_article.py 'https://mp.weixin.qq.com/s/...' --format md

For machine-readable output:

python3 scripts/read_weixin_article.py 'https://mp.weixin.qq.com/s/...' --format json

To save output:

python3 scripts/read_weixin_article.py 'https://mp.weixin.qq.com/s/...' --format md --output article.md

Workflow

  1. Run scripts/read_weixin_article.py on the mp.weixin.qq.com URL.
  2. Treat success as ok: true and has_js_content: true, not merely HTTP 200.
  3. If the first fetch lacks id="js_content", let the script retry with a WeChat/MicroMessenger mobile User-Agent.
  4. If output still has ok: false, report that the current environment received a verification/shell page. Then try user-approved alternatives: browser session extraction, screenshots/OCR, or searching the title for mirrors/cached references.
  5. When summarizing, cite that the article was read from the provided public URL and mention if a WeChat UA retry was needed.

Important Checks

  • HTTP 200 is not enough. WeChat often returns a 200 text/html verification or inline-script shell page.
  • Require id="js_content" before claiming the article body was fetched.
  • Read publish time from visible #publish_time when present; otherwise use JS variables such as createTime, ct, or oriCreateTime.
  • Do not use cookies or the user's WeChat login state unless the user explicitly asks for browser-session extraction.
  • Do not bypass access controls. This skill is for public pages that the server returns as article HTML.

Script Output

JSON output includes:

  • ok: whether article body was extracted
  • attempt: desktop or wechat_ua
  • url and final_url
  • http_status and content_type
  • has_js_content
  • title, author, publish_time, create_time, ct, ct_beijing
  • paragraphs, text, images
  • diagnostics: short reason when extraction fails

Markdown output includes title metadata, the source URL, and extracted body.