I wrote a simple bash script for monitoring changes in a webpage. I was able to find a couple or more such scripts on the web but non of those worked for https websites with non-valid cerfificates. So here is one that does:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/bin/bash while true; do if [[ -f new_page.html ]]; then mv new_page.html old_page.html fi wget --tries=45 --wait=10 $1 -O new_page.html --no-check-certificate > /dev/null 2>&1 diff ./new_page.html ./old_page.html > /dev/null if [[ $? -ne 0 ]]; then echo "The webpage has changed!" date # mpg123 -q /home/user/latin_rhythm_guitar.mp3 firefox $1 else echo "No change" date fi # sleep some time sleep 1800 done |
The line mpg123 -q /home/user/latin_rhythm_guitar.mp3 is commented out. If you choose to play a song each time a change in the webpage occurs change the filename and un-comment.
Part of the source code is from the script found here.