[go: up one dir, main page]

Skip to content

Scraper to extract restaurant details from Tripadvisor.com using Scrapy

Notifications You must be signed in to change notification settings

scrapehero-code/tripadvisor-scraper

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages