返回顶部
w

wechat-article-reader微信公众号文章提取

Extract full text from WeChat Official Account (微信公众号) article URLs. Use when a user shares an mp.weixin.qq.com link and asks to read, summarize, analyze, or save the article. Handles WeChat's JS-rendered content and anti-bot detection via headless Chromium. Falls back to mirror-site search when headless browser is unavailable.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
366
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

wechat-article-reader

微信公众号文章阅读器

从 mp.weixin.qq.com 链接中提取完整的文章内容。

使用场景

  • - 用户分享微信公众号文章链接(mp.weixin.qq.com/s/xxx)
  • 需要阅读/总结/分析/归档微信公众号文章
  • ContentPipe Scout 节点接收到需要参考的微信公众号链接

快速开始

bash

首次安装(安装无头 Chromium 浏览器,约 200MB)


python3 SKILL_DIR/scripts/setup.py

提取文章

python3 SKILLDIR/scripts/fetcharticle.py https://mp.weixin.qq.com/s/xxx

输出:包含标题、作者、发布时间、正文内容、字数的 JSON 数据

工作原理

微信公众号文章由 JavaScript 渲染生成——仅通过 HTTP 请求只能获取空壳页面。本技能使用 Playwright 无头 Chromium 浏览器:

  1. 1. 启动带有反检测标志的无头浏览器
  2. 导航至微信公众号链接,等待 networkidle 状态
  3. 等待 #js_content(文章正文容器)加载
  4. 提取标题(h1#activity-name)、作者、发布时间、正文文本
  5. 清理 HTML → 纯文本(移除脚本/样式,压缩空白字符)
  6. 返回结构化的 JSON 数据

备用方案:镜像搜索

如果 Playwright 不可用,本技能会搜索中文内容聚合平台(53ai.com、36kr.com、掘金、人人都是产品经理)上的文章镜像副本。

Python API

python
from fetcharticle import fetchwechat_article

result = fetchwechatarticle(https://mp.weixin.qq.com/s/xxx)

result = {


success: True,


title: 文章标题,


author: 作者名,


publish_time: 2026-03-10,


content: 正文全文...,


word_count: 2500,


source: playwright, # 或 mirror


url: https://mp.weixin.qq.com/s/xxx


}

局限性

  • - 需要一次性安装 Chromium(python3 scripts/setup.py)
  • 首次获取约需 5-10 秒(浏览器启动);后续获取约需 3-5 秒(浏览器复用)
  • 无法绕过微信公众号登录墙(付费内容、仅限关注者阅读的文章)
  • 镜像备用方案仅适用于热门/广泛传播的文章

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 wechat-article-getter-1776175035 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 wechat-article-getter-1776175035 技能

通过命令行安装

skillhub install wechat-article-getter-1776175035

下载

⬇ 下载 wechat-article-reader v1.0.0(免费)

文件大小: 6 KB | 发布时间: 2026-4-15 11:38

v1.0.0 最新 2026-4-15 11:38
Initial release of WeChat Article Reader.

- Extracts full article content (title, author, publish time, body) from WeChat Official Account URLs using headless Chromium.
- Handles JavaScript-rendered pages and evades anti-bot detection.
- Provides fallback by searching Chinese content aggregator sites for mirror copies if headless browser is unavailable.
- Outputs structured JSON with article details including word count and content source.
- Exposes a Python API for easy integration.
- Requires one-time setup to install Playwright and Chromium.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部