返回顶部
p

price-watcher价格监控

Monitor product URLs for price changes. Tracks a watchlist of products with baseline prices, fetches pages to extract current prices, and alerts on significant changes. Use when asked to: watch a price, track a price, set a price alert, check for a price drop, find a deal alert, or monitor a product price. Triggers on phrases like "price watch", "track price", "price alert", "price drop", "deal alert", "monitor price", "watch this product", or "let me know when it goes on sale".

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
105
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

price-watcher

技能名称: price-watcher
详细描述:

价格监控器

通过本地监控列表监控产品URL的价格变化。无需API密钥。

技能位置

~/.openclaw/workspace/skills/price-watcher/

所有脚本使用 SKILL_DIR(scripts/ 的父目录)来解析 watchlist.json。

核心工作流程

添加产品到监控列表

bash

自动从页面获取当前价格


python3 scripts/add_product.py https://www.amazon.com/dp/BXXX

明确指定价格和名称(自动获取失败时使用)

python3 scripts/add_product.py https://... 49.99 产品名称

检查所有价格

bash
python3 scripts/check_prices.py

输出JSON到标准输出。用新价格和时间戳更新 watchlist.json。

筛选显著变化

bash
python3 scripts/check_prices.py | python3 scripts/compare.py
python3 scripts/check_prices.py | python3 scripts/compare.py --threshold 10

默认阈值:5%。始终显示获取错误和无价格结果。

格式化为Markdown警报

bash
python3 scripts/checkprices.py | python3 scripts/compare.py | python3 scripts/formatalert.py

生成包含 📉 降价、📈 涨价和 ⚠️ 错误的Markdown报告。

监控列表格式

watchlist.json(位于技能根目录)存储一个对象数组:

json
{
url: https://...,
name: 产品名称,
baseline_price: 49.99,
last_price: 44.99,
last_checked: 2024-03-15T14:00:00+00:00,
price_history: [{price: 49.99, date: ...}]
}

完整示例请参见 assets/watchlist.example.json。

定时任务

关于cron设置、阈值调整和反爬虫注意事项,请参见 references/setup-guide.md。

错误处理

  • - fetcherror:无法获取页面(503、超时、网络问题)
  • noprice:页面已加载但未找到价格——检查网站布局是否更改
  • 无论阈值如何,这两种状态都会在 compare.py 输出和 formatalert.py 中显示
  • 如果无法提取价格且未手动提供,addproduct.py 将以错误退出

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 price-watcher-1775931345 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 price-watcher-1775931345 技能

通过命令行安装

skillhub install price-watcher-1775931345

下载

⬇ 下载 price-watcher v1.0.0(免费)

文件大小: 11.34 KB | 发布时间: 2026-4-12 11:05

v1.0.0 最新 2026-4-12 11:05
- Initial release of price-watcher.
- Monitor product URLs for price changes via a local watchlist—no API keys needed.
- Add products with automatic or manual price/name entry.
- Check all watched product prices and compare against baseline; configurable alert threshold (default 5%).
- Outputs alert reports in markdown, highlighting price drops, increases, and errors.
- Robust error handling for fetch issues and price extraction failures.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部