Skip to content

A Selenium-based scraper for extracting hotel listings from Booking.com using user-defined filters and settings. Supports dynamic page interaction to capture accurate and customized search results.

License

Notifications You must be signed in to change notification settings

groverkaushal/bookingdotcom-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏨 bookingdotcom-scraper

A Selenium-based scraper for extracting hotel listings from Booking.com using user-defined filters and settings.
It supports dynamic page interactions like scrolling and filter selection to capture accurate and customized search results.


⚠️ Disclaimer:

This project is for educational and personal use only. Scraping content from websites may violate their Terms of Service. The author assumes no responsibility for how this tool is used. Use at your own risk.


📦 Features

  • Search by currency, location, check-in/check-out dates, number of adults and total rooms.
  • Filter by star ratings.
  • Sort results using Booking.com's sorting options.
  • Auto-scroll and click "Load more results" to capture all listings.
  • Outputs hotel data in a structured csv format.

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/your-username/bookingdotcom-scraper.git
cd bookingdotcom-scraper

2. Set Up Virtual Environment & Install Dependencies

# Using Python 3.12.9
python3.12 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

3. Configure Environment

Edit the .env file with the correct path for your Selenium driver directory and other selection rules:

4. Run the Scraper

python main.py

🛠 Requirements

  • Python 3.12.9
  • Google Chrome (or compatible browser)
  • ChromeDriver or appropriate WebDriver in your system path or specified directory

📂 Output

Scraped hotel data will be saved in the directory defined by OUTPUT_DIR_PATH in your .env file.

Preview

Output Preview


📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Selenium-based scraper for extracting hotel listings from Booking.com using user-defined filters and settings. Supports dynamic page interaction to capture accurate and customized search results.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages