Wechat Article Fetcher logo

Wechat Article Fetcher

Community
wulaosiji
wechat-article-fetcher

微信公众号文章抓取工具,基于Playwright绕过微信反爬机制,获取完整文章内容,支持批量抓取和Markdown导出。 Use when: "抓取公众号文章", "获取微信文章内容", "微信文章转Markdown", "fetch WeChat article", "scrape WeChat content", "批量抓取微信文章", "WeChat to Markdown", "公众号内容归档". 基于Playwright模拟真实浏览器,稳定绕过微信反爬。Cross-references: content-extractor, rss-feed, document-hub, pdf. Built by UniqueClub 🌐 https://uniqueclub.ai

Overview

Publisherwulaosiji
Repositoryskills
Skill namewechat-article-fetcher
Stars
28
Forks
11
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wulaosiji on GitHub. Read the source before you install it.

Installation

Install the Wechat Article Fetcher AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wulaosiji/skills/tree/main/wechat-article-fetcher
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wulaosiji/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/wechat-article-fetcher .claude/skills/wechat-article-fetcher
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Wechat Article Fetcher in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Wechat Article Fetcher on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Wechat Article Fetcher is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

⚠️ 已迁移: 本技能已迁移至 wulaosiji/founder-skills 的 china-content-research,推荐使用新版。本版本保留用于向后兼容。

WeChat Article Fetcher

微信公众号文章抓取工具,基于 Playwright,可绕过微信的反爬机制获取完整文章内容。

When to Use

Use this skill when:

  • 需要抓取微信公众号完整文章内容
  • 批量获取多个公众号文章
  • 将微信文章保存为Markdown格式
  • 收集公众号文章作为研究素材
  • 微信文章需要离线存档
  • 其他方法(如web_fetch)无法获取内容

Do NOT use this skill if:

  • 链接已过期或失效 → 使用原始永久链接
  • 文章需要登录才能查看 → 不抓取私密内容
  • 需要抓取大量文章(建议控制频率)→ 分批执行
  • 目标文章是临时分享链接(含tempkey参数)→ 链接会过期
  • 网络环境不稳定 → 重试或等待网络恢复

Typical triggers:

  • 「抓取公众号文章」「获取微信文章内容」「下载公众号文章」
  • "Fetch WeChat article", "Scrape WeChat content", "Download WeChat article"
  • 「微信文章转Markdown」「批量抓取微信文章」「保存公众号文章」
  • "WeChat to Markdown", "Batch fetch WeChat", "Archive WeChat article"

Workflow

遵循六步推进法(探查→约束→证据→执行→验证→交付)完成操作。

  1. 探查 (Probe) 完整读取用户提供的URL,确认目标和约束:
  • 确保URL有效(非临时链接)
  • 检查链接是否过期
  • 确认文章是公开访问
  1. 约束 (Constrain) 验证输入完整性,设定抓取频率和边界。临时链接(含tempkey)会过期,必须使用原始永久链接。受阻时换通道,不降级交付物。

  2. 证据 (Evidence) 每个抓取结果必须来自微信服务器实际响应,不编造文章内容。记录抓取时间和原始URL作为可追溯证据。

  3. 执行 (Execute) 调用抓取脚本,先给影响与结论,再给行动和必要证据。

python
from skills.wechat_article_fetcher.wechat_fetcher import fetch_wechat_article

result = fetch_wechat_article(url="https://mp.weixin.qq.com/s/xxxxx")

处理结果:

python
if result['success']:
    print(f"标题: {result['title']}")
    print(f"内容: {result['content'][:500]}")

保存文件(可选):

  • Markdown格式
  • 纯文本格式
  • 导入其他系统
  1. 验证 (Verify) 用不同于生成路径的方式回读输出——检查返回的success字段为True,标题非空,内容长度合理(>100字符)。批量抓取时抽查每个结果。

  2. 交付 (Deliver) 返回结构化结果,清理临时浏览器进程。

Output

返回字典格式:

python
{
    'title': '文章标题',
    'content': '完整正文内容(纯文本)',
    'url': '原始链接',
    'fetch_time': '2026-02-12 11:00:00',
    'success': True
}

如指定 output_path,同时将内容写入Markdown文件。

Guardrails

以下约束确保安全、可靠地使用本技能。

Anti-patterns

  • NEVER 频繁抓取触发反爬,建议控制抓取频率
  • NEVER 抓取付费或私密内容
  • Do NOT 不处理抓取失败的情况,始终检查 result['success']
  • Do NOT 使用过期临时链接(含tempkey参数)

