HTTPS SSH

Skyscraper - Skyscanner tools

This is a simple Skyscanner scraper. It allows to search for flights.

Installation

You should use lates 2.x python interpreter (2.7 at the moment of writing). It is recommended to use virtualenv to install this package.

Installation using pip:

$ pip install https://bitbucket.org/cezio/skyscraper/get/tip.tar.gz

Skyscraper uses external dependencies:

  • requests - for easy http access
  • beautifulsoup (with lxml) - for parsing elements in sane manner
  • cliff - CLI applications framework which takes away infrastructure pains

Usage

Skyscraper can search for flights. In order to find a flight, you should know

  • departure airport (as 3-letter IATA code) and date
  • destination airport (as 3-letter IATA code) and return date if this is a round-trip voyage.

General flight search syntax:

$ skyscanner search $departure_date $departure_airport $destination_airport $return_date

For example, to search for a flight from Wroclaw (WRO) to Helsinki (HEL) on 2013-07-10 and returning on 2013-08-20, type:

$ skyscanner search 2013-07-10 wro hel 2013-08-20

After a moment you'll get list of results:

:: results for WRO -> HEL (2013-07-10) and HEL -> WRO (2013-08-20)

1 ############

direction: out

Wroclaw -> Helsinki Vantaa flight out at 07-10 15:05, landing at 07-10 21:45 (duration: 5h40m)

stops at: Warsaw
direction: in

Helsinki Vantaa -> Wroclaw flight out at 08-20 11:45, landing at 08-20 14:40 (duration: 3h54m)

stops at: Warsaw

Price for a person: 196.95 GBP

2 ############

direction: out

Wroclaw -> Helsinki Vantaa flight out at 07-10 05:30, landing at 07-10 12:20 (duration: 5h49m)

stops at: Warsaw
direction: in

Helsinki Vantaa -> Wroclaw flight out at 08-20 11:45, landing at 08-20 14:40 (duration: 3h54m)

stops at: Warsaw

Price for a person: 196.95 GBP

3 ############

direction: out

Wroclaw -> Helsinki Vantaa flight out at 07-10 15:05, landing at 07-10 21:45 (duration: 5h40m)

stops at: Warsaw
direction: in

Helsinki Vantaa -> Wroclaw flight out at 08-20 11:45, landing at 08-20 14:40 (duration: 3h54m)

stops at: Warsaw

Price for a person: 196.95 GBP

4 ############

direction: out

Wroclaw -> Helsinki Vantaa flight out at 07-10 05:30, landing at 07-10 12:20 (duration: 5h49m)

stops at: Warsaw
direction: in

Helsinki Vantaa -> Wroclaw flight out at 08-20 11:45, landing at 08-20 14:40 (duration: 3h54m)

stops at: Warsaw

Price for a person: 196.95 GBP

Hints


  • In order to speed-up, skyscraper will cache results for a dep/dst combintion, so next calls would use cached version, unless you will use switch: --no-cache. To clear the cache, just remove *.cache files from working directory.
  • To see some logging information, use switches before search command: --verbose --debug.

About

Author: Cezary Statkiewicz (c.statkiewicz@gmail.com) License: see LICENSE.txt Bug tracker: https://bitbucket.org/cezio/skyscraper/issues