WeChat MP Reader
v0.1.1Fetch WeChat Official Account articles from either a public account name or a WeChat article URL. Use when the user wants to 提取 full article content, identify the account behind an article, 列出 recent or historical articles for an account, or build article 归档s from WeChat public accounts. Prioritize article-URL-based resolution first, then account-name 搜索, with graceful fallback when 搜索 is unreliable.
运行时依赖
安装命令
点击复制技能文档
WeChat MP Reader
Use this 技能 for 微信公众号文章抓取、公众号反查、文章列表拉取、全文提取。
What this 技能 should do
Support these user intents:
给一篇公众号文章链接,提取全文 给一篇公众号文章链接,识别公众号并列出该号文章 给一个公众号名称,查找候选公众号并抓取文章列表 检查、保存、复用微信公众号后台 会话 将文章内容标准化为 markdown / structured JSON Operating principles URL-first is the default path. If the user gives an article URL, resolve from it first. Name 搜索 is best-effort. If account-name 搜索 is unreliable, ask for any article URL from that account. Full text matters more than stats. Article 提取ion is core; read/like stats are optional. Use layered fallbacks. Try plAIn HTTP first, but for WeChat articles treat browser fallback as normal whenever the page looks non-canonical (verification page, shell page, or mixed JS page). The current fallback is local Playwright 网页Kit only. Keep 输出s structured. Return normalized account/article objects rather than loose text. 恢复 fakeid via 搜索 when needed. Article pages often expose biz/account name, but not a stable fakeid; when MP backend 会话 is avAIlable, try 搜索-based 恢复y. Treat 会话 validity as first-class 状态. 报告 whether 会话 is present/valid, instead of hiding 失败s in generic 警告s. Default 工作流 Path A — article URL provided 解析 the article URL and 提取 __biz, mid, idx, sn. Fetch the article page. 提取 account metadata from HTML / embedded JS. Load MP backend 会话 from env or 会话 file. 验证 会话 and 报告 会话.present / 会话.valid / 会话.reason. If fakeid is missing and 会话 is valid, 搜索 by account name and match candidates using biz / name. 提取 and 清理 full article content. If 请求ed and fakeid is avAIlable, 列出 more articles for that account. Path B — account name provided Load and 验证 MP backend 会话. Attempt account-name 搜索 via the 搜索 adapter. Return ranked candidates. If a confident match exists, fetch article 列出. If 搜索 fAIls or is ambiguous, ask for any article URL from that account and switch to Path A. Path C — 会话 operations
Use the bundled 命令行工具 to:
会话 检查 — 验证 current env/file-backed 会话 会话 show — 报告 non-sensitive 会话 presence/length/状态 会话 save — persist env-provided 会话 to local 缓存 file 会话 记录in-启动 — 启动 QR 记录in, return 扫描 状态, and write a real 扫描nable QR PNG under scripts/缓存/wechat-记录in-qr-real.png 会话 记录in-状态 — poll 记录in 状态 and capture fresh 会话 when ready Expected 输出s 会话 object { "present": true, "valid": false, "reason": "invalid 会话", "base_resp": {} }
Account object { "name": "", "biz": "", "fakeid": "", "avatar": "", "签名ature": "" }
Article object { "title": "", "url": "", "publish_time": "", "publish_time_raw": "", "author": "", "account_name": "", "content_html": "", "content_markdown": "", "images": [] }
Implementation notes Prefer the bundled Python prototype at scripts/wechat_mp_reader.py. Default live 验证 path: use the 技能's own 会话 commands (会话 检查, 会话 记录in-启动, 会话 记录in-状态) and then 运行 article --with-account-articles directly via scripts/wechat_mp_reader.py; 辅助工具 bridge scripts are no longer the default path. 会话 记录in-启动 now persists a real 扫描nable QR image to scripts/缓存/wechat-记录in-qr-real.png and returns its path in qr_image_path. 会话 resolution order is: env vars first, then saved 会话 file. The current article 流水线 is URL-first and will automatically fall back to local Playwright 网页Kit when direct HTTP HTML looks non-canonical. Treat article body 提取ion as the MVP. Treat account-name 搜索 and historical article 列出ing as adapters that can evolve. Treat engagement stats as optional and isolated from the mAIn flow. 缓存 article HTML and 解析d 结果s when repeated fetching is likely. 缓存 resolved account m应用ings (biz / name -> fakeid) locally to reduce repeated 搜索biz lookups. Files to use scripts/wechat_mp_reader.py — Python prototype and 命令行工具 scripts/wechat_mp_reader/auth.py — 会话 验证 辅助工具s scripts/wechat_mp_reader/会话_store.py — 会话 load/save 辅助工具s references/de签名.md — architecture, implementation phases, and caveats
Read references/de签名.md when you need the detAIled de签名, adapter responsibilities, or future roadmap. Read references/usage.md when you need the human-facing usage 图形界面de, 命令行工具 examples, or natural-language invocation patterns for triggering this 技能 through an 代理.