Skip to content

Basically a web scraper that can scrape hotel reviews from TripAdvisor.

License

Notifications You must be signed in to change notification settings

sid6i7/hotel-reviews-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hotel Reviews Scraper

Hotel Reviews Scraper is a simple to use web scraper that can scrape hotel reviews from TripAdvisor.

Installation

Use the package manager pip to install foobar.

Required Libraries:

pip install selenium, beautifulsoup4, webdriver-manager, pandas

Usage

First run the code to setup the Selenium's chrome driver.

service = Service(ChromeDriverManager().install())
driver = webdriver.Chrome(service=service)
url = 'https://www.tripadvisor.in'
driver.get(url) 

Then run the function start_scraping().

start_scraping()

image

Now it will ask for how many hotels to show in the options list image

Finally, it will ask for the hotel name to search for image

For demonstration, let us search for "Marriott"

This is how the output is going to look like: image

After selecting any of the options, the scraper will start to scrape reviews of that hotel and save it as a csv file (in the same directory as the scraper.ipynb file) with the name that u searched for intially.

In our case the name would be: "Marriott.csv"

About

Basically a web scraper that can scrape hotel reviews from TripAdvisor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published