Web differ

This project is a frontend for keeping track of static websites to see if they change.

http://server.alifeee.co.uk:5616

Screenshot of frontend

Usage

Install

python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
playwright install
mkdir snapshots
echo "id,url,css_selector\n" > sites.csv
py ./server.py

Use service

cp website-differ.service /etc/systemd/system/website-differ.service
sudo systemctl enable website-differ.service
sudo systemctl start website-differ.service

Set up cron

crontab -e

Backup tracked websites, then run the differ to check for new content.

# Run every day
0 12 * * * /root/python/website-differ/backup.sh >> /root/python/website-differ/cron.log 2>&1
0 12 * * * /root/python/website-differ/rundiffer.sh >> /root/python/website-differ/cron.log 2>&1

Development

Set up virtual environment

py -m venv env

Save dependencies

pip freeze > requirements.txt

Notifications

Notifications are sent via Pushbullet. To set up Pushbullet via python, you need to set up an access token, found in the user settings. These are stored in a .env file.

PUSHBULLET_ACCESS_TOKEN=...

See more information on https://pypi.org/project/pushbullet.py/0.9.1/.