xiongjingzhi/agent-learn/news-extractor
Claude Code and agent skill by xiongjingzhi/agent-learn
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
新闻站点内容提取。支持微信公众号、今日头条、网易新闻、搜狐新闻、腾讯新闻。当用户需要提取新闻内容、抓取公众号文章、爬取新闻、或获取新闻JSON/Markdown时激活。
Install
npx vskill@latest install xiongjingzhi/agent-learn/news-extractorSKILL.md
News Extractor Skill
从主流新闻平台提取文章内容,输出 JSON 和 Markdown 格式。
支持平台
| 平台 | ID | URL 示例 | |
|---|---|---|---|
| 微信公众号 | https://mp.weixin.qq.com/s/xxxxx | ||
| 今日头条 | toutiao | https://www.toutiao.com/article/123456/ | |
| 网易新闻 | netease | https://www.163.com/news/article/ABC123.html | |
| 搜狐新闻 | sohu | https://www.sohu.com/a/123456_789 | |
| 腾讯新闻 | tencent | https://news.qq.com/rain/a/20251016A07W8J00 |
依赖安装
本 skill 使用 uv 管理依赖。首次使用前需要安装:
说明: 此 skill 可放置在项目级 (.claude/skills/) 或用户级 (~/.claude/skills/) 目录。项目级便于团队共享,用户级便于跨项目复用。
重要: 所有脚本必须使用 uv run 执行,不要直接用 python 运行。uv run 会自动使用项目虚拟环境中的依赖。
依赖列表
| 包名 | 用途 | |
|---|---|---|
| pydantic | 数据模型验证 | |
| requests | HTTP 请求 | |
| curl_cffi | 浏览器模拟抓取 | |
| tenacity | 重试机制 | |
| parsel | HTML/XPath 解析 | |
| demjson3 | 非标准 JSON 解析 |
使用方式
基本用法
输出文件
脚本默认输出两种格式到指定目录(默认 ./output):
{news_id}.json- 结构化 JSON 数据{news_id}.md- Markdown 格式文章
工作流程
- 接收 URL - 用户提供新闻链接
- 平台检测 - 自动识别平台类型
- 内容提取 - 调用对应爬虫获取并解析内容
- 格式转换 - 生成 JSON 和 Markdown
- 输出文件 - 保存到指定目录
输出格式
JSON 结构
Markdown 结构
使用示例
提取微信公众号文章
输出:
提取今日头条文章
错误处理
| 错误类型 | 说明 | 解决方案 | |
|---|---|---|---|
无法识别该平台 | URL 不匹配任何支持的平台 | 检查 URL 是否正确 | |
平台不支持 | 非支持的站点 | 本 Skill 仅支持列出的新闻站点 | |
提取失败 | 网络错误或页面结构变化 | 重试或检查 URL 有效性 |
注意事项
- 仅用于教育和研究目的
- 不要进行大规模爬取
- 尊重目标网站的 robots.txt 和服务条款
- 微信公众号可能需要有效的 Cookie(当前默认配置通常可用)
参考
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingapp/skills-agent-proto/.claude/skills/news-extractor/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xiongjingzhi/agent-learn/news-extractor)