Flight-price checker using Python and Selenium
Python is a scripting language with many extended libraries and frameworks. It is used in various fields of computer science such as web development and data science. Also, Python can be used to automate some minor tasks which can be really helpful in the long run.
The Python script mentioned in this article will fetch the prices from paytm.com using selenium and if it is lesser or than equal to the amount(you are ready to spend) set by you, then a notification will be sent to the desired email-ids about the reduced price.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course
The email id which will be used to send the notifications should not use the personal password since it requires the two-factor authentication and the action will fail. Rather, a different password should be set which can be accessed by the script and many other different applications one might develop in the future.
Note: The password required for sending that email can be set through this link: Google App Passwords
Importing all the required libraries
Selenium to perform automation of the website
STMPLIB for sending notifications through emails
Extracting the price of flights between two selected dates
Sending the notification if there are cheap flights available through an email using SMTP