Page Monitor

A simple webpage monitor that sends an email if website's content changes.

What we see depends mainly on what we look for.- John Lubbock

Algorithm

The algorithm for this project is:

1. Request a site:

Enter a URL:

2. Get the hash of the site:

d41d8cd98f00b204e9800998ecf8427e

3. Check the hash against the existing data:

Let’s pretend the previous hash of the content at https://hightower.space/projects/ was:

abcdef198f00b204e9800998ecf8427e

4. Take Action

If the new hash of the URL content is different, an alert will be sent to the email address passed into the script and the new hash will be recorded. In our example, the new hash (d41d8cd98f00b204e9800998ecf8427e) is different from the old hash (abcdef198f00b204e9800998ecf8427e) so an alert would be sent.

If the hash of a URL’s content is the same as it was the last time the script was run, nothing will be updated.

Usage

usage: page_monitor.py [-h] email_address email_account_password

Monitor a webpage for changes to its content and send alerts if there are any changes.

positional arguments:

  • email_address an email address from which I can send updates if a webpage changes

  • email_account_password the password for the email address so that I can send notifications if a webpage changes

optional arguments:

  • -h, –help show this help message and exit

You can learn more here: https://gitlab.com/fhightower/page-monitor.


  • Idyll
  • Python