Skip to content

luiseduardobr1/Simple_Website_Watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple_Website_Watcher

Check for updates on a website and notify by email or SMS

Requirements

How to use it

  1. Read the tutorial and get a phone number with SMS on Twilio website.
  2. Edit the Information class with your personal information to send the emails and SMS:
class Information():

    # Website Info
    URL = '<WEBSITE URL>'

    # Email Info
    FROM_EMAIL_LOGIN = '[email protected]'
    FROM_EMAIL_PASSW = '########'
    TO_EMAIL_LOGIN = '[email protected]'
    TO_EMAIL_TITLE = 'Warning: Website Updated'

    # SMS
    ACCOUNT_SID = '<TWILIO ACCOUNT_SID>'
    AUTH_TOKEN = '<TWILIO AUTH_TOKEN>'
    SMS_BODY = f'{URL} Updated'
    SMS_FROM = '<TWILIO PHONE NUMBER>'
    SMS_TO = '<YOUR PHONE NUMBER>'
  1. If your email isn't a @hotmail.com, you will need to change the host variable in Notification class (look at the table below for your specific host).
class Notification(Site_watcher):

    def send_email(self):
        yag = yagmail.SMTP(Information.FROM_EMAIL_LOGIN,
                           Information.FROM_EMAIL_PASSW,
                           host='smtp-mail.outlook.com', port=587,
                           smtp_starttls=True, smtp_ssl=False)

Port 587 is a common port for most of SMTP servers, however some may have different ports (like 465).

This table from Automate Boring Stuff with Python summarizes the majority of servers:

Provider SMTP server domain name
Gmail smtp.gmail.com
Outlook.com/Hotmail.com smtp-mail.outlook.com
Yahoo Mail smtp.mail.yahoo.com
AT&T smpt.mail.att.net (port 465)
Comcast smtp.comcast.net
Verizon smtp.verizon.net (port 465)

Warning

This is a very simple website watcher so be careful to not publish your private information online. Some emails will block this kind of activity, then you should confirm thats you.

About

Check for updates on a website and notify by email or SMS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages