This script is designed to extract hotel room rates from Qantas Hotels' website by leveraging their internal API.
- Python 3
- Run
pip install pandas requests
- Run
python qantas_scrape_requests.py
- Install venv
- Run
python -m venv env
- Activate the environment:
env/Scripts/Activate.ps1
for Windows,source env/bin/activate
for linux/Mac - Run
pip install -r requirements.txt
- Run
python qantas_scrape_requests.py
- Reads the Details.csv file, which contains hotel details.
- Constructs a URL for each hotel entry based on the hotel ID, check-in, and check-out dates.
- Makes a GET request to Qantas Hotels' internal API using the constructed URL.
- Parses the response and extracts the desired hotel rate information storing it into a list of rates.
- Prints the extracted information in a structured JSON format.