This Python script scrapes booking data for the Albertpark Golf Club and exports it to Excel files.
- Scrapes booking data for the next 5 days
- Extracts information such as tee time, slot, price, and available count
- Exports the scraped data to Excel files with each sheet representing a day
- Python 3.x
- Required libraries:
requests,beautifulsoup4,pandas,datetime,logging,os
- Clone the repository:
git clone https://github.com/MaksVa213/Scraping-using-Beautifulsoup.git- Navigate to the project directory:
cd Scraping-using-Beautifulsoup- Create a virtual environment (optional but recommended):
python -m venv env
source env/bin/activate # On Windows, use `env\Scripts\activate`- Install the required libraries:
pip install -r requirements.txt-
Update the
base_urlvariable in the script with the appropriate URL for the SandringHam Golf Club booking page. -
Run the script:
python scraper.pyThe script will scrape the booking data and export it to Excel files in the SandringHam-Golfclub-data directory.
The script uses logging to record important events and errors. The log file is saved as scraper.log in the SandringHam-Golfclub-Data directory.
If you find any issues or have suggestions for improvements, feel free to create an issue or submit a pull request.
This project is licensed under the MIT License.