Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.61 KB

README.md

File metadata and controls

46 lines (34 loc) · 1.61 KB

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