当前位置: 首页 > Skill >

Web Monitor

Web Monitor

Web Monitor

监控网页变化、降价、库存及自定义条件。当用户要求监视、跟踪或监控URL,或获取相关通知时使用。

3.5.0 2026.11.18 172
获取Skill文件查看使用说明
作 者:许川 许可证: 更新时间:2026.11.18
本文目录展开

Web Monitor Pro

Watch any web page. Know when it changes.

Quick Start

python3 scripts/monitor.py quickstart                        # shows suggestions + engine status
python3 scripts/monitor.py watch "https://example.com/product"
python3 scripts/monitor.py check

First Run

Use quickstart on first run. It:

  1. Creates the data directory
  2. Checks which fetch engines are available (curl, cloudscraper, playwright)
  3. Returns suggestions for popular monitoring scenarios (price drops, restocks, page changes, sales)
  4. Lists available templates
  5. Shows tips for missing engines

The agent can use this info to ask the user what they want to monitor and set it up for them.

What It Does

  • Monitors web pages for content changes, price drops, and restocks
  • Smart change summaries ("Price dropped from $389 to $331, 15% off")
  • Visual side-by-side diffs showing exactly what changed
  • Price history tracking with trends and sparklines
  • Price comparison across multiple stores
  • Templates for common setups (price drop, restock, sale)
  • JS rendering via Playwright for dynamic sites
  • Webhooks to Slack, Discord, or any endpoint
  • Groups, notes, snapshots, exports
  • No API keys. Data in ~/.web-monitor/. Uses curl by default.

Smart Watch

The easiest way to start. Point it at a URL and it figures out the rest.

python3 scripts/monitor.py watch "https://example.com/product"

It detects whether it's a product page (sets up price monitoring), a stock page (watches availability), or a regular page (tracks content). No flags needed.

Add options if you want more control:

python3 scripts/monitor.py watch "https://example.com" --group wishlist
python3 scripts/monitor.py watch "https://example.com" --browser --webhook "https://hooks.slack.com/..."

Adding Monitors

When you want full control, use add:

python3 scripts/monitor.py add "https://example.com/product" 
  --label "Cool Gadget" 
  --condition "price below 500" 
  --interval 360 
  --group "wishlist" 
  --priority high 
  --target 3000 
  --browser 
  --webhook "https://hooks.slack.com/..."

