Python Tutorial: Write a Script to Monitor a Website, Send Alert Emails, and Reboot Servers

preview_player
Показать описание
In this Python Programming Tutorial, we're going to be looking at a real-world example of writing a script to monitor a website. If the website doesn't return a successful response for any reason then we will send an email and reboot the web server. Let's get started...

The code from this video (with added logging) can be found at:

Google Account Settings:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:

#Python
Рекомендации по теме
Комментарии
Автор

I put the code to this script in the description section of the video. For anyone who would like to see what some basic logging would look like for this script, I added some logging code to the script and commented it out for reference. I hope you all find these real-world examples helpful!

coreyms
Автор

I just got an Assignment from my manager to monitor our portal. You saved me.

riddhiprajapati
Автор

Working through an actual project was very helpful. The how-to tutorials are great and I still have ground to cover but I think my biggest issue is how to get started and work through the problem. Thank you for the great content!

MachineOverlords
Автор

I did something similar recently on my own. I made a python script to scan a company's 'careers' page for a job that I should be getting. It's opening up soon and a former manager is trying to help me get on. It detects how many pages there are(usually around 19 pages of results total) using the pagination text at the bottom of the page, then it will go through every list page and open up every job page on each list page to scan the whole page for a specific keyword. I think it opens like 120 or so job pages. I put like a 5 second delay in between each job page scan so it's not excessive, and in between each complete scan I make it wait around 40-60 minutes so that way it's not constantly loading pages all day. Once it finds the job im looking for, it will use the pushbullet python package using pushbullets api to send a notification to my phone. The pushbullet api is great and easy to use. I could easily add something similar to my reddit scanner, like a breaking news alert for example.

anony
Автор

I think that I will never unsubscribe your channel because You have a monster power sir, you can do great python programming and also CLI master on Linux. If I can make a request then I hope next time you make video about get how many user connecting to a network and then adjust the equal bandwidth for every hosts using iptables by using python power. Thank you.

AndriHidayatParincahan
Автор

Thank you Corey! That was fantastic as always! I love how you explain everything so clearly and write your code so flawlessly. This is definitely quite useful!

slavoie
Автор

Great work Corey, your tutorials have helped me alot.

allansifuna
Автор

Thank you! These real world example is helping me understand python and building code better.

vishvips
Автор

Love your mini projects. These are awesome please keep posting

hamids
Автор

You have the best python tutorials Corey,
Thank you so much for the efforts you put into these videos.
Keep it up

matinr
Автор

Lots of love from India !!! Thank you!! 😍🤩

yadneshkhode
Автор

One of the best tutorial in the entire universe!

praveenrajsr
Автор

Thank you Corey your videos you are very good at explaining! Just tipped you via Brave!

markcarino
Автор

This video has everything. So much valuable info, thank you!!

filipmucha
Автор

One of the best channels on the internet

RandomShowerThoughts
Автор

This type of video is also awesome! And the content is really handful. Thanks!

fvgoya
Автор

Been a bit rusty on my coding, time to bounce back!

luisshalabi
Автор

amazing videos, please keep it up. Best i've seen on YT so far

metalmasterlp
Автор

Quality content = instant subscription...😊🤗

teamLeaderOP
Автор

I don't know if u mentioned this in the video but there are nice tools created to monitor projects. Personally I use Sentry at work and seems good enough.

beornbeorn