Skip to content

kashif-ghafoor/yelp-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yelp scraper

this scraper scrapes the search result of restaurants of miami city from yelp and then go to each restaurant then scrapes the following data.

  • name
  • url
  • type
  • address]
  • reviews
  • rating

Run Locally

To run the script successfully you need 3 things:

  • google service account email
  • private key
  • google sheet id. To get key and email (follow this documentation for service account).
    google sheet id is random string in url of google sheet where you want to store data.

Clone the project

  git clone https://github.com/kashif-ghafoor/yelp-scraper.git

Setup environement variables.

  • rename the .env_sample to .env
  • replace the and in .env file with email and private key you copied from json file.
  • replace the google sheet id in third line of .env file with .

Note: you have to explicitly give google sheet access to the email you created.

Go to the project directory

  cd yelp-scraper

Install dependencies

  npm install

Start the script

  npm run start

wait for the script to complete you will see data in your google sheets.

Alternatively you can run it in codespaces.
rename .env_sample to .env
put the required data in .env npm run start tadah...

About

scrapes restaurants data from yelp

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published