I was planning to write this tutorial long ago when I actually did such an automation system. I was inspired by Reddit people to do this ๐
The idea is that we want some sort of app that will check daily cases in the selected country about the COVID-19 situation and send a report via text message.
We will use Python to write the code and Twilio services for sending text messages (You need an account there – it’s free).
Let’s start with some libraries that we will need:
Here we have Selenium for using the web, pandas for focusing on data, time because my server needs some time to process ๐ and Twilio as a service for our Text messages.
The code I’ll explain in comments, let’s create our class
Basically, that’s it. We have set up a web driver and wrote our tracker function. To send text messages we need Twilio, from the documentation we need to implement this piece of code:
Account_sid and auth_token are values that you need to get from your account, same with Twilio numbers. For now, you are ready to go!
For running the script automatically on daily basis you can use a WayScript it’s also free for some tasks service where you can put your code and set automation however you want.
If you want to see full code, check out my GitHub
Comments
Post a Comment