Flight prices
Process Flights found and saved on kayak.com Kayak URLs and flight information were then saved into a text file
Process Text file is read and the information for each flight is loaded into the program
Process The HTML is downloaded from the URL retrieved from the text file HTML is then parsed to find the price listed on the web page
Process Date, time, flight information, and the price are appended to a .CSV file
Problems This was a quick and simple approach to the problem, but that introduced an issue Kayak.com does not update the price listing on a saved flight until the page is visited A JavaScript runs when a browser opens the page, and it takes approximately 20 seconds to complete. Simply visiting the URL and downloading the HTML was not giving up to date information
Workaround My solution was to open the Kayak pages in Chrome for a few seconds and then close them Pages were hidden in background so normal internet usage was not interrupted. HTML downloaded after a delay, giving the website enough time to update the prices
Workaround This solution worked well, but the delay increased the run time from around 1 second to 2 minutes. Not a major consequence because the Chrome pages were hidden in the background; only visible from the Task Manager
Scheduling Used Windows’ Task Scheduler Comes with Windows Set up a ‘task’ that will run the program once every four hours.
The end.