Git Product home page Git Product logo

azul_crawler's Introduction

AzulCrawler

Fetches flight information for a date range from Azul website

Installation

You need to have a chromedriver that is specific for your chrome browser version, you can get it here.

Place the chromdriver executable in this folder.

Now, download all the dependencies:

$ mix deps.get

Now, in the terminal you can run the program with the following command:

$ mix flights

The program will ask some questions and fetch the data, you will see something like this:

Type the departure airport code (default: FLN):
> FLN

Type the arrival airport code (default: URG):
> URG

Type the start departure date in ISO 8601 format (YYYY-MM-DD) (default: 2022-10-23):
> 2022-10-23

Type the end departure date in ISO 8601 format (YYYY-MM-DD) (default: 2022-10-23):
> 2022-10-24

Is this a round-trip flight? [yN]: y

Fetching flights for FLN -> URG [≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡] 100%
Creating xlsx files         [≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡] 100%
Fetching flights for URG -> FLN [≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡] 100%
Creating xlsx files         [≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡] 100%

When the script is done, you will have some .xsls files in the same directory with the flight data.

Errors

If you see some error logs, don't worry, it just means that the website is not loading correctly.

The script will retry it automatically, it will only crash if the website fails for more than 10 times.

azul_crawler's People

Stargazers

Joel Lobo avatar JHFC avatar Lucas MR avatar William Benett avatar Wemerson Jesus avatar

Watchers

Eduardo B. A. avatar  avatar

Forkers

lucasmr3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.