This repository contains CSVs in the csv directory, which are used to define a list of websites to monitor.
The files is parsed on a regular basis (see the workflow file for details) and a notification is sent via Telegram if a change has been detected.
WireGuard VPN Support
The GitHub Action supports routing requests through a WireGuard VPN connection. This is useful for monitoring websites that are only accessible from specific geographic regions (e.g., geo-restricted content).
To use WireGuard with the website monitor:
Prepare your WireGuard configuration file (.conf file from your VPN provider, e.g., ProtonVPN)
Encode the configuration file to base64:
base64 -w 0 your-config.conf
Add the following secret to your repository:
WIREGUARD_CONFIG: The base64-encoded WireGuard configuration file
active: used to enable or disable this entry, use values yes or no
error_count: The number of times an error has occured for this entry
url: the actual URL of the website
selector: as CSS selector for elements on the website
type: determines the type of the website, use static for static websites or dynamic for websites, that load most of their contant at runtime. Dynamic websites will be parsed using Selenium. Use static as a default.
proxy: used to enable or disable the proxy, use values yes or no
hash: The hash of the previous run. Make sure to always provide a value (use a dummy value for new entries)
$ python monitor.py --help
Usage:
monitor.py --url <url-of-website> [--selector <css-selector>] [--wait <number-of-seconds>] [--verbose] [--no-verify]
monitor.py (-h | --help)
monitor.py --version
Options:
-h, --help Show this screen.
--version Show version.
-u, --url <url-of-website> URL of the website to monitor.
-s, --selector <css-selector> CSS selector to check for changes [default: body].
-w, --wait <number-of-seconds> Number of seconds to wait until the URL is checked again [default: 30].
--verbose Option to enable more verbose output.
--no-verify Option to disable SSL verification for requests.
website-monitor
GitHub Action to monitor a list of websites
This repository contains CSVs in the
csvdirectory, which are used to define a list of websites to monitor. The files is parsed on a regular basis (see the workflow file for details) and a notification is sent via Telegram if a change has been detected.WireGuard VPN Support
The GitHub Action supports routing requests through a WireGuard VPN connection. This is useful for monitoring websites that are only accessible from specific geographic regions (e.g., geo-restricted content).
To use WireGuard with the website monitor:
Prepare your WireGuard configuration file (
.conffile from your VPN provider, e.g., ProtonVPN)Encode the configuration file to base64:
Add the following secret to your repository:
WIREGUARD_CONFIG: The base64-encoded WireGuard configuration filePass the secret to the workflow:
The VPN connection will be established before checking websites and terminated after all checks are complete.
CSV format
The CSV must have the following structure:
label: a label or title of the websiteactive: used to enable or disable this entry, use valuesyesornoerror_count: The number of times an error has occured for this entryurl: the actual URL of the websiteselector: as CSS selector for elements on the websitetype: determines the type of the website, usestaticfor static websites ordynamicfor websites, that load most of their contant at runtime. Dynamic websites will be parsed using Selenium. Usestaticas a default.proxy: used to enable or disable the proxy, use valuesyesornohash: The hash of the previous run. Make sure to always provide a value (use a dummy value for new entries)Example:
labelactiveerror_counturlselectortypehashScript to watch for changes in website (
monitor.py)A small script to monitor the contents of a website and get a notification if there are changes.
Installation
setup.shscript.sh or install manually the dependencies:Usage
Examples
Watch «Amtliche Sammlung» of the City of Zurich:
Ignore SSL certificate errors:
Verbose output:
Check every 5 seconds: