I need a script that runs several searched on a specific flight search website I will give you, and outputs some results to stdout. It can be written either in Python or in JS (using phantomjs).
The script will receive as input:
1. departure airport code (3 chars)
2. destination airport code (3 chars)
3. start date of date range of the searches
4. end date of date range of the searches
The script will log into the website once, and on future runs will use the session/cookies from the previous run. If the website asks for a re-login, the script should automatically detect that and login again. For testing purposes you will need to create a free account on this website.
The script should run a separate search for each day in the search range, searching for direct (non-stop) one-way flights between the departure and destination airports.
For each result in the list, the script should parse a div containing "available booking classes) that contain combination of 1-2 letters and 1 number (e.g. "A2 LS3 F9 J0 XB3"). The script should then print out the list of all such combinations that do not end with a zero.
The code should be very readable, well organized, have self-explanatory identifier names, have clear log outputs as it is working, have clear error messages for each part that fails, have reasonable assertions for the pages structure (so that if the website changes, the script exits instead of repeatedly making invalid requests), and have simple way to see the browser state in case of failures (e.g. via the screenshot option of phantomjs, or by looking at a real, not headless, browser that the code controls).
At the top of your bid please describe which framework/language you would prefer using for this and why.
Thanks for bidding!