Parser of flights from the website https://b2b.selfietravel.kz/
This project is created for interacting with the API of the Selfie Travel website for searching tours. The main goal is to allow users to search for tours based on parameters: departure city, destination country, departure date, number of adults and children, currency.
Functional capabilities:
- Initialization with a base URL for the API, setting up HTTP request headers, defining currencies, departure cities, and destination countries.
- Methods for data processing: decoding Unicode sequences, formatting HTML responses, executing GET requests, extracting data from table rows.
- The main search method `search`, which returns a list of tours based on the specified parameters.
Libraries used: requests for HTTP requests, BeautifulSoup for HTML parsing, re for regular expressions, unescape for decoding HTML entities, typing for type hinting.
Example of usage:
A user creates an instance of the class `SelfieTravelSearchWrapper` and searches for tours from Astana to Turkey on June 26, 2024, for two adults without children.
Main components:
- The class `SelfieTravelSearchWrapper` contains methods for interacting with the API and parsing data.
- The `search` method takes search parameters (departure city, destination country, departure date, number of adults and children, currency) and returns a list of tours.
The project provides a convenient interface for searching tours using the Selfie Travel API, includes methods for data processing and formatting, and allows executing requests to obtain results in a convenient format.
Functional capabilities:
- Initialization with a base URL for the API, setting up HTTP request headers, defining currencies, departure cities, and destination countries.
- Methods for data processing: decoding Unicode sequences, formatting HTML responses, executing GET requests, extracting data from table rows.
- The main search method `search`, which returns a list of tours based on the specified parameters.
Libraries used: requests for HTTP requests, BeautifulSoup for HTML parsing, re for regular expressions, unescape for decoding HTML entities, typing for type hinting.
Example of usage:
A user creates an instance of the class `SelfieTravelSearchWrapper` and searches for tours from Astana to Turkey on June 26, 2024, for two adults without children.
Main components:
- The class `SelfieTravelSearchWrapper` contains methods for interacting with the API and parsing data.
- The `search` method takes search parameters (departure city, destination country, departure date, number of adults and children, currency) and returns a list of tours.
The project provides a convenient interface for searching tours using the Selfie Travel API, includes methods for data processing and formatting, and allows executing requests to obtain results in a convenient format.