WeChat Article Fetcher - 微信文章抓取技能

微信公众号文章链接处理。当用户发送微信公众号文章链接时,自动获取并提取文章内容。 触发条件:(1) 用户发送 http(s)://mp.weixin.qq.com/s/ 开头的链接 (2) 用户请求获取公众号文章内容

3,891 stars

Best use case

WeChat Article Fetcher - 微信文章抓取技能 is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

微信公众号文章链接处理。当用户发送微信公众号文章链接时,自动获取并提取文章内容。 触发条件:(1) 用户发送 http(s)://mp.weixin.qq.com/s/ 开头的链接 (2) 用户请求获取公众号文章内容

Teams using WeChat Article Fetcher - 微信文章抓取技能 should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/wechat-article-skill/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/alienhub/wechat-article-skill/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/wechat-article-skill/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How WeChat Article Fetcher - 微信文章抓取技能 Compares

Feature / AgentWeChat Article Fetcher - 微信文章抓取技能Standard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

微信公众号文章链接处理。当用户发送微信公众号文章链接时,自动获取并提取文章内容。 触发条件:(1) 用户发送 http(s)://mp.weixin.qq.com/s/ 开头的链接 (2) 用户请求获取公众号文章内容

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 微信公众号文章获取

## 识别公众号链接

公众号文章链接特征:
- 域名: `mp.weixin.qq.com`
- 路径: `/s/` 开头
- 示例: `https://mp.weixin.qq.com/s/abc123def456`

## 获取文章内容的方法

> ⚠️ 微信服务器会检测请求头,必须携带正常浏览器的 User-Agent,否则返回 403。

### Agent 调用顺序(重要)

1. **优先使用 get_content.py 脚本** —— 稳定、无头、输出直接供模型消费。
2. **仅在脚本失败时改用 browser 工具** —— 脚本 stderr 会输出「建议 Agent 改用 browser 工具」等提示,此时再考虑浏览器。

### 方法一:get_content.py 脚本(首选)

本地 CLI,urllib + certifi + 真实 UA,自带重试(最多 3 次)。失败时 stderr 提示是否改用 browser。

```bash
# 安装依赖(首次)
pip install -r requirements.txt

# 调用
python scripts/get_content.py --url "https://mp.weixin.qq.com/s/xxx"
```

- 成功:正文输出到 stdout。
- 失败:stderr 输出原因及「建议 Agent 改用 browser 工具」。

### 方法二: browser 工具(脚本失败时的回退)

仅在脚本返回非 0 且 stderr 建议改用 browser 时使用:

```python
browser(action="navigate", url="用户发送的链接")
browser(action="snapshot")
```

## 内容提取要点

公众号页面结构:
- 文章正文在 `#page-content` 元素中
- 标题通常在 `#activity-name` 或 `h1` 标签
- 作者信息在 `.account_nickname` 或类似元素
- 发布时间需要从页面元数据提取

## 处理流程

1. **识别链接** → 检测到 `mp.weixin.qq.com/s/` 链接
2. **获取内容** → 调用 `get_content.py --url <链接>`
3. **成功** → 正文在 stdout,直接供模型消费
4. **失败** → 检查 stderr,若建议改用 browser,再用 browser 工具重试

## 注意事项

- 公众号文章可能需要登录才能完整抓取
- 部分文章有访问时间限制
- 图片可能需要单独处理(使用微信图床域名)
- **必须使用正常浏览器的 User-Agent**

Related Skills

name: welight-wechat-layout-publish

3891
from openclaw/skills

description: Welight standalone skill for turning an article into WeChat Official Accounts compatible Markdown/HTML, presenting built-in theme choices, and publishing to WeChat as a draft or formal post when publishing prerequisites are already configured.

Content & Documentation

wechat-publisher

3891
from openclaw/skills

一键发布 Markdown 到微信公众号草稿箱。基于 wenyan-cli,支持多主题、代码高亮、图片自动上传。

Content & Documentation

wechat-mp-reader

3891
from openclaw/skills

Read WeChat official account articles. Use the built-in browser tool to open the page and extract body text. Always append ?scene=1 to the URL.

clawphone-wechat-control

3891
from openclaw/skills

处理微信会话列表、进入聊天、发送消息、处理微信内弹窗与聊天页失败排查。适用于用户要求查看微信消息、回复联系人、转发、处理聊天输入框或发送失败时。执行时必须先确认当前在微信的哪个页面,再按聊天场景一步一验。

wechat-content-creator

3891
from openclaw/skills

Create high-quality WeChat public account articles with high eCPM. Use when writing WeChat articles, optimizing titles, selecting topics, or improving content quality. Covers 8 golden opening templates, SCQA structure, long-tail keyword integration, high-value niches like legal, finance, career, and compliance guidelines. Triggers on requests like write WeChat article, 公众号文章, 爆款文案, title optimization, 选题, eCPM optimization, or 长尾关键词.

save-article-with-images

3891
from openclaw/skills

Save web articles locally with images. Automatically downloads images, generates Markdown, and converts to PDF. Supports WeChat Official Account articles via subagent isolation. Triggers: save article, save this article, download article, clip article, wechat article.

name: wechat_messaging

3891
from openclaw/skills

description: 通过微信向好友发送消息。流程:查询好友 -> 确认目标 -> 发送内容。

name: wechat_operate

3891
from openclaw/skills

description: 通过微信进行社交管理与消息发送。流程:查询目标(好友/群聊/成员) -> 确认目标 -> 发送内容(文本/图片/文件)。

wechat-comic-factory

3891
from openclaw/skills

Generate WeChat comic articles and publish them to the WeChat Official Account draft box by executing local Python pipeline scripts. Use when the user wants to create a comic series from comic_type, topic, and count, or publish the latest generated task. In this skill, “发布” and “发微信” always mean only pushing to the WeChat Official Account draft box; never reinterpret them as personal chat, group chat, or message-tool sending.

long-article-illustration

3891
from openclaw/skills

长文配图助手。为长篇文章自动划分段落、生成AI配图提示词并调用图像生成工具完成配图。适用场景:(1) 公众号/博客长文需要配图 (2) 用户上传文章希望获得段落配图建议 (3) 批量生成文章插图 (4) 用户提到"文章配图""长文插画""段落配图"等关键词时触发

wechat-official-account

3891
from openclaw/skills

Create and publish WeChat Official Account (公众号) articles. Use when: (1) User wants to auto-post to WeChat Official Account, (2) Create draft from title + content, (3) Publish draft to 公众号, (4) Schedule or automate 公众号 article publishing. Supports API (服务号) and browser automation (个人订阅号). Browser mode: interactive QR login, login detection via page HTML analysis.

Wechat Connect

3891
from openclaw/skills

Install OpenClaw's official WeChat plugin and complete account pairing via QR code scan. Triggers when the user says "install WeChat plugin", "connect WeChat", or "WeChat QR code". No command-line interaction required.