scrapehero-code / tripadvisor-scraper

Scraper to extract restaurant details from Tripadvisor.com using Scrapy

Repository from Github https://github.comscrapehero-code/tripadvisor-scraperRepository from Github https://github.comscrapehero-code/tripadvisor-scraper

Tripadvisor Restaurant Scraper

Scraper to extract restaurant details from Tripadvisor.com using Python and SelectorLib

Details to extract

  1. Restaurant Name
  2. Restaurant Link
  3. Cuisine
  4. Price
  5. Rating
  6. Number of reviews

Prerequisites

Install Python 3 and Pip. Follow the guides below:

Code

https://github.com/scrapehero-code/tripadvisor-scraper/blob/master/tripadvisor_restaurants.py

Export Product Data into CSV

Execute the full code by typing the script name followed by a -h in command prompt or terminal:


positional arguments:
  url         Tripadvisor Listing URL

optional arguments:
  -h, --help  show this help message and exit

Here is the command to extract the first-page of restaurant listings in Boston, MA.:

python3 tripadvisor.py https://www.tripadvisor.com/Restaurants-g60745-Boston_Massachusetts.html

Output

Sample Output

About

Scraper to extract restaurant details from Tripadvisor.com using Scrapy


Languages

Language:Python 100.0%