返回顶部
p

price-monitor价格监控

Monitor website prices, inventory, and content changes using browser automation. Use when tracking e-commerce prices, competitor monitoring, stock alerts, or any web content change detection. Supports scheduled checks, price history logging, and alert notifications.

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

price-monitor

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

价格监控器

概述

基于agent-browser的自动化价格与内容监控技能。可追踪任意网站的价格变动、库存状态及内容更新,支持可配置警报与历史记录。

快速开始

bash

监控产品价格


agent-browser open https://example.com/product/123
agent-browser snapshot -i
agent-browser get text @e1 # 获取价格元素

核心工作流

1. 单品价格检查

应用场景: 查询特定产品的当前价格

bash

导航至产品页面


agent-browser open

获取页面快照以定位价格元素

agent-browser snapshot -i

提取价格(使用快照中的对应引用)

agent-browser get text @e1

可选:保存至历史记录

echo $(date), $(price) >> price-history.csv

2. 多产品监控

应用场景: 追踪多个产品/竞品的价格变动

创建包含URL和价格选择器的products.csv文件:

csv
url,selector,name
https://site-a.com/product1,.price-tag,产品A
https://site-b.com/item2,#price,产品B

运行监控脚本:

bash
python scripts/monitor_prices.py products.csv

3. 库存预警

应用场景: 缺货商品补货时接收通知

bash
agent-browser open
agent-browser snapshot -i
agent-browser get text @e1 # 检查有货或缺货状态

4. 价格历史追踪

应用场景: 建立历史价格数据用于分析

脚本自动记录:

  • - 时间戳
  • 产品名称/URL
  • 当前价格
  • 库存状态

输出:price-history.csv或JSON格式

脚本

monitor_prices.py

主监控脚本功能:

  • - 从CSV读取产品列表
  • 依次访问每个URL
  • 使用CSS选择器提取价格
  • 记录带时间戳的结果
  • 检测价格变动
  • 可选:重大变动时发送警报

使用方法:
bash
python scripts/monitor_prices.py products.csv [--alert-threshold 10]

参数说明:

  • - products.csv - 包含URL和选择器的产品列表
  • --alert-threshold - 触发警报的变动百分比(默认:10%)

配置

产品列表格式(CSV)

csv
url,selector,name,minprice,maxprice
https://amazon.com/dp/B08N5WRWNW,.a-price-whole,索尼耳机,50,150
https://bestbuy.com/site/12345,.priceView-hero-price,电视,200,500

警报选项

  • - 邮件警报 - 配置SMTP设置
  • Discord Webhook - 推送至Discord频道
  • 文件记录 - 追加至CSV/JSON
  • 控制台输出 - 在终端打印变动信息

最佳实践

  1. 1. 请求频率限制 - 请求间添加延迟(建议30秒以上)
  2. 错误处理 - 优雅处理页面加载失败
  3. 选择器稳定性 - 使用稳定CSS选择器,避免动态类名
  4. 无头模式 - 自动化时使用浏览器无头模式
  5. 合理调度 - 在营业时间检查价格以确保准确性

示例:每日定时价格检查

bash

每天上午9点运行


0 9 * cd /path/to/skill && python scripts/monitor_prices.py products.csv

故障排除

  • - 元素未找到:重新运行快照获取更新引用
  • 价格格式问题:调整选择器或使用正则解析
  • 页面加载超时:增加超时时间或添加等待条件
  • 被网站屏蔽:添加延迟、轮换用户代理或使用住宅代理

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 price-monitor-1776153781 技能

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

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

通过命令行安装

skillhub install price-monitor-1776153781

下载

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

文件大小: 5.04 KB | 发布时间: 2026-4-15 11:46

v1.0.0 最新 2026-4-15 11:46
Initial release - Monitor product prices from any website with automated alerts and history logging.

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

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

p2p_official_large
返回顶部