手把手教你用 OpenClaw 搭建个人情报系统(2026 最新版)
手把手教你用 OpenClaw 搭建个人情报系统
信息过载时代,如何用 AI 自动监控关键信息,不错过任何重要消息?
给需要监控行业动态的职场人、投资者、创业者
01 场景痛点
你是不是也经常遇到这些问题:
-
📰 行业资讯太多:每天几百篇公众号、新闻推送,根本看不过来 -
📈 股市异动错过:盯盘太累,等看到消息时已经晚了 -
📋 竞品信息滞后:等知道对手动作时,市场已经被抢占 -
⏰ 重要通知遗漏:政策文件、招标信息,等看到时已经截止
我的真实经历:
去年有一次,我关注的某上市公司凌晨发布重大合同公告,等我第二天早上看到时,股价已经涨了 7%…
从那天起,我下定决心要搞一套自动监控系统。
我的解决方案:用 OpenClaw 搭建一个 24h 自动运行的个人情报系统,关键信息自动推送到微信。
使用效果:
-
✅ 每天节省约 1.5 小时信息搜集时间 -
✅ 重要信息 100% 不漏掉 -
✅ 提前 3 次捕捉到行业政策变化
先看一下最终效果👇
💡 截图位置 1:微信推送消息截图(展示实际推送效果)
命令
【GA要闻早报】2026-05-17 ━━━━━━━━━━━━━━━━ • GAB部署夏季治安打击整治行动 来源:GA部官网 | 10:30 https://www.mps.gov.cn/n6557558/c10057891/content.html • 全国GA机关开展反诈专项行动 来源:央视新闻 | 09:15 https://news.cctv.com/2026/05/17/xxxx.shtml
每天早上 8 点,自动推送昨晚至今早的重要情报。
· · · ✦ · · ·
02 第一步:安装 OpenClaw(5 分钟)
2.1 环境准备
Bash
# 确保已安装 Node.js 18+ node -v # 输出示例:v20.10.0 # 确保已安装 Python 3.8+ python3 -v # 输出示例:Python 3.10.12
💡 提示:
如果版本过低,建议先升级。Node.js 官网下载 LTS 版本,Python 可用 brew install python@3.10(Mac)或 apt install python3(Linux)
2.2 安装 OpenClaw
Bash
# 使用 npm 全局安装 npm install -g openclaw # 验证安装 openclaw –version # 输出示例:OpenClaw 2026.4.14
💡 截图位置 2:终端安装成功截图
2.3 初始化配置
Bash
# 创建配置目录 mkdir -p ~/.openclaw/workspace # 进入工作目录 cd ~/.openclaw/workspace
⚠️ 注意事项:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
💡 我的配置:
阿里云轻量应用服务器(2 核 4G,99 元/月),运行半年无故障
· · · ✦ · · ·
03 第二步:配置定时任务(10 分钟)
3.1 创建情报监控脚本
在工作目录下创建 intelligence_monitor.py:
Python
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests import json from datetime import datetime from bs4 import BeautifulSoup # ============ 配置监控源 ============ SOURCES = [ { “name”: “GA部官网”, “url”: “https://www.mps.gov.cn/n6557558/index.html”, “keywords”: [“专项行动”, “部署”, “通知”, “政策”], “selector”: “li a” # CSS 选择器,根据实际网站调整 }, { “name”: “证监会”, “url”: “http://www.csrc.gov.cn/csrc/home/index.shtml”, “keywords”: [“政策”, “监管”, “处罚”, “立案”], “selector”: “.news-list a” }, # 添加更多监控源… ] # ============ 核心函数 ============ def fetch_news(source): “””抓取新闻列表””” try: headers = { ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36’ } response = requests.get(source[‘url’], headers=headers, timeout=10) response.encoding = ‘utf-8’ soup = BeautifulSoup(response.text, ‘html.parser’) links = soup.select(source[‘selector’]) news_list = [] for link in links[:20]: # 只取前 20 条 title = link.get_text(strip=True) href = link.get(‘href’, ”) if title and href: news_list.append({ ‘title’: title, ‘url’: href if href.startswith(‘http’) else source[‘url’].rsplit(‘/’, 1)[0] + ‘/’ + href, ‘time’: datetime.now().strftime(‘%H:%M’), ‘source’: source[‘name’] }) return news_list except Exception as e: print(f”❌ 抓取 {source[‘name’]} 失败:{e}”) return [] def filter_by_keywords(news_list, keywords): “””按关键词过滤””” filtered = [] for news in news_list: for keyword in keywords: if keyword in news[‘title’]: filtered.append(news) break return filtered def save_to_file(news_data): “””保存到临时文件,等待推送””” timestamp = datetime.now().strftime(“%Y%m%d”) file_path = f”/tmp/intelligence_{timestamp}.json” with open(file_path, “w”, encoding=’utf-8′) as f: json.dump(news_data, f, ensure_ascii=False, indent=2) return file_path # ============ 主程序 ============ if __name__ == “__main__”: print(f”🚀 开始抓取情报 – {datetime.now().strftime(‘%Y-%m-%d %H:%M’)}”) all_news = [] for source in SOURCES: print(f”📡 正在抓取:{source[‘name’]}…”) news = fetch_news(source) filtered = filter_by_keywords(news, source[“keywords”]) all_news.extend(filtered) print(f” ✅ {source[‘name’]}: {len(filtered)} 条匹配”) # 去重 unique_news = [] seen_urls = set() for news in all_news: if news[‘url’] not in seen_urls: unique_news.append(news) seen_urls.add(news[‘url’]) file_path = save_to_file(unique_news) print(f”\n✅ 抓取完成,共 {len(unique_news)} 条情报”) print(f”📁 已保存到:{file_path}”)
💡 依赖安装:
pip install requests beautifulsoup4
💡 截图位置 3:脚本运行成功截图(终端输出)
3.2 配置定时任务
Bash
# 编辑 crontab crontab -e # 添加定时任务(每天早上 7:30 执行) 30 7 * * * /usr/bin/python3 /root/.openclaw/workspace/intelligence_monitor.py >> /root/.openclaw/workspace/cron.log 2>&1
💡 提示:
加上 >> cron.log 可以把运行日志记录下来,方便排查问题
· · · ✦ · · ·
04 第三步:绑定微信推送(10 分钟)
4.1 配置 OpenClaw 微信通道
在工作目录创建 .env 文件:
Bash
# 微信 Bot 配置 WECHAT_BOT_TOKEN=your_bot_token_here WECHAT_BOT_USER_ID=o9cq80zbFi9_TjHMxCqdk2bx5bFI@im.wechat
4.2 创建推送脚本
创建 wechat_pusher.py:
Python
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import os from datetime import datetime def load_intelligence(): “””读取情报数据””” timestamp = datetime.now().strftime(“%Y%m%d”) file_path = f”/tmp/intelligence_{timestamp}.json” if not os.path.exists(file_path): return [] with open(file_path, “r”) as f: return json.load(f) def format_message(news_list): “””格式化推送消息””” header = f”【情报早报】{datetime.now().strftime(‘%Y-%m-%d’)}\n” header += “━” * 32 + “\n\n” content = “” for i, news in enumerate(news_list[:10], 1): content += f”• {news[‘title’]}\n” content += f” 来源:{news[‘source’]} | {news[‘time’]}\n” content += f” {news[‘url’]}\n\n” footer = “\n💡 获取完整情报源配置,加入知识星球:https://t.zsxq.com/qCz8e” return header + content + footer def send_to_wechat(message): “””发送到微信””” # 调用 OpenClaw 消息接口 # 具体实现参考 OpenClaw 文档 pass if __name__ == “__main__”: news = load_intelligence() if news: message = format_message(news) send_to_wechat(message) print(“✅ 推送成功”) # 清理已推送文件 timestamp = datetime.now().strftime(“%Y%m%d”) os.remove(f”/tmp/intelligence_{timestamp}.json”)
4.3 配置推送定时任务
Bash
# 编辑 crontab crontab -e # 添加推送任务(每天早上 8:00 执行) 0 8 * * * /usr/bin/python3 /root/.openclaw/workspace/wechat_pusher.py
· · · ✦ · · ·
05 第四步:实战案例
5.1 案例一:GA要闻监控
监控源:
-
GA部官网 -
各省市GA厅局网站 -
GA系统公众号
关键词:专项行动、部署、通知、政策、改革
推送频率:每日早 8 点
5.2 案例二:股市异动监控
监控源:
-
证监会官网 -
交易所公告 -
财经新闻网站
关键词:立案调查、行政处罚、重大合同、业绩预告
推送频率:实时推送(重要)+ 每日汇总
5.3 案例三:竞品情报监控
监控源:
-
竞争对手官网 -
行业媒体 -
招投标平台
关键词:新产品、融资、合作、人事变动
推送频率:每日晚 8 点
· · · ✦ · · ·
06 资源包下载
📦 完整代码包包含:
|
|
|
|
intelligence_monitor.py |
|
|
wechat_pusher.py |
|
|
config.json |
|
|
requirements.txt |
|
|
deploy.sh |
|
|
|
|
|
|
获取方式:
| 1 |
|
| 2 |
|
| 3 |
|
💡 提示:
代码包已更新到 2026 年 5 月版本,兼容最新 OpenClaw
· · · ✦ · · ·
07 常见问题
Q1:服务器配置要求?
答:2 核 4G 足够,推荐阿里云/腾讯云轻量应用服务器(约 100 元/月)
我的配置:阿里云轻量应用服务器 2 核 4G,99 元/月,运行半年无故障
Q2:微信推送会封号吗?
答:使用企业微信 Bot 或第三方服务(如微伴助手),个人号建议控制频率(每日≤10 条)
推荐方案:
-
个人使用:企业微信 Bot(免费,安全) -
多人推送:微伴助手(有免费版) -
高级玩法:公众号模板消息(需认证)
Q3:可以监控公众号文章吗?
答:可以,但需要额外配置 RSS 源或使用第三方服务(知识星球有详细教程)
推荐工具:
-
WeChat2RSS(开源项目) -
知微(付费服务) -
知识星球有完整配置教程
Q4:部署遇到问题怎么办?
答:加入知识星球社群,有专属答疑通道,24h 内响应
星球福利:
-
✅ 完整代码包(含 20+ 预设监控源) -
✅ 部署视频教程(录屏,15 分钟) -
✅ 专属答疑(24h 内响应) -
✅ 持续更新(新增监控源、新功能)
加入方式:公众号回复【星球】或点击 https://t.zsxq.com/qCz8e
Q5:能监控海外网站吗?
答:可以,但需要服务器有海外访问能力,或配置代理
· · · ✦ · · ·
08 延伸玩法
搭建好基础系统后,你还可以:
| 1 | 接入大模型:
|
| 2 | 情感分析:
|
| 3 | 自动分类:
|
| 4 | 多人推送:
|
这些进阶玩法,我会在知识星球持续更新…
· · · ✦ · · ·
📌 小结
用 OpenClaw 搭建个人情报系统,核心就 4 步:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
总耗时:30 分钟,之后每天自动运行
我的使用感受:
这套系统我已经跑了100天,每天准时推送,再也没错过重要信息。最爽的一次是提前 2 天捕捉到某个行业政策变化,及时调整了投资方向。
信息时代,先人一步获取情报 = 先人一步抓住机会。
花 30 分钟搭建,换来每天 1.5 小时的时间节省 + 100% 信息覆盖,这笔账很划算。
· · · ✦ · · ·
🦞 关于作者
我是小智,专注 AI 工具 + 商业分析 + 职场成长。
往期爆款:
-
《OpenClaw 入门指南》阅读量 1000+ -
《Hermes Agent 阿里云部署》阅读量 800+ -
《AI 替代清单》阅读量 600+
📬 获取更多资源:
|
|
|
| 【AI】 |
|
| 【商业】 |
|
| 【情报系统】 |
|
| 【星球】 |
|
👇 下期预告:
《2026 AI 替代清单:这 8 个岗位正在消失,这 5 个正在爆发》
看到这里,顺手做 3 件事 👇
💬 留言 说说你想监控哪些信息源
⭐ 收藏 备用,搭建时用得着
📤 转发 给同样需要情报系统的朋友
*本文首发于「智行者笔记」公众号,未经授权禁止转载*
📅 发布日期:2026 年 5 月 21 日
夜雨聆风