What is the easiest way to monitor a website and have it send us emails when there's an update

I want to make a Python 3 script that monitors my grades as a personal project and I am wondering how I can have it send me e-mails when it notices that the link has gotten updated. What kind of packages or modules do I need? Please keep in mind that I am a Python beginner. Thank you

For sending email you can take a look at the smtplib. I’d read through it. But, if you need some guidance I googled some tutorials and at first glance this looked promising. This one, as well.

I’m not sure how to get python to monitor, unless it was running all the time. Perhaps as a process? Hopefully some other members might be able to point you in the right direction.

EDIT:

After thinking about how to “Watch” a site for changes. What you could do is use the requests library, in conjunction with BeautifulSoup. Use them to request with the page then parse the html with BeautifulSoup. Then you can schedule a task on your computer (this is for windows, but there is probably one for other OS) to run the script every day or every week.

However, there are few things I haven’t thought about yet.

  1. The page with your grades, might require you to be authenticated/logged in to access.
  2. You need some way to keep track of your grades, to see if they have changed from the last time you checked.
  3. Their might be an API that the site with you grade has that makes doing all of this irrelevant.

There might be a much easier way to do everything I’ve described also. This is just my quick and dirty idea of how possibly to achieve what you are looking for. I’ve used both Requests and BeautifulSoup a few times and my experience with them, while limited, has been positive in terms of ease of use.

It’s not Python but it might be worth a look. You can use the Selenium test suit to monitor websites as well. It is developed to automate the testing of the user interface of websites but they advertise that you can automate a lot more. Have a look.

The site doesn’t have an RSS feed does it :smiley::love_you_gesture:

1 Like

Lots of great suggestions here. I’d also check out https://scrapy.org/ for web scraping, and also JavaScript might be way easier.