Skip to content

A python script that watches a website and alerts for updates

License

Notifications You must be signed in to change notification settings

telos-matter/Padate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Padate   DEVELOPMENT STATUS: finished

Page Updater

A utility python script that checks a website periodically for updates and notifies the user when one occurs.

Useful when waiting for results, new posts, or wanting to be first on an event for example...

Example:

Supposedly you want to be notified when I add a new repository to my github account, you'd simply copy the link and run padate.py with the link as an argument, like so:

$ ./padate.py 'github.com/telos-matter?tab=repositories'

And that's it! Leave the script running and it would notify you with a ding sound once a change occurs.

There are certain options you can tweak, check them out with the help command:

$ ./padate.py -h

Requirements:

  • Python 3.10 +
  • The requests library 2.31 + pip install requests

⚠️ Notice

The script is not always reliable, as that not all pages follow an exact format. And some of them don't even allow for an easy way to retrieve the visible data. So don't use this for anything critical, like a job application or something.

How it works:

The scripts makes a request to the given URL and only saves the visible HTML content, that is text, paragraphs, headers, etc... (not images tho 💀). Then it makes a new request and checks its content with the saved one, and if they differ, it notifies the user.

Reason why it doesn't simply just compare the two requests is because some pages have dynamic content, like tokens, or meta data for example. And that would cause the script to notify the user even if the page didn't change in a meaningful way.

Feel free to implement a check for images too..

About

A python script that watches a website and alerts for updates

Topics

Resources

License

Stars

Watchers

Forks

Languages