Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flight prices.

Similar presentations


Presentation on theme: "Flight prices."— Presentation transcript:

1 Flight prices

2 Process Flights found and saved on kayak.com
Kayak URLs and flight information were then saved into a text file

3 Process Text file is read and the information for each flight is loaded into the program

4 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

5 Process Date, time, flight information, and the price are appended to a .CSV file

6

7 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

8 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

9 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

10 Scheduling Used Windows’ Task Scheduler
Comes with Windows Set up a ‘task’ that will run the program once every four hours.

11 The end.


Download ppt "Flight prices."

Similar presentations


Ads by Google