American Airlines scraper in Python
Project description
American Airlines scraper in Python
Overview
This project is an open-source tool developed in Python for extracting product information from American Airlines. It's designed to be easy to use, making it an ideal solution for developers looking for American Airlines product data.
Features
- Full search support
- Extracts detailed product information from American Airlines
- Implemented in Python just because it's popular
- Easy to integrate with existing Python projects
Install
$ pip install pyaair
Examples
fromDir="miami"
toDir="texas"
airports1=pyaair.airports(fromDir,"")
airports2=pyaair.airports(toDir,"")
f = open("./airports1.json", "w")
f.write(json.dumps(airports1))
f.close()
f2 = open("./airports2.json", "w")
f2.write(json.dumps(airports2))
f2.close()
originAirport = "GYE"
destinationAirport = "MIA"
departDate = "2024-05-01"
returnDate = "2024-05-04"
passengers = 1
#locale: where you are located, probably for increasing the price or is just for statistics, I DON'T KNOW, do not say that I said this field is for incresing the price, it's jut a theory
locale = "es_EC"
flights=pyaair.flights(locale, originAirport, destinationAirport, departDate, returnDate, passengers,"")
f2 = open("./flights.json", "w")
f2.write(json.dumps(flights))
f2.close()
fromDir = "new york"
toDir = "galapagos"
departDate = "2024-05-01"
returnDate = "2024-05-04"
passengers = 1
#locale: where you are located, probably for increasing the price or is just for statistics, I DON'T KNOW, do not say that I said this field is for incresing the price, it's jut a theory
locale = "es_EC"
airports1=pyaair.airports(fromDir,"")
airports2=pyaair.airports(toDir,"")
flights=pyaair.flights(locale, airports1[0]["code"], airports2[0]["code"], departDate, returnDate, passengers,"")
f2 = open("./flights.json", "w")
f2.write(json.dumps(flights))
f2.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyaair-0.0.0.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file pyaair-0.0.0.tar.gz
.
File metadata
- Download URL: pyaair-0.0.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bb529e7da6e514f52c264ee3e813ea279abdcf36d1b152d39ad804a97780121 |
|
MD5 | 2436baba74e14f8f8bba2e5e62921212 |
|
BLAKE2b-256 | 061c7bffc017be9febc047200577dca4cec8ac8549befa40b8aa015dbc88f91e |
File details
Details for the file pyaair-0.0.0-py3-none-any.whl
.
File metadata
- Download URL: pyaair-0.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0371b57af522ae4efd2e2e3239a2267884bf8ced95fd93ab8f3451ea41b01d5b |
|
MD5 | cef569483b634705a349be4aa514eb0b |
|
BLAKE2b-256 | b7f078aeb70e170860e5971878e2e32698df7d1dd4be468d8c115680ce36ce51 |