This setup allows to trigger an IFTTT event whenever a web page changes. It uses the urlwatch utility and the IFTTT Maker Channel.
Instructions:
- Sign up to IFTTT.
- Connect IFTTT's Maker Channel, and take note of your Maker key.
- Create a new Recipe that takes the Maker Channel as input and outputs wherever you want. I used IF Notifications with the IF Android app, so that I get a notification on my phone whenever the trigger runs. The script passes the updated URL to IFTTT as
value1
, and my notification containsURL updated: {{Value1}}
, so that I know which of the web pages has been updated. - On the machine that will check the website for changes install
urlwatch
andpython2-requests
. - Echo the URLs to check to
~/.urlwatch/urls.txt
, one per line. - Then, copy over my
hooks.py
to~/.urlwatch/libs/hooks.py
adding the URLs to theifttt_urls
tuple and substitutingYOUR_TRIGGER_NAME
andYOUR_MAKER_KEY
. - Finally launch
crontab -e
and set up a cron job to run urlwatch at the frequency you prefer. For example, to have it running every 30 minutes, add a line containing:*/30 * * * * urlwatch
.
Thanks, this works great! One minor typo report that took me a few minutes of head-scratching to figure out:
~/.urlwatch/libs/hooks.py
should instead be~/.urlwatch/lib/hooks.py
(lib
notlibs
). At least that's how it works for my version ofurlwatch
.