This repo helps you in retrieving price on a regular basis for a certain known flight. If you know the flight details, you can set a script to send you SMS about the flight price.
- Download all the pre-requisites, if not done already.
- Perform a search on Yatra.com with your search parameters(city, date, class etc)
- Copy the search URL generated and paste it in the file in the myURL
- Right click and perform Inspect Element on the price of the flight journey you want to monitor.
- Select the id and paste it into the id_code1 .
- Enter your Twilio Account SID and Auth Token in the TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN respectively.
- You can change the city and date details if you want to customise the SMS accordingly.
- Run it and Voilà! Your flight price will be sent to your phone.
- You can set a script (cron/task scheduler) to run it at a certain interval.
- Python 3
- Selenium (pip3 install selenium)
- Twilio (pip3 install twilio)
- Twilio Account with a phone number (can be added in the FREE TRIAL)
- The mobile number where the SMS needs to be sent (If an Indian number, make sure that is is not registered with DND)
- Chromedriver
Feel free to raise an issue if you have any queries.