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
urlwatchandpython2-requests. - Echo the URLs to check to
~/.urlwatch/urls.txt, one per line. - Then, copy over my
hooks.pyto~/.urlwatch/libs/hooks.pyadding the URLs to theifttt_urlstuple and substitutingYOUR_TRIGGER_NAMEandYOUR_MAKER_KEY. - Finally launch
crontab -eand 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.pyshould instead be~/.urlwatch/lib/hooks.py(libnotlibs). At least that's how it works for my version ofurlwatch.