Constraints

  • 需要安装Chromium(约100MB),首次运行需下载浏览器
  • 不处理图片/视频,仅提取文本
  • 临时分享链接会过期
  • 依赖Playwright和Chromium环境

Technical Constraints

  1. 浏览器依赖: 需要Playwright和Chromium
  2. 链接时效: 临时链接(含tempkey)会过期
  3. 内容限制: 仅提取文本,不下载媒体
  4. 频率限制: 建议控制抓取频率

Installation

bash
pip install playwright
playwright install chromium

Usage

Command Line

bash
# 基本用法
python3 skills/wechat-article-fetcher/wechat_fetcher.py \
  "https://mp.weixin.qq.com/s/xxxxx"

# 保存到文件
python3 skills/wechat-article-fetcher/wechat_fetcher.py \
  "https://mp.weixin.qq.com/s/xxxxx" \
  -o "output/article.md"

Python API

python
from skills.wechat_article_fetcher.wechat_fetcher import fetch_wechat_article

result = fetch_wechat_article(
    url="https://mp.weixin.qq.com/s/xxxxx",
    output_path="output/article.md"
)

if result['success']:
    print(f"标题: {result['title']}")
    print(f"内容: {result['content'][:500]}")

Why Playwright?

MethodFeasibilityNotes
web_fetch❌微信反爬,只能获取标题
browser (Chrome)⚠️需要连接已授权的Chrome实例
Playwright✅模拟真实浏览器,稳定可靠

Scraping Strategy

  1. 启动 headless Chromium
  2. 访问目标URL,等待网络空闲
  3. 执行JS提取正文(#js_content选择器)
  4. 返回纯文本内容

Use Cases

Use Case 1: 写书项目素材收集

python
import os
from datetime import datetime

url = "https://mp.weixin.qq.com/s/xxxxx"
filename = f"article-{datetime.now().strftime('%Y%m%d')}.md"
output_path = f"01-Projects/book-openclaw/01-raw-materials/community-cases/{filename}"

os.makedirs(os.path.dirname(output_path), exist_ok=True)
result = fetch_wechat_article(url, output_path)

Use Case 2: 批量抓取

python
urls = [
    "https://mp.weixin.qq.com/s/xxx1",
    "https://mp.weixin.qq.com/s/xxx2",
    "https://mp.weixin.qq.com/s/xxx3",
]

for url in urls:
    result = fetch_wechat_article(url)
    print(f"✅ {result['title']}" if result['success'] else f"❌ 失败: {url}")

Use Case 3: 子Agent任务

使用 wechat-article-fetcher skill 抓取链接 https://mp.weixin.qq.com/s/xxxxx
保存到 01-Projects/book-openclaw/01-raw-materials/community-cases/

Troubleshooting

Issue: Chromium Not Found

bash
playwright install chromium

Issue: Empty Content

  • 检查链接是否有效(非临时链接)
  • 临时分享链接(含tempkey参数)会过期
  • 尝试使用原始永久链接

Issue: Timeout Error

  • 网络问题,重试即可
  • 微信服务器偶尔响应慢

Related Skills

  • content-extractor — 通用替代:多平台内容提取,支持微信在内的多个平台
  • rss-feed — 数据来源补充:通过RSS订阅获取公众号更新
  • document-hub — 下游处理:将文章生成Word/PDF文档
  • pdf — 格式转换:文章转PDF存档

About UniqueClub

Part of the UniqueClub toolkit — a collection of skills for AI-powered content creation and automation. 🌐 https://uniqueclub.ai

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Wechat Article Fetcher AI skill do?

微信公众号文章抓取工具,基于Playwright绕过微信反爬机制,获取完整文章内容,支持批量抓取和Markdown导出。 Use when: "抓取公众号文章", "获取微信文章内容", "微信文章转Markdown", "fetch WeChat article", "scrape WeChat content", "批量抓取微信文章", "WeChat to Markdown", "公众号内容归档". 基于Playwright模拟真实浏览器,稳定绕过微信反爬。Cross-references: content-extractor, rss-feed, document-hub, pdf. Built by UniqueClub 🌐 https://uniqueclub.ai

Why use Wechat Article Fetcher on TypingMind?

Because you install it once and use it with any model. Wechat Article Fetcher is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Wechat Article Fetcher in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wulaosiji/skills/tree/main/wechat-article-fetcher. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Wechat Article Fetcher?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Wechat Article Fetcher?

As many as you like. As long as a model supports skills, you can use Wechat Article Fetcher with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Wechat Article Fetcher AI skill free?

It is published on GitHub by wulaosiji. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