一键导入
fetch-wechat-article
抓取微信公众号文章内容,使用 Playwright headless 模式无弹窗后台抓取,支持动态加载内容,自动提取标题和正文并保存为 Markdown 文件。本技能应在用户需要抓取微信公众号文章内容时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
抓取微信公众号文章内容,使用 Playwright headless 模式无弹窗后台抓取,支持动态加载内容,自动提取标题和正文并保存为 Markdown 文件。本技能应在用户需要抓取微信公众号文章内容时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Your personal learning tutor. Teaches you any subject one concept at a time, remembers what you've learned across days, and quietly schedules reviews so it sticks. Use whenever the user wants to learn something, pick up where they left off, review, or see how they're doing. Trigger phrases (English): "teach me", "I want to learn", "learn this", "explain this", "help me study", "what should I study", "quiz me", "review", "what's due", "how am I doing", "pick up where we left off", "continue learning". Trigger phrases (Chinese): "教我", "我想学", "学这个", "讲讲这个", "带我学", "现在到哪了", "学到哪了", "继续学", "复习", "考考我", "今天学什么", "我学得怎么样". Default to the status overview when unsure.
批量根据视频链接获取字幕/转录文本,做成学习笔记。当用户说「把这些视频链接做成笔记」「批量拉B站字幕」「这个视频/合集转成文字」「视频学习笔记」「根据链接整理视频内容」「B站/YouTube/抖音视频转文字」等,触发本技能。三平台均已端到端验证:有字幕直拉,无字幕自动下音频交 FunASR 转录。YouTube/抖音需加 --browser edge。仅用于个人学习用途。
| name | fetch-wechat-article |
| display_name_zh | 微信公众号抓取 |
| description | 抓取微信公众号文章内容,使用 Playwright headless 模式无弹窗后台抓取,支持动态加载内容,自动提取标题和正文并保存为 Markdown 文件。本技能应在用户需要抓取微信公众号文章内容时使用。 |
| license | Complete terms in LICENSE.txt |
使用 Playwright 抓取微信公众号文章,后台运行无弹窗,自动处理动态加载,提取干净的文章内容,并支持自动保存为 Markdown 文件。
本技能专注于文章抓取,保持通用性。仅在检测到法律相关内容时,AI 会自动调用 legal-text-format 技能进行格式化。
AI 执行流程:
用户请求 → wechat-article-fetch 抓取 → [判断内容类型]
↓
┌────────────────────────┴────────────────────────┐
↓ ↓
检测到法律内容 普通文章
↓ ↓
自动调用 legal-text-format 保存原始内容到项目根目录
↓
输出到 archive/ 目录
AI 会根据以下特征判断是否为法律内容:
示例:
# 保存到项目根目录
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx"
# 保存到指定目录
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" "./articles/"
# 保存到指定文件
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" "./articles/case.md"
// 抓取文章(仅返回结果)
const result = await fetchWechatArticle("https://mp.weixin.qq.com/s/xxxxx");
// 抓取文章并自动保存为 Markdown 文件
const result = await fetchWechatArticle(
"https://mp.weixin.qq.com/s/xxxxx",
3, // 重试次数(可选)
"./output.md" // 保存路径(可选)
);
// 返回格式
{
title: "文章标题",
content: "文章正文...",
url: "文章URL"
}
# 基本用法(仅输出到控制台)
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx"
# 保存为指定文件
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" "./articles/my-article.md"
# 保存到目录(自动使用文章标题作为文件名)
node scripts/fetch.js "https://mp.weixin.qq.com/s/xxxxx" "./articles/"
标题: 文章标题
文章正文第一段...
文章正文第二段...
# 文章标题
> 原文链接: https://mp.weixin.qq.com/s/xxxxx
> 抓取时间: 2026-01-21 20:30:00
---
文章正文第一段...

文章正文第二段...
当文章包含图片时,会自动生成以下文件结构:
输出目录/
├── 文章标题.md # Markdown 文件
└── 文章标题_assets/ # 图片资源文件夹
├── image_xxx_0.jpg
├── image_xxx_1.jpg
└── ...
默认启用智能图片筛选,自动过滤小于 15KB 的装饰性图片(如社交媒体按钮、表情符号等)。
可以在 scripts/fetch.js 中修改筛选配置:
const IMAGE_FILTER_CONFIG = {
minFileSize: 15 * 1024, // 最小文件大小(字节)
enabled: true // 是否启用筛选
};
npx playwright install chromium)#js_content或 .rich_media_content区域cmd.exe 运行 npx 命令const urls = [
"https://mp.weixin.qq.com/s/xxxx1",
"https://mp.weixin.qq.com/s/xxxx2",
"https://mp.weixin.qq.com/s/xxxx3"
];
for (const url of urls) {
const result = await fetchWechatArticle(url, 3, "./articles/");
console.log(`已保存: ${result.title}`);
}
请帮我抓取这个微信公众号文章并保存为 Markdown 文件:
https://mp.weixin.qq.com/s/xxxxx
⚠️ 仅用于个人学习和研究,请遵守网站服务条款 ⚠️ 频繁抓取可能被限流,建议控制请求频率 ⚠️ 抓取的内容版权归原作者所有 ⚠️ 有头模式会弹出浏览器窗口,可能干扰工作流程 ⚠️ Windows 用户首次使用需要安装 Playwright(会自动安装)