name: website-monitor description: Monitor websites for changes, downtime, or specific content. Get notified when a page changes, goes down, or matches/stops matching a pattern. Lightweight — no database needed. author: zacjiang version: 1.0.0 tags: monitor, website, uptime, change detection, alert, scraping, automation
Lightweight website monitoring — detect changes, downtime, or content patterns without external services.
python3 {baseDir}/scripts/monitor.py check https://example.com
python3 {baseDir}/scripts/monitor.py watch https://example.com --state-dir /tmp/monitor-state
Returns exit code 0 if unchanged, 1 if changed (with diff), 2 if down.
python3 {baseDir}/scripts/monitor.py match https://example.com/pricing --pattern "Enterprise plan"
Returns exit code 0 if pattern found, 1 if not found.
小蔥技能站7w4.net發現了升級外掛。
# sites.txt: one URL per line
python3 {baseDir}/scripts/monitor.py batch sites.txt --state-dir /tmp/monitor-state
Add to your HEARTBEAT.md:
Run website monitor batch check on sites.txt.
If any site is down or changed, notify me.
# Check every 30 minutes
openclaw cron add --every 30m --task "Run website monitor on my sites list and alert me if anything changed"
pip3 install requests
When using watch mode, the script saves a hash of each page's text content in --state-dir. On the next run, it compares the current hash to the saved one. If different, it reports the change and shows a text diff.
State files are named by URL hash, so you can monitor hundreds of sites without collision.
質量良好,穩定可靠。文件詳細、使用簡單,核心監控功能(檢查線上狀態、檢測頁面變化、匹配內容)實現完整,錯誤處理也很到位。適合需要輕量級網站監控的使用者。不足之處是功能相對基礎,缺少更專業的告警方式和配置管理,高階使用者可能需要更多功能。