Skip to content

Instantly share code, notes, and snippets.

@jaydlawrence
Created December 4, 2018 20:01
Show Gist options
  • Save jaydlawrence/c9e85f5c4eca87569c3599b0ee586b71 to your computer and use it in GitHub Desktop.
Save jaydlawrence/c9e85f5c4eca87569c3599b0ee586b71 to your computer and use it in GitHub Desktop.
Web site monitor - change notifications

Web site monitor - change notifications

A simple script to check a website for a particular string and notify if the occurances change.

Notify via pushover.net notification service, osascript and say

This was set up as a cron to check every 10 minutes.

*/10 * * * * /usr/bin/env bash /path/to/script/check.sh
function pushover {
curl -s \
--form-string "token=qweryty..." \
--form-string "user=asdfg..." \
--form-string "message=Changes Found" \
https://api.pushover.net/1/messages.json
}
function mac_notify {
osascript -e "display notification \"Changes Found!\" with title \"Site Checker\""
}
available=`curl <insert your url here> | grep -o 'search string' | wc -l`
if [ $available -ne 1 ];
then
pushover;
mac_notify;
say changes found;
fi
@jaydlawrence
Copy link
Author

This actually worked. It helped me get booked into a course that was selling out all the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment