wechat_articles 公众号文章收集器

v1.0.1

搜索和读取微信公众号文章的完整工具,支持关键词搜索与全文提取。 **只要用户提到以下任何场景,必须使用此 skill:** (1) 搜索公众号文章、按关键词查找微信内容 (2) 读取、摘要、分析、翻译 mp.weixin.qq.com 链接的内容 (3) 用户说"帮我找公众号文章"、"读这篇微信文章"、"搜索公众...

0· 593·5 current·5 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for johan-oilman/wechat-articles.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "wechat_articles 公众号文章收集器" (johan-oilman/wechat-articles) from ClawHub.
Skill page: https://clawhub.ai/johan-oilman/wechat-articles
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Canonical install target

openclaw skills install johan-oilman/wechat-articles

ClawHub CLI

Package manager switcher

npx clawhub@latest install wechat-articles
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (search and read WeChat public-accounts articles) matches the code and declared packages: search uses miku_ai.spider.get_wexin_article, reading uses requests+BeautifulSoup for a lightweight mode and Playwright+Chromium for a robust mode. No unrelated services, credentials, or system components are requested.
Instruction Scope
SKILL.md and scripts restrict operations to searching WeChat and fetching/HTML-parsing article pages or launching a browser to render them. The Playwright mode will download/launch Chromium and may save screenshots if requested. The only external behavior beyond site scraping is via the miku-ai package (miku_ai.spider.get_wexin_article) — which is expected for search but is an external dependency that may perform network calls on your behalf; review that package if you need assurance about where search requests go.
Install Mechanism
There is no exotic installer: SKILL.md suggests pip installing well-known packages and running Playwright's official 'playwright install chromium --with-deps' to provision browser binaries and system libs. No downloads from untrusted URLs or custom extract steps are present.
Credentials
The skill declares no required environment variables, and the code does not read secrets or unrelated config paths. No credentials are requested that would be disproportionate to searching/reading web articles.
Persistence & Privilege
The skill does not request always:true, does not modify other skills, and has no special system persistence. Autonomous invocation is allowed (platform default) but not combined with other high-risk factors here.
Assessment
This skill appears coherent for searching and extracting WeChat public-article content. Before installing: (1) review the miku-ai package (miku_ai.spider) source or its network behavior if you need to know where search queries are sent; (2) be aware Playwright will download Chromium and install system libraries (--with-deps) which may take time and require permissions; (3) avoid high-frequency automated scraping to prevent IP rate-limits or ToS issues; and (4) if you handle copyrighted or sensitive content, ensure you have rights to fetch and store it.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

📄 Clawdis
latestvk970ttjy8pt6498pvgf5hcvsd182bbnd
593downloads
0stars
2versions
Updated 1mo ago
v1.0.1
MIT-0

微信公众号文章搜索与读取 (v1.0)

搜索和读取微信公众号文章的完整工具,支持 simple(快速)和 playwright(稳定)双模式 + auto 自动切换。

快速开始

搜索文章

python3 scripts/search.py "关键词" [数量]

示例:

python3 scripts/search.py "绿电直连政策" 10

读取文章

python3 scripts/read.py "微信文章URL" [--mode MODE] [--screenshot PATH]

模式选择:

  • --mode=simple - 快速模式(requests + BeautifulSoup)
  • --mode=playwright - 稳定模式(真实浏览器)
  • --mode=auto - 自动切换(默认,推荐)

Python API 使用(推荐)

import sys
sys.path.append('scripts')

from wechat_articles import search_articles, read_article

# 搜索文章
articles = search_articles("绿电直连政策", top_num=5)

# 读取文章(建议加错误处理)
try:
    content = read_article(articles[0]['url'], mode='auto')
    print(f"标题: {content['title']}")
    print(f"公众号: {content['author']}")
    print(f"发布时间: {content['publish_time']}")  # 若有
    print(f"读取模式: {content['mode']}")
    for p in content['paragraphs'][:10]:
        print(p)
except Exception as e:
    print(f"读取失败: {e}")
    # auto 模式失败时会抛出异常,建议捕获后降级处理或提示用户

返回数据结构说明

read_article() 返回一个字典,包含以下字段:

字段类型说明
titlestr文章标题
authorstr公众号名称
publish_timestr发布时间(部分文章可能为空)
paragraphslist[str]正文段落列表
modestr实际使用的读取模式(simpleplaywright

search_articles() 返回列表,每项包含:

字段类型说明
titlestr文章标题
urlstr文章链接(有时效性,建议尽快读取)
authorstr公众号名称
digeststr文章摘要

模式对比

模式速度资源稳定性适用场景
simple快 (0.5-1s)轻量一般简单页面,频繁调用
playwright慢 (3-5s)较重很高复杂页面,稳定优先
auto自适应自适应最佳默认推荐

安装依赖

Simple 模式(默认,轻量快速)

pip install beautifulsoup4 requests miku-ai

这些包通常已随 agent-reach 安装。

Playwright 模式(可选,推荐稳定读取)

pip install playwright
playwright install chromium --with-deps

--with-deps 会自动安装 Linux 系统依赖(如 libnss3、libgbm 等),首次运行需几分钟。

注意事项

  • 搜索结果 URL 有时效性,建议尽快读取
  • 避免高频请求防止触发反爬
  • auto 模式优先尝试 simple,失败后自动切换 playwright;若两者均失败则抛出异常
  • Playwright 首次运行需安装 Chromium(约几分钟)

欢迎反馈 & PR!GitHub: https://github.com/johan-oilman/wechat-articles

Comments

Loading comments...