Install
openclaw skills install news-watcherMonitors CoinDesk or PANews for new crypto articles, summarizes them, and sends updates to Telegram without API keys or login.
openclaw skills install news-watcher使用 Playwright 实时监听虚拟货币新闻网站,检测新文章发布并自动抓取全文、AI 总结、推送 Telegram。
完全开源透明 · 源码 + 运行截图:https://github.com/vvxer/openclaw-news-watcher
| 变量 | 必填 | 说明 |
|---|---|---|
OPENCLAW_MJS | ✅ 必填 | openclaw.mjs 的完整路径,用于调用 AI Agent 和发送消息 |
TELEGRAM_USER_ID | ✅ 必填 | Telegram 收件人 Chat ID |
CHROME_PATH | 可选 | 本地 Chrome 路径;未设置时按平台自动检测 |
PLAYWRIGHT_HEADLESS | 可选 | 设为 false 显示浏览器窗口(调试用),默认 true |
# Windows PowerShell
$env:OPENCLAW_MJS = "D:\openclaw\node_modules\openclaw\openclaw.mjs"
$env:TELEGRAM_USER_ID = "你的ChatID"
# Linux / macOS
export OPENCLAW_MJS="/path/to/openclaw.mjs"
export TELEGRAM_USER_ID="你的ChatID"
node {baseDir}/scripts/watch-news.js
node {baseDir}/scripts/watch-news.js --site panews
node {baseDir}/scripts/watch-news.js --site coindesk --interval 120
--site <name> - 网站名称(支持: coindesk, panews)--interval <seconds> - 检查间隔(秒),默认 60openclaw agent 生成中文摘要openclaw message send 发送到 Telegram新闻哈希缓存存储在:~/.openclaw/cache/news-hash.json
node ~/.openclaw/workspace/skills/news-watcher/scripts/watch-news.js --site coindesk --interval 60
openclaw agent --message "监听 CoinDesk 新闻,有更新就通知我" --timeout 600
openclaw cron add \
--name "Morning News Digest" \
--cron "0 7 * * *" \
--tz "Asia/Shanghai" \
--session isolated \
--message "总结过去一晚上的加密新闻,列出前 3 个重点" \
--announce \
--channel telegram \
--to "$TELEGRAM_USER_ID"
| 网站 | site 参数 | 说明 |
|---|---|---|
| CoinDesk | coindesk | 全球权威加密新闻 |
| PANews | panews | 中文区块链新闻 |
编辑 watch-news.js,在 sites 对象中添加:
const sites = {
coindesk: { /* ... */ },
mynews: {
url: 'https://example.com/news',
selector: '.article-item',
getContent: () => { /* 可选自定义提取逻辑 */ }
}
};
export OPENCLAW_MJS="/path/to/openclaw.mjs"
export TELEGRAM_USER_ID="你的Telegram Chat ID"
node {baseDir}/scripts/watch-news.js --interval 180
PLAYWRIGHT_HEADLESS=false node {baseDir}/scripts/watch-news.js
export CHROME_PATH="/usr/bin/google-chrome" # Linux
export CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" # macOS