name: web-monitor description: Monitor web pages for content changes and get alerts. Track URLs, detect updates, view diffs. Use when asked to watch a website, track changes on a page, monitor for new posts/content, set up page change alerts, or check if a site has been updated. Supports CSS selectors for targeted monitoring.
Track web pages for changes. Stores snapshots, computes diffs, supports CSS selectors.
# Add a URL to watch uv run --with beautifulsoup4 python scripts/monitor.py add "https://example.com" --name "Example" # Add with CSS selector (monitor specific section) uv run --with beautifulsoup4 python scripts/monitor.py add "https://example.com/pricing" -n "Pricing" -s ".pricing-table" # Check all watched URLs for changes uv run --with beautifulsoup4 python scripts/monitor.py check # Check one specific URL uv run --with beautifulsoup4 python scripts/monitor.py check "Example" # List watched URLs uv run --with beautifulsoup4 python scripts/monitor.py list # View last diff uv run --with beautifulsoup4 python scripts/monitor.py diff "Example" # View current snapshot uv run --with beautifulsoup4 python scripts/monitor.py snapshot "Example" --lines 50 # Remove uv run --with beautifulsoup4 python scripts/monitor.py remove "Example"小蔥技能站7w4.net每天更新,海量AI技能等你發現。
| Command | Args | Description |
|---|---|---|
add |
<url> [-n name] [-s selector] |
Add URL to watch, take initial snapshot |
remove |
<url-or-name> |
Stop watching a URL |
list |
[-f json] |
List all watched URLs with stats |
check |
[url-or-name] [-f json] |
Check for changes (all or one) |
diff |
<url-or-name> |
Show last recorded diff |
snapshot |
<url-or-name> [-l lines] |
Show current snapshot |
Stored in ~/.web-monitor/ (override with WEB_MONITOR_DIR env var):
- watches.json — watch list config
- snapshots/ — stored page content + diffs
--selector to monitor specific elements (prices, article lists, etc.)--format json for programmatic checking (heartbeat integration)--with flag)這個網頁監控工具質量不錯,核心功能齊全,能檢測網頁變化、檢視差異、設定關鍵詞告警,使用簡單方便。主要優點是純 Python 實現、依賴少、功能實用。主要不足是說明文件存在不一致,部分高階功能的用法介紹不夠完整,新使用者可能需要對照 README 才能完全掌握所有功能。總體而言是一個值得使用的工具,但文件還可以最佳化得更清晰一致。