wechat-mp-reader

抓取微信公众号文章并转换为 Markdown 格式。支持提取标题、作者、发布时间、封面图、正文内容(含图片、视频链接)。 当用户提到以下场景时触发: - 读取/抓取/下载微信公众号文章 - 将公众号文章转为 Markdown - 提取 mp.weixin.qq.com 链接内容 - 保存公众号文章到本地 - 微信文章备份、存档 关键词:微信公众号、公众号文章、mp.weixin.qq.com、微信文章抓取、微信文章转 Markdown

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "wechat-mp-reader" with this command: npx skills add limingfa/wechat-mp-reader-fzx

WeChat MP Reader — 微信公众号文章抓取工具

功能

抓取微信公众号文章(mp.weixin.qq.com 链接),提取完整内容并转换为 Markdown 格式保存到本地。

支持提取的信息

  • 标题 — 文章标题
  • 公众号名称 — 作者/来源
  • 发布时间 — 文章发布日期
  • 封面图 — 文章封面图片链接
  • 正文内容 — 完整的文章正文,包含:
    • 文本段落、标题层级
    • 图片(保留原图链接)
    • 视频链接
    • 超链接
    • 列表、引用、加粗/斜体等格式

使用方法

命令行方式

python scripts/fetch_wechat_article.py <文章链接> [选项]

参数:

  • url — 微信公众号文章链接(必需)
  • -o, --output — 输出目录(默认:当前目录)
  • --images — 下载图片到本地(开发中)
  • --json — 以 JSON 格式输出元数据

示例:

# 基本用法
python scripts/fetch_wechat_article.py "https://mp.weixin.qq.com/s/xxxxx"

# 指定输出目录
python scripts/fetch_wechat_article.py "https://mp.weixin.qq.com/s/xxxxx" -o ./articles

# 只输出 JSON 元数据
python scripts/fetch_wechat_article.py "https://mp.weixin.qq.com/s/xxxxx" --json

Python API 方式

from scripts.fetch_wechat_article import fetch_article

result = fetch_article(
    url="https://mp.weixin.qq.com/s/xxxxx",
    output_dir="./articles"
)

print(result['title'])      # 文章标题
print(result['author'])     # 公众号名称
print(result['content'])    # Markdown 正文
print(result['filepath'])   # 保存的文件路径

输出格式

生成的 Markdown 文件结构:

# 文章标题

**公众号**: 公众号名称
**发布时间**: 2024-01-01
**封面**: ![封面](封面图链接)
**原文链接**: https://mp.weixin.qq.com/s/xxxxx

---

正文内容...

![图片](图片链接)

[视频](视频链接)

依赖

  • Python 3.8+
  • requests 库(用于 HTTP 请求)

安装依赖:

pip install requests

注意事项

  1. 网络要求 — 需要能访问 mp.weixin.qq.com
  2. 反爬机制 — 频繁抓取可能触发微信的反爬机制,建议适当控制请求频率
  3. 链接有效性 — 确保文章链接未过期或被删除
  4. 图片链接 — 生成的 Markdown 中图片使用微信 CDN 原链接,长期有效性取决于微信策略

故障排查

问题可能原因解决方案
无法提取正文页面结构变化检查微信是否更新了页面结构
返回 403被反爬拦截稍后再试,或更换 IP
标题为空文章被删除/受限确认链接可在浏览器正常打开
图片不显示微信 CDN 链接过期使用 --images 下载到本地

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

通义晓蜜 - 智能外呼

触发阿里云晓蜜外呼机器人任务,自动批量拨打电话。适用于批量外呼、客户回访、满意度调查、简历筛查约面试等场景。可从前置工具或节点获取外呼名单。

Registry SourceRecently Updated
General

Letterboxd Watchlist

Scrape a public Letterboxd user's watchlist into a CSV/JSONL list of titles and film URLs without logging in. Use when a user asks to export, scrape, or mirror a Letterboxd watchlist, or to build watch-next queues.

Registry SourceRecently Updated
General

Seedance Video Generation

Generate AI videos using ByteDance Seedance. Use when the user wants to: (1) generate videos from text prompts, (2) generate videos from images (first frame, first+last frame, reference images), or (3) query/manage video generation tasks. Supports Seedance 1.5 Pro (with audio), 1.0 Pro, 1.0 Pro Fast, and 1.0 Lite models.

Registry SourceRecently Updated
4.2K17jackycser
General

Universal Skills Manager

The master coordinator for AI skills. Discovers skills from multiple sources (SkillsMP.com, SkillHub, and ClawHub), manages installation, and synchronization...

Registry SourceRecently Updated