All options (work with both add and watch):

  • --label/-l name for the monitor
  • --selector/-s CSS selector to focus on (#price, .stock-status)
  • --condition/-c when to alert (see Condition Syntax below)
  • --interval/-i check interval in minutes (default: 360)
  • --group/-g category name ("wishlist", "work")
  • --priority/-p high, medium, or low (default: medium)
  • --target/-t price target number
  • --browser/-b use Playwright for JS-rendered pages
  • --webhook/-w webhook URL, repeatable for multiple endpoints

Checking Monitors

python3 scripts/monitor.py check                # check all
python3 scripts/monitor.py check --id 3          # check one
python3 scripts/monitor.py check --verbose       # include content preview

Returns status (changed/unchanged), condition info, price data, and a human-readable change summary. Examples of what summaries look like:

  • "Price dropped from $389 to $331 (15% off). Lowest price in 30 days."
  • "Back in stock! Was out of stock for 3 days."
  • "New content: 'Breaking news: AI model achieves...'"

When changes are detected, an HTML diff is auto-generated. The path appears in the diff_path field.

Dashboard

Everything at a glance.

python3 scripts/monitor.py dashboard
python3 scripts/monitor.py dashboard --whatsapp

Shows status icons, last check time, days monitored, current prices, target progress, and browser/webhook config. Groups monitors by category.

Price Trends

python3 scripts/monitor.py trend 3
python3 scripts/monitor.py trend 3 --days 30

Shows direction (rising/dropping/stable), min/max/avg with dates, target progress, and a sparkline.

Price Comparison

Compare prices across stores in a group:

python3 scripts/monitor.py compare mygroup
python3 scripts/monitor.py compare --all

Shows cheapest to most expensive, price history, and the best deal as a percentage below average.

Add a competitor to an existing monitor:

python3 scripts/monitor.py add-competitor 3 "https://competitor.com/same-product"

Creates a new monitor in the same group with the same condition.

Templates

Pre-built setups for common patterns. Skip the manual config.

python3 scripts/monitor.py template list
python3 scripts/monitor.py template use price-drop "https://example.com/product"
python3 scripts/monitor.py template use restock "https://example.com/product"
python3 scripts/monitor.py template use sale "https://example.com/deals"

Available templates:

  • price-drop watches for price decreases, snapshots current price as baseline
  • restock looks for "in stock", "available", "add to cart"
  • content-update tracks page changes with smart diff
  • sale watches for "sale", "discount", "% off"
  • new-release watches for new items or versions

Each one pre-configures the condition, interval, and priority.

Managing Monitors

python3 scripts/monitor.py list                    # all monitors
python3 scripts/monitor.py list --group wishlist   # filter by group
python3 scripts/monitor.py pause 3                 # skip during checks
python3 scripts/monitor.py resume 3                # re-enable
python3 scripts/monitor.py remove 3                # delete

Notes and Snapshots

Attach notes to any monitor:

python3 scripts/monitor.py note 3 "waiting for Black Friday"
python3 scripts/monitor.py notes 3

Take a manual snapshot:

python3 scripts/monitor.py snapshot 3
python3 scripts/monitor.py snapshot 3 --note "price before sale"

View history:

python3 scripts/monitor.py history 3
python3 scripts/monitor.py history 3 --limit 10

Visual Diffs

Side-by-side HTML comparison. Old on the left, new on the right. Green for additions, red for removals, yellow for changes.

python3 scripts/monitor.py diff 3
python3 scripts/monitor.py screenshot 3

diff generates the comparison and opens it in your browser. screenshot saves the current content for future diffing.

Reports

Weekly summary, formatted for WhatsApp:

python3 scripts/monitor.py report

Groups

python3 scripts/monitor.py groups

Lists all groups with monitor counts.

Engines and Cloudflare Support

The monitor uses a fetch engine to grab page content. By default (--engine auto), it tries engines in order until one works:

  1. curl -- fast, no dependencies, works on most sites
  2. cloudscraper -- handles Cloudflare JS challenges without a full browser
  3. playwright -- full headless browser for JS-heavy SPAs

Check what's available on your system:

python3 scripts/monitor.py engines

Force a specific engine:

python3 scripts/monitor.py watch "https://example.com" --engine cloudscraper
python3 scripts/monitor.py add "https://example.com" --engine browser

Install cloudscraper (recommended for Cloudflare-protected e-commerce sites):

pip3 install cloudscraper

The engine preference is saved per monitor. You can mix engines across monitors.

JS Rendering

Sites like Amazon, Best Buy, and most SPAs load content with JavaScript. Default curl fetching won't see it. Add --browser to use Playwright's headless Chromium:

python3 scripts/monitor.py watch "https://amazon.com/dp/B0EXAMPLE" --browser

If Playwright isn't installed, it falls back to curl and warns you. Install with:

pip3 install playwright && python3 -m playwright install chromium

Webhooks

Fire a JSON POST when conditions are met or content changes:

python3 scripts/monitor.py add "https://example.com" --webhook "https://hooks.slack.com/services/..."

Use --webhook multiple times for multiple endpoints. The payload includes monitor_id, label, url, event details (status, condition_met, change_summary, current_price), and timestamp.

Webhooks fire during check whenever something triggers.

Export and Import

python3 scripts/monitor.py export > monitors.json
python3 scripts/monitor.py import monitors.json

Import skips duplicates by URL.

GUI Console

python3 scripts/monitor.py gui

Opens ~/.web-monitor/console.html in your browser. Single self-contained HTML file. Shows all monitors, price trends, alert history, groups, and templates. Dark/light mode, filtering, sorting, sparklines. No external dependencies.

Add --no-open to generate without launching.

Condition Syntax

  • price below 500 or price < 500 alerts when price drops below threshold
  • price above 1000 or price > 1000 alerts when price exceeds threshold
  • contains 'in stock' alerts when text appears on page
  • not contains 'out of stock' alerts when text disappears

Priority Levels

  • high fires an immediate alert
  • medium is the default
  • low gets batched into digests

Automation with Cron

Set up a cron job to check monitors regularly:

Task: Check all web monitors. Run: python3 <skill_dir>/scripts/monitor.py check
Report any monitors where status is "changed" or "condition_met" is true.
If nothing changed, stay silent.

Recommended schedule: every 6 hours (0 */6 * * *). For weekly reports, run report on Mondays.

Feedback

python3 scripts/monitor.py feedback "your message"
python3 scripts/monitor.py feedback --bug "something broke"
python3 scripts/monitor.py feedback --idea "wouldn't it be cool if..."
python3 scripts/monitor.py debug

Tips

  • watch is almost always the right starting point. Use add only when you need specific conditions.
  • --selector reduces noise. If you only care about the price, point it at #price instead of the whole page.
  • Group related monitors, then use compare to find the best deal across stores.
  • Up to 50 snapshots per monitor are kept. Content is capped at 10KB per snapshot.
  • Price targets show progress in both dashboard and check output.
  • snapshot --note before a sale event gives you a clean baseline to diff against.
  • For JS-heavy sites, --browser is not optional. It's required.
  • Combine webhooks with Slack or Discord for real-time alerts without polling.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,002
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,001
PHP集成RabbitMQ实现消息队列的完整步骤

使用 php-amqplib 库,通过建立连接、声明交换机与队列并绑定,即可在 PHP 中实现消息的发送与消费。

2026.05.24 1,001
Apache开启.htaccess及使用方法详解

本文介绍如何在本地Apache环境中启用.htaccess文件,主要涉及修改httpd.conf中的AllowOverride参数。同时详细解析.htaccess的多种实用功能,包括自定义错误页面、目录密码保护、IP访问限制、URL自动转向、默认首页设置以及防止图片盗链等配置方法,并分析了使用.htaccess对服务器性能和安全性的潜在影响。

2026.05.09 1,001
Skill 文件
  • SKILL.md
    • Web Monitor Pro
    • Quick Start
      • First Run
    • What It Does
    • Smart Watch
    • Adding Monitors
    • Checking Monitors
    • Dashboard
    • Price Trends
    • Price Comparison
    • Templates
    • Managing Monitors
    • Notes and Snapshots
    • Visual Diffs
    • Reports
    • Groups
    • Engines and Cloudflare Support
    • JS Rendering
    • Webhooks
    • Export and Import
    • GUI Console
    • Condition Syntax
    • Priority Levels
    • Automation with Cron
    • Feedback
    • Tips
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期