这是indexloc提供的服务,不要输入任何密码
Skip to content

A Python script to scrapes accomandation information from Booking.com search results using Selenium and BeautifulSoup. Usefull to create bulk email lists (see repo; Email_Scraper)

Notifications You must be signed in to change notification settings

tr4m0ryp/Booking.com_Scraper_V2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Booking.com Hotel Scraper V2

A Python script to scrapes accomandation information from Booking.com search results using Selenium and BeautifulSoup. Usefull to create bulk email-lists (see repo; Email_Scraper)

Requirements

  • Python 3.x
  • Selenium
  • BeautifulSoup4
  • pandas
  • colorama
  • webdriver-manager

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/booking-hotel-scraper.git
    cd booking-hotel-scraper
  2. Install the required packages:

    pip install -r requirements.txt

Usage

  1. Start the script:

    python booking_scraper.py
  2. Follow the on-screen instructions:

    • Enter the Booking.com search results URL when prompted.
    • Enter the maximum number of hotels to scrape.
  3. The script will:

    • Open the provided URL in a Chrome browser using Selenium.
    • Scroll down the page to load all hotel results.
    • Scrape hotel names and other details.
    • Handle retries and cooldowns for loading more results.
    • Save the scraped data to an Excel file named hotels.xlsx.

Notes

  • Ensure that the Booking.com URL provided returns a list of hotel search results.
  • The script will handle scrolling and loading more results automatically.
  • The script includes retry and cooldown mechanisms to handle potential scraping issues.

Warning

  • Use this project ethically and legally.
  • Respect the website's terms of service.
  • Excessive scraping can lead to your IP being blocked by the website.

License

This project is licensed under the MIT License.

About

A Python script to scrapes accomandation information from Booking.com search results using Selenium and BeautifulSoup. Usefull to create bulk email lists (see repo; Email_Scraper)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages