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"
| Command | Args | Description |
|---|---|---|
| --------- | ------ | ------------- |
add | | Add URL to watch, take initial snapshot |
remove | | 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 | | Show last recorded diff |
snapshot | | Show current snapshot |
Stored in ~/.web-monitor/ (override with WEB_MONITOR_DIR env var):
watches.json — watch list configsnapshots/ — stored page content + diffs--selector to monitor specific elements (prices, article lists, etc.)--format json for programmatic checking (heartbeat integration)--with flag)共 2 个版本