dsh-wechat-article-fetcher
birdmanhj/dsh-wechat-article-fetcher
DeepSeek Harness (DSH) plugin: complete WeChat Official Account article downloader — wechat_article_fetch tool plus a zero-dependency anti-bot fetcher CLI (title/time/author/content with text-images-videos-links, read/like/wow stats and comments with a lo
インストール
dsh plugin --profile web add github:birdmanhj/dsh-wechat-article-fetcherREADME
DSH WeChat Article Fetcher
English | 中文
Input a WeChat Official Account (公众号) article URL, get the complete article out: title, time, author, read/like/wow stats, content (text / image / video / link blocks), and comments — with anti-bot protection. Works as a DSH plugin and as a zero-dependency standalone CLI.
Package docs (install, tool parameters, CLI flags, anti-bot details):
dsh-wechat-article-fetcher/README.md
Repository layout
DSH-wechat-article-fetcher/
├── dsh-wechat-article-fetcher/ # ✅ npm plugin package (dsh plugin add / import into other projects)
│ ├── package.json # dsh.bundle.patch -> cordis.patch.yml
│ ├── cordis.patch.yml # inserts one host row (id: wechat-article-fetcher)
│ ├── lib/index.js # cordis plugin: registers the wechat_article_fetcher tool
│ ├── lib/fetch_wechat_article.cjs # zero-dependency anti-bot fetcher CLI (core, Node>=18)
│ └── README.md / README.zh.md / README.i18n.yaml
├── wechat_articles/ # default output root (<公众号>/<日期>_<标题>/)
├── probe/ # anti-bot probe samples (deletable)
├── test_out/ # early test output (deletable)
└── HANDOFF.md # all verified findings and handoff notes
Quick start
Option 1: DSH plugin (recommended)
dsh plugin --profile web add dsh-wechat-article-fetcher
Then add dsh-wechat-article-fetcher to the dsh.profile.bundles list in
~/.dsh/profiles/web/package.json and restart dsh web. Afterwards, call the
wechat_article_fetcher tool in any session (url required;
cookie/download_images/save_files/out_dir/max_retries optional).
Option 2: standalone CLI (no DSH)
node dsh-wechat-article-fetcher/lib/fetch_wechat_article.cjs "https://mp.weixin.qq.com/s/xxxx" \
[--cookie "<WeChat login cookie>"] [--no-images] [--out <dir>] [--json] [--max-retries 3]
stdout prints the full JSON; save mode writes article.md / article.html / meta.json /
images/.
Capabilities & limits (all verified in practice)
| Field | Anonymous | Login cookie |
|---|---|---|
| Title / author / account / publish time / digest / cover | ✅ | ✅ |
| Body (text · image · video · link structured blocks) | ✅ | ✅ |
| Image download, album & tags | ✅ | ✅ |
| Read / like / wow counts | ❌ WeChat hides them | ✅ |
| Comments (with replies) | ❌ no session | ✅ |
- The ❌ rows are WeChat platform restrictions (
getappmsgext/appmsg_commentreject anonymous access). Unlock them with thecookieparameter — it must be the article-page login state (containswxuin=andkey=); an mp-admin cookie does not work (verified). - Anti-bot: UA pool rotation, exponential backoff retries, verification-page
(
环境异常/captcha) detection, concurrent image downloads with Referer. - Verified: modern article (title/nickname/time/body/5 images all correct), 2020 legacy article
(17 images/cover/time), deleted article (
article_unavailabledetection), markdown/html/meta export with correct relative image paths, video parsing (mock-verified vid/player extraction and mixed-block ordering). - Positioning: article content first; likes/comments are an optional enhancement (login cookie acquisition is costly — opt-in only).
Session/workspace migration record
- This workspace was migrated from
DSH_wchat_article_downloaderto the current path viamv_session;mv_session verifyreports CONSISTENT (session header cwd, sessions dir, workspace registry, zstd frames, projection cache all aligned). - After installing/migrating, restart
dsh webonce; afterwards re-check withmv_session { verify: true }.
Plugin marketplace survey (2026-08; no need to re-search)
No existing plugin is a complete downloader: dsh-wechat-mp (markdown typesetting),
dsh-wechat-mp-studio (content production), and dsh-deepread (reading analysis) all miss
likes/comments/videos or full original content. The community wechat-article-fetcher Skill
(Python) lacks likes/comments/videos. Therefore this plugin was built from scratch, borrowing
its anti-bot ideas (mobile UA, data-src, short-link preference).