Skip to content

valievav/flight_prices_tracker

Repository files navigation

FLIGHT PRICES TRACKER

PURPOSE: Return cheapest flight from the Skyskanner using custom parameters (city from/to, date etc.)

PREREQUISITES (for running on own machine):

  1. Up and running MongoDB server (db and collection created automatically if missing)
  2. Created general API key on rapidapi.com (https://docs.rapidapi.com/docs/keys)
  3. Created 'config_private_keys.py' Content: rapidapi_key = "SECRET_API_KEY"
  4. Installed libraries:
    • pymongo
    • colorama
    • send2trash
    • json
    • sys
    • requests
    • bson
    • logging

HOW TO RUN:

  1. Change parameters in config.py to custom if needed
  2. Run runner.py

PROGRAM MODE: Generally program can be run in either mode:

PROCESS FLOW:

  1. Get airport city ids from city names (departure & destination)
  2. Create Live Pricing Service Session (it should be created before requesting Live price data) and get results from Live API OR get results from Browse Quotes
  3. Record JSON into MondoDB
  4. Retry if process fails at any of the points above
  5. Record JSON into file if passed respective flag (for test purposes)
  6. Repeat process for N days (pickle date in case process was interrupted, so it's possible to continue where it left off)
  7. Find cheapest flight (or with price lower than threshold for Live API)

About

Finds Skyskanner flight with min price

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages