新闻与资讯查询 通过 RSS 源和网页抓取获取中文新闻和全球 AI 资讯,支持多分类、关键词过滤。 无需配置 此技能开箱即用,无需 API Key。 命令行调用 支持的新闻分类 中文新闻 | 分类 | 参数值 | 来源 | |------|--------|------| | 热点要闻 | | 人民网、新华网、澎湃新闻 | | 时政 | | 人民网时政、新华网政务 | | 财经 | | 新浪财经、东方财富 | | 科技 | | 36氪、IT之家 | | 社会 | | 中国新闻网、澎湃新闻 | | 国际 | | 环球网、参考消息 | | 体育 | | 新浪体育、虎扑 | | 娱乐 | | 新浪娱乐 | AI 技术与资讯 | 分类 | 参数值 | 来源 | |------|--------|------| | AI 技术 | | MIT Tech Review、OpenAI Blog、Google AI Blog、DeepMind Blog、Latent Space、Interconnects、One Useful Thing、KDnuggets | | AI 社区 | | AI News Daily、Sebastian Raschka、Hacker News、Product Hunt | AI 源说明: - MIT Technology Review — MIT 科技评论,AI 与…

, '', text)\n data = json.loads(text)\n for item in data.get('result', {}).get('data', []):\n title = item.get('title', '')\n link = item.get('url', '')\n ctime = item.get('ctime', '')\n if title and link:\n items.append({\n \"title\": _clean(title),\n \"link\": link,\n \"source\": source_name,\n \"time\": ctime,\n \"summary\": _clean(item.get('intro', ''))[:200],\n })\n except (json.JSONDecodeError, KeyError):\n pass\n return items\n\n\n# ── 核心逻辑 ─────────────────────────────────────────────────\ndef _fetch_one_source(src):\n \"\"\"获取并解析单个新闻源(用于并发)\"\"\"\n try:\n print(f\" 📡 正在获取 {src['name']}...\", file=sys.stderr)\n text = fetch(src[\"url\"])\n if not text:\n print(f\" ❌ {src['name']} 获取失败\", file=sys.stderr)\n return []\n \n if src[\"type\"] == \"rss\":\n if 'feed.mix.sina.com.cn' in src[\"url\"]:\n items = parse_sina_api(text, src[\"name\"])\n else:\n items = parse_rss(text, src[\"name\"])\n else:\n items = parse_web_titles(text, src[\"name\"], src[\"url\"])\n \n print(f\" ✅ {src['name']} 获取成功 ({len(items)} 条)\", file=sys.stderr)\n return items\n except Exception as e:\n print(f\" ❌ {src['name']} 解析异常: {type(e).__name__}: {e}\", file=sys.stderr)\n return []\n\n\ndef fetch_news(category=\"hot\", keyword=None, limit=10):\n \"\"\"获取指定分类的新闻(并发请求所有源)\"\"\"\n from concurrent.futures import ThreadPoolExecutor, as_completed\n\n sources = SOURCES.get(category, SOURCES[\"hot\"])\n all_items = []\n \n print(f\"\\n🔍 开始获取 {CAT_NAMES.get(category, category)} 新闻...\", file=sys.stderr)\n\n with ThreadPoolExecutor(max_workers=min(len(sources), 6)) as pool:\n futures = {pool.submit(_fetch_one_source, src): src for src in sources}\n for future in as_completed(futures):\n try:\n result = future.result(timeout=15) # 单个源最多等待15秒\n all_items.extend(result)\n except Exception as e:\n src = futures[future]\n print(f\" ❌ {src['name']} 处理异常: {type(e).__name__}: {e}\", file=sys.stderr)\n\n # 去重(按标题)\n seen = set()\n unique = []\n for item in all_items:\n if item[\"title\"] not in seen:\n seen.add(item[\"title\"])\n unique.append(item)\n\n # 按时间排序(最新的在前),没有时间的放在后面\n def sort_key(item):\n time_str = item.get(\"time\", \"\")\n if not time_str:\n return \"99-99 99:99\" # 没有时间的排在最后\n return time_str\n \n unique.sort(key=sort_key, reverse=True)\n\n # 关键词过滤\n if keyword:\n keyword_lower = keyword.lower()\n unique = [i for i in unique if keyword_lower in i[\"title\"].lower() or keyword_lower in i.get(\"summary\", \"\").lower()]\n\n # 多样性优化:交错展示不同来源,避免单一来源占据前排\n if len(unique) > limit:\n diversified = []\n source_indices = {} # 记录每个来源的当前索引\n \n # 按来源分组\n by_source = {}\n for item in unique:\n source = item.get(\"source\", \"Unknown\")\n if source not in by_source:\n by_source[source] = []\n by_source[source].append(item)\n \n # 轮流从各个来源取新闻,实现多样性\n while len(diversified) \u003c limit and by_source:\n for source in list(by_source.keys()):\n if by_source[source]:\n diversified.append(by_source[source].pop(0))\n if len(diversified) >= limit:\n break\n else:\n del by_source[source]\n \n return diversified\n \n return unique[:limit]\n\n\ndef format_news(items, category=\"hot\", summary_len=100):\n \"\"\"格式化新闻输出,summary_len 控制摘要显示长度\"\"\"\n cat_name = CAT_NAMES.get(category, category)\n lines = [f\"📰 {cat_name}新闻 (共 {len(items)} 条)\\n\"]\n for i, item in enumerate(items, 1):\n time_str = f\" | {item['time']}\" if item.get('time') else \"\"\n lines.append(f\" {i}. {item['title']}\")\n lines.append(f\" 📌 {item['source']}{time_str}\")\n lines.append(f\" 🔗 {item['link']}\")\n if item.get('summary') and summary_len != 0:\n text = item['summary']\n if summary_len > 0 and len(text) > summary_len:\n text = text[:summary_len] + \"...\"\n lines.append(f\" 📝 {text}\")\n lines.append(\"\")\n return \"\\n\".join(lines)\n\n\n# ── 命令处理 ─────────────────────────────────────────────────\ndef cmd_hot(args):\n \"\"\"获取热点新闻\"\"\"\n items = fetch_news(\"hot\", keyword=args.keyword, limit=args.limit)\n if not items:\n if args.keyword:\n print(f'未找到包含关键词 \"{args.keyword}\" 的新闻')\n print(f\"\\n💡 提示:\")\n print(f\" - RSS源只包含最新热点新闻,可能不包含特定关键词\")\n print(f' - 建议使用百度搜索查找 \"{args.keyword}\" 相关新闻')\n print(f\" - 或者去掉关键词查看所有热点新闻\")\n else:\n print(\"暂无新闻数据,请稍后重试\")\n return\n if args.json:\n print(json.dumps(items, ensure_ascii=False, indent=2))\n else:\n print(format_news(items, \"hot\", summary_len=args.detail))\n\n\ndef cmd_category(args):\n \"\"\"按分类获取新闻\"\"\"\n cat = args.cat\n if cat not in SOURCES:\n print(f\"不支持的分类: {cat}\", file=sys.stderr)\n print(f\"支持的分类: {', '.join(SOURCES.keys())}\", file=sys.stderr)\n sys.exit(1)\n items = fetch_news(cat, keyword=args.keyword, limit=args.limit)\n if not items:\n cat_name = CAT_NAMES.get(cat, cat)\n if args.keyword:\n print(f'未找到包含关键词 \"{args.keyword}\" 的{cat_name}新闻')\n print(f\"\\n💡 提示:\")\n print(f\" - RSS源只包含最新新闻,可能不包含特定关键词\")\n print(f' - 建议使用百度搜索查找 \"{args.keyword}\" 相关新闻')\n print(f\" - 或者去掉关键词查看所有{cat_name}新闻\")\n else:\n print(f\"暂无 {cat_name} 新闻数据,请稍后重试\")\n return\n if args.json:\n print(json.dumps(items, ensure_ascii=False, indent=2))\n else:\n print(format_news(items, cat, summary_len=args.detail))\n\n\ndef cmd_sources(args):\n \"\"\"列出所有新闻源\"\"\"\n print(\"📡 支持的新闻分类和来源:\\n\")\n for cat, sources in SOURCES.items():\n cat_name = CAT_NAMES.get(cat, cat)\n names = \", \".join(s[\"name\"] for s in sources)\n print(f\" {cat_name} ({cat}): {names}\")\n print()\n\n\ndef main():\n parser = argparse.ArgumentParser(\n description='中文新闻聚合工具',\n formatter_class=argparse.RawDescriptionHelpFormatter,\n epilog=\"\"\"\n示例:\n %(prog)s hot 获取热点新闻\n %(prog)s hot --keyword AI 搜索 AI 相关新闻\n %(prog)s category --cat tech 获取科技新闻\n %(prog)s category --cat finance 获取财经新闻\n %(prog)s sources 查看所有新闻源\n\"\"\")\n subparsers = parser.add_subparsers(dest='command', help='命令')\n\n hp = subparsers.add_parser('hot', help='获取热点新闻')\n hp.add_argument('--keyword', '-k', help='关键词过滤')\n hp.add_argument('--limit', '-n', type=int, default=10, help='返回条数(默认 10)')\n hp.add_argument('--detail', '-d', type=int, default=100, help='摘要长度(默认 100,0=不显示,-1=全文)')\n hp.add_argument('--json', action='store_true', help='JSON 格式输出')\n\n cp = subparsers.add_parser('category', help='按分类获取新闻')\n cp.add_argument('--cat', '-c', required=True, choices=list(SOURCES.keys()), help='新闻分类')\n cp.add_argument('--keyword', '-k', help='关键词过滤')\n cp.add_argument('--limit', '-n', type=int, default=10, help='返回条数(默认 10)')\n cp.add_argument('--detail', '-d', type=int, default=100, help='摘要长度(默认 100,0=不显示,-1=全文)')\n cp.add_argument('--json', action='store_true', help='JSON 格式输出')\n\n subparsers.add_parser('sources', help='查看所有新闻源')\n\n args = parser.parse_args()\n if not args.command:\n parser.print_help()\n sys.exit(1)\n\n {'hot': cmd_hot, 'category': cmd_category, 'sources': cmd_sources}[args.command](args)\n\n\nif __name__ == '__main__':\n main()\n","content_type":"text/x-python; charset=utf-8","language":"python","size":19656,"content_sha256":"1815055d88dbea21615212f152b50dff3cd63e3343f9ee6cf30488e072c95bb1"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"新闻与资讯查询","type":"text"}]},{"type":"paragraph","content":[{"text":"通过 RSS 源和网页抓取获取中文新闻和全球 AI 资讯,支持多分类、关键词过滤。","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"无需配置","type":"text"}]},{"type":"paragraph","content":[{"text":"此技能开箱即用,无需 API Key。","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"命令行调用","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# 获取热点新闻(默认)\npython skills/news/scripts/news.py hot\n\n# AI新闻资讯查询\npython skills/news/scripts/news.py category --cat ai --limit 20\n\n# 按分类查询\npython skills/news/scripts/news.py category --cat tech\npython skills/news/scripts/news.py category --cat finance\npython skills/news/scripts/news.py category --cat ai\npython skills/news/scripts/news.py category --cat ai-community\n\n# 关键词搜索\npython skills/news/scripts/news.py hot --keyword AI\npython skills/news/scripts/news.py category --cat ai --keyword GPT\n\n# 控制摘要长度(默认 100 字符)\npython skills/news/scripts/news.py category --cat ai --detail 500 # 显示 500 字符摘要\npython skills/news/scripts/news.py category --cat ai --detail -1 # 显示全文\npython skills/news/scripts/news.py category --cat ai --detail 0 # 不显示摘要\n\n# 指定返回条数\npython skills/news/scripts/news.py hot --limit 20\n\n# JSON 格式输出(包含完整正文,不截断)\npython skills/news/scripts/news.py hot --json\n\n# 查看所有支持的分类和来源\npython skills/news/scripts/news.py sources","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"支持的新闻分类","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"中文新闻","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"分类","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"参数值","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"来源","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"热点要闻","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"hot","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"人民网、新华网、澎湃新闻","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"时政","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"politics","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"人民网时政、新华网政务","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"财经","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"finance","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"新浪财经、东方财富","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"科技","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"tech","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"36氪、IT之家","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"社会","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"society","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"中国新闻网、澎湃新闻","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"国际","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"world","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"环球网、参考消息","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"体育","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"sports","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"新浪体育、虎扑","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"娱乐","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"entertainment","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"新浪娱乐","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"AI 技术与资讯","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"分类","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"参数值","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"来源","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"AI 技术","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ai","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"MIT Tech Review、OpenAI Blog、Google AI Blog、DeepMind Blog、Latent Space、Interconnects、One Useful Thing、KDnuggets","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"AI 社区","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ai-community","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"AI News Daily、Sebastian Raschka、Hacker News、Product Hunt","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"AI 源说明:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"MIT Technology Review — MIT 科技评论,AI 与前沿技术深度报道","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"OpenAI Blog — OpenAI 官方博客,模型发布与研究动态","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Google AI Blog — Google AI 研究与产品更新","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"DeepMind Blog — DeepMind 研究进展","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Latent Space — AI 工程师社区播客与文章","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Interconnects — Nathan Lambert 的 AI 技术深度分析","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"One Useful Thing — Ethan Mollick 的 AI 实践应用分享","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"KDnuggets — AI/ML 技术文章聚合","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"AI News Daily — AI 行业每日新闻汇总","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Sebastian Raschka — 机器学习深度技术博客","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Hacker News — 科技新闻与讨论社区","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Product Hunt — 新产品发现平台(含 AI 产品)","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"AI 调用场景","type":"text"}]},{"type":"paragraph","content":[{"text":"用户说\"今天有什么新闻\":","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python skills/news/scripts/news.py hot --limit 10","type":"text"}]},{"type":"paragraph","content":[{"text":"用户说\"最近 AI 有什么新动态\":","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python skills/news/scripts/news.py category --cat ai --limit 10","type":"text"}]},{"type":"paragraph","content":[{"text":"用户说\"有什么新的 AI 产品\":","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python skills/news/scripts/news.py category --cat ai-community --limit 10","type":"text"}]},{"type":"paragraph","content":[{"text":"用户说\"搜一下关于 GPT 的新闻\":","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python skills/news/scripts/news.py category --cat ai --keyword GPT --limit 15","type":"text"}]},{"type":"paragraph","content":[{"text":"用户想深入阅读某篇文章:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# 使用 --detail -1 获取 RSS 全文内容\npython skills/news/scripts/news.py category --cat ai --keyword \"关键词\" --detail -1 --limit 5\n\n# 或使用 --json 获取完整 JSON(含全文)\npython skills/news/scripts/news.py category --cat ai --keyword \"关键词\" --json --limit 5","type":"text"}]},{"type":"paragraph","content":[{"text":"获取新闻后,整理为简洁的列表返回给用户,包含标题、来源和链接。英文内容可适当翻译摘要。","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"深入阅读策略","type":"text"}]},{"type":"paragraph","content":[{"text":"当用户想详细了解某篇新闻时,按以下优先级获取全文:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"首选:","type":"text","marks":[{"type":"strong"}]},{"text":"--detail -1","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" 或 ","type":"text","marks":[{"type":"strong"}]},{"text":"--json","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — 直接从 RSS 源获取全文内容,无需额外网络请求","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"备选:","type":"text","marks":[{"type":"strong"}]},{"text":"web_fetch","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":"(仅限中文新闻源)","type":"text","marks":[{"type":"strong"}]},{"text":" — 人民网、新华网、澎湃新闻、36氪等中文站点通常允许抓取","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"不要对 AI 类源使用 ","type":"text","marks":[{"type":"strong"}]},{"text":"web_fetch","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" — OpenAI Blog、MIT Tech Review、Google AI Blog、DeepMind Blog 等网站会返回 403/404,无法抓取","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"注意事项","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"纯 Python 标准库实现,无需额外依赖","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"RSS 源可能因网站调整而失效,脚本会自动跳过失败的源","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"AI 类源为英文内容,返回给用户时可适当翻译","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"多数 AI 博客网站(OpenAI、Google AI、DeepMind、MIT Tech Review 等)会阻止 ","type":"text"},{"text":"web_fetch","type":"text","marks":[{"type":"code_inline"}]},{"text":" 直接访问(返回 403/404),因此深入阅读 AI 文章应使用 ","type":"text"},{"text":"--detail -1","type":"text","marks":[{"type":"code_inline"}]},{"text":" 从 RSS 获取全文,而非尝试抓取原始链接","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"中文新闻源(人民网、澎湃、36氪等)通常允许 ","type":"text"},{"text":"web_fetch","type":"text","marks":[{"type":"code_inline"}]},{"text":" 抓取详情页","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"news","author":"@skillopedia","source":{"stars":703,"repo_name":"countbot","origin_url":"https://github.com/countbot-ai/countbot/blob/HEAD/workspace/skills/news/SKILL.md","repo_owner":"countbot-ai","body_sha256":"12823b340178ed17b293534da96cd0d376075ca67a41f75adacfe75d383c0374","cluster_key":"c1b2c923c812b46f82f75594bf3fa6b649a5268e4a0f7c80e2ec786bef999145","clean_bundle":{"format":"clean-skill-bundle-v1","source":"countbot-ai/countbot/workspace/skills/news/SKILL.md","attachments":[{"id":"7a8c89be-656c-539e-a713-b55b2621f914","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/7a8c89be-656c-539e-a713-b55b2621f914/attachment.py","path":"scripts/news.py","size":19656,"sha256":"1815055d88dbea21615212f152b50dff3cd63e3343f9ee6cf30488e072c95bb1","contentType":"text/x-python; charset=utf-8"}],"bundle_sha256":"73d50b32987b1d441adbadee06661394305a65c75b29fe35e3e0f7d5b895183c","attachment_count":1,"text_attachments":1,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"workspace/skills/news/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"general","category_label":"General"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"general","homepage":"https://github.com/countbot-ai/CountBot","import_tag":"clean-skills-v1","description":"新闻与资讯查询。获取中文新闻和全球 AI 技术资讯,支持按分类查询(时政、财经、科技、社会、国际、体育、娱乐、AI 技术、AI 社区)。当用户询问最新新闻、AI 动态、行业资讯时使用。"}},"renderedAt":1782981040621}

新闻与资讯查询 通过 RSS 源和网页抓取获取中文新闻和全球 AI 资讯,支持多分类、关键词过滤。 无需配置 此技能开箱即用,无需 API Key。 命令行调用 支持的新闻分类 中文新闻 | 分类 | 参数值 | 来源 | |------|--------|------| | 热点要闻 | | 人民网、新华网、澎湃新闻 | | 时政 | | 人民网时政、新华网政务 | | 财经 | | 新浪财经、东方财富 | | 科技 | | 36氪、IT之家 | | 社会 | | 中国新闻网、澎湃新闻 | | 国际 | | 环球网、参考消息 | | 体育 | | 新浪体育、虎扑 | | 娱乐 | | 新浪娱乐 | AI 技术与资讯 | 分类 | 参数值 | 来源 | |------|--------|------| | AI 技术 | | MIT Tech Review、OpenAI Blog、Google AI Blog、DeepMind Blog、Latent Space、Interconnects、One Useful Thing、KDnuggets | | AI 社区 | | AI News Daily、Sebastian Raschka、Hacker News、Product Hunt | AI 源说明: - MIT Technology Review — MIT 科技评论,AI 与…