Flight Finder
Flight Finder is a proof-of-concept script to automate the traveling salesman project using the brute-force method. It uses Selenium alongside Google Flights, because every flight API that exists costs a lot of money. It’s written in Python, therefore, it’s slow, isn’t scalable (big O is n!), but it’s cool.
—
Lines of code: ~130
Languages: Python
Frameworks: Selenium, Google Flights
Timeframe: Late 2019
—
Note: Due to Covid-19, Flight Finder is working a lot less reliably than it would otherwise. I had to choose very few airports and use custom settings so that it would work properly. Sorry about this!
—
2021 update: Google Flights updated the way their system works, and as such, Flight Finder no longer works. Maybe in the future I’ll revisit this project and get it working again.
The main configuration of Flight Finder. This is where you input the starting airport, and then airports you want to visit. You also must put in the date of the flights.
Flight Finder bases all the flights off of the date provided. However, if this was further developed, I would adjust the date by one day for each stop.
Flight Finder has certain built-in filters from Google Flights, but also allows you to specify custom filters from the URL. I had to use a custom set of filters to make Flight Finder work due to Covid-19.
After that, Flight Finder calculates all the possible routes, and finds the best option. A cache is built in since certain legs (something like JFK-LAX in this example), so that multiple fetches from Google Flights aren’t required.
Once complete, Flight Finder will show you the best routing, and the best price that it found.
When Flight Finder was first developed, I was able to find a route with 11 stops with a total price of about ~$700. Oh the pre-covid times!