Skip to content

Dhruvmehta5402/FlightPriceTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flight Price Tracker 🗺️ 🛩️

This is a Python bot for tracking flight prices via email.

Functioning

When you run the code, it will send you email updates about whether the flight prices are within your range. The emails will be sent with live prices at a frequency defined by you. So, if you receive the email, you should start packing your bags. 🥳

To run the code on the terminal type out:

$ python flight_track.py

You may see some warnings but those are just issues with chrome driver and do not affect the functioning of the code.

Requirements

  • You will need to install the dependencies required for this project by:
$ pip install -r requirements.txt
  • It is recommended that you create a new Gmail account to send the emails from since you will need to change the Security options to Allow access to Less Secure Apps.
  • As you can see, at the top of the code in fligt_track.py there are a number of constants. You will want to change these constants based on your personal preferences.
    • CHECKING_INTERVAL is the interval/frequency at which the price will be checked and emails will be sent to you.
    • NUMBER_OF_CHECKS is the number of times the price will be checked and emails will be sent to you.
    • So, the program approximately runs for CHECKING_INTERVAL * NUMBER_OF_CHECKS seconds.
  • You will need to fill in in SENDER_EMAIL and SENDER_PASSWORD with the Gmail account you are sending the emails from. You will also need to fill in RECEIVER_EMAIL with the email you want to send the prices to.
  • Currently, the code tracks prices for flights from CCU to ORD at particular dates. To change this, you will need to change the URL with the destination and dates you want to, as well as the attrs attributes of the findAll function.
  • The chromedriver.exe should also be placed in the same folder as your code. If it is not, you will need to change the line driver = webdriver.Chrome()to driver = webdriver.Chrome('/path/to/chromedriver')

About

Python bot for tracking flight prices via email

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages