Skip to content

Python bot for downloading flight prices from Ryanair website.

Notifications You must be signed in to change notification settings

Magenta24/RyanairBot

Repository files navigation

RyanairBot

This bot is written in Python using Selenium webdriver. It crawls through Ryanair website and collects flights' prices for the period specified by user.

Requirements

Python version: Python 3.9.12

Dependencies: see requirements.txt file

Firstly, you should create virtual environment and install all required dependencies with commands

python -m venv /path/to/new/virtual/environment (venv is the name of the environment)

./path/to/new/virtual/environment/bin/activate (activate the environment)

pip install -r requirements.txt

You should also have downloaded up-to-date webdrivers

Link to Mozilla webdriver: https://github.com/mozilla/geckodriver/releases

Link to Chrome webdriver: https://chromedriver.chromium.org/downloads (you need check first your browser version)

Use Case

When your environment is prepared to run the program type command

python ./main.py

Now, you should see the GUI where you can specify flight parameters and your browser (Chrome or Mozilla). After clicking the conforming button, you'll see the browser window where you can observe the bot in action. When bot's work is done, a notification is displayed to the user with the lowest price flight. All prices for the given period can be looked up in the report generated under directory /search-reports.

Caveats

  • The bot was tested on Windows system only

  • The path to the Chrome and Mozila drivers need to be specified in Window.py in init function

  • In Window.py init uncomment below line to run the bot without opening browser's window

    options.add_argument('headless')

    Adjustments and future development

  • Allowing user to specify the webdriver path or making it relative

  • Placing the bot on the server, so it can be run automatically without user's interaction

  • Writing a client application that downloads the reports from the server and presents the prices to the user

  • Running in parallel mutiple bots

About

Python bot for downloading flight prices from Ryanair website.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published