Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

travel-pricing-scraper

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

travel-pricing-scraper

In this project, Playwright is used to navigate through different airline websites, fill in search forms, click buttons, and extract price information.

  • 0.1.2
  • PyPI
  • Socket score

Maintainers
1

Travel Pricing Scraper

Documentation Status CI PyPI version

Introduction

The objective of this project is to demonstrate my skills in writing scalable, well-documented, and tested code. For this purpose, i've used Playwright as a web scraping tool to fetch airfare prices. While there are more specialized approaches to extract data of this kind, the main emphasis here is to showcase the ability to develop high-quality code using Playwright.

In this project, Playwright is used to navigate through different airline websites, fill in search forms, click buttons, and extract price information. It is important to note that in a real production environment, specific solutions would need to be considered for scraping airfare data. However, this project serves as a basic example of my skills in developing scalable, well-documented, and tested code, using Playwright as a widely documented and tested web scraping tool.

Installation

How to install

To install the project, we recommend to use pipx to install the project in a virtual environment.

pipx install travel-pricing-scraper

This is the recommended way to install the project, but you can also install it using pip:

pip install travel-pricing-scraper

Then install playwright dependencies:

playwright install

How to use

How to use?

You can use scraper via command line. For example:

travels

Options

Origin airport code: CWB
Destination airport code: POA
Date in YYYY-MM-DD format (iso format): 2023-08-01

OR with arguments:

travels --origin CWB --destination POA --date "2023-08-01"

Returns:

OrigemDestinoEmbarqueChegadaPreçoCompanhia
CWBPOA01/08/2023 às 06:0001/08/2023 às 07:15R$ 198,00Gol
CWBPOA01/08/2023 às 16:5501/08/2023 às 18:05R$ 198,00LATAM
CWBPOA01/08/2023 às 09:5501/08/2023 às 11:10R$ 369,00Azul
CWBPOA01/08/2023 às 09:5501/08/2023 às 11:10R$ 369,00Azul
CWBPOA01/08/2023 às 09:5501/08/2023 às 11:10R$ 474,00Azul
CWBPOA01/08/2023 às 09:5501/08/2023 às 11:10R$ 474,00Azul
CWBPOA01/08/2023 às 11:1001/08/2023 às 15:25R$ 278,00Gol
CWBPOA01/08/2023 às 11:5001/08/2023 às 16:15R$ 278,00Gol

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc