← 返回
未分类

Wechat Article Fetch

提取微信公众号文章内容。支持获取文章标题、作者、发布时间、正文内容等。当用户需要读取、总结、分析微信公众号文章时使用。
提取微信公众号文章标题、作者、发布时间、正文等信息,用于读取、总结或分析。
lvzaiyi-afk
未分类 clawhub v1.0.2 1 版本 99528.3 Key: 无需
★ 0
Stars
📥 211
下载
💾 1
安装
1
版本
#article#chinese#extraction#latest#wechat

概述

WeChat Article Fetch 技能

提取微信公众号文章(mp.weixin.qq.com)的完整内容。

功能特点

  • ✅ 提取文章标题、作者、发布时间
  • ✅ 获取完整正文内容(纯文本)
  • ✅ 自动处理微信公众号的特殊 HTML 结构
  • ✅ 支持长文章(无长度限制)
  • ✅ 可提取文章链接和二维码信息

使用方法

提取文章内容

from skills.wechat_article_fetch import fetch_article

# 获取文章完整信息
article = fetch_article("https://mp.weixin.qq.com/s/fGlf05NkMHQlbW_VMjacuA")

print(f"标题:{article['title']}")
print(f"作者:{article['author']}")
print(f"发布时间:{article['publish_time']}")
print(f"内容长度:{len(article['content'])} 字符")
print(f"摘要:{article['content'][:200]}...")

只获取文本内容

from skills.wechat_article_fetch import get_article_text

text = get_article_text("https://mp.weixin.qq.com/s/xxx")
print(text)

获取文章元数据

from skills.wechat_article_fetch import get_article_metadata

meta = get_article_metadata("https://mp.weixin.qq.com/s/xxx")
print(meta)
# 返回:{'title': '...', 'author': '...', 'publish_time': '...', 'account': '...'}

返回数据格式

{
    'title': str,          # 文章标题
    'author': str,         # 作者
    'publish_time': str,   # 发布时间
    'account': str,        # 公众号名称
    'content': str,        # 正文内容(纯文本)
    'url': str,            # 文章链接
    'raw_html': str,       # 原始 HTML(可选)
    'extracted_at': str    # 提取时间
}

使用场景

  • 📰 总结微信公众号文章
  • 🔍 分析文章内容
  • 📊 提取文章数据
  • 🤖 训练 AI 模型
  • 📝 保存文章归档

⚠️ 依赖安装(必须先安装)

使用前请安装依赖:

pip install beautifulsoup4 requests

或在虚拟环境中:

python -m pip install beautifulsoup4 requests

注意事项

  1. 需要网络连接才能下载文章
  2. 部分付费文章可能无法访问
  3. 过于古老的文章可能已被删除
  4. 必须先安装依赖库(beautifulsoup4 + requests)

安全说明

本技能仅用于提取公开的微信公众号文章内容,不包含任何自动执行系统命令的代码。

示例

from skills.wechat_article_fetch import fetch_article, summarize_article

# 获取并总结文章
article = fetch_article("https://mp.weixin.qq.com/s/xxx")
summary = summarize_article(article['content'], max_length=500)

print(f"文章:{article['title']}")
print(f"摘要:{summary}")

技术实现

  • 使用 curl 下载网页(模拟浏览器 User-Agent)
  • 使用 BeautifulSoup 解析 HTML
  • 定位 #js_content.rich_media_content 区域
  • 提取纯文本并清理格式

创建时间:2026-03-24

版本:1.0.0

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-05-20 05:43 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,223 📥 267,291
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,071 📥 804,571
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,370 📥 319,641