# Weixin Article Reader

> Read public WeChat Official Account articles from mp.weixin.qq.com links and extract title, author, publish time,正文, images, and source metadata. Use when the user gives a 微信公众号/WeChat article URL, asks to read/summarize/archive a 公众号文章, or when a normal web fetch returns HTTP 200 but lacks id="js_content" because WeChat returned a verification/shell page. Handles public pages only; do not use to bypass login, paywalls, private permissions, or access controls.

- Skill: `dull-bird/weixin-article-reader` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add dull-bird/weixin-article-reader`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dull-bird/weixin-article-reader/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search
- Author: dull-bird (https://skillmd.com/u/dull-bird)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/dull-bird/weixin-article-reader

---


# Weixin Article Reader

## Quick Start

Use the bundled script first:

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

For machine-readable output:

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

To save output:

```bash
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正文 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正文.

