Created
April 6, 2016 16:30
-
-
Save aquasmit/9ec96169290424e97dca718ff8542940 to your computer and use it in GitHub Desktop.
Yelp Reviews scraping using X-Ray (Node js)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Xray = require('x-ray'); | |
var x = Xray(); | |
x('https://www.yelp.com/biz/bottega-louie-los-angeles', 'ul.ylist li .review--with-sidebar', [{ | |
reviewer: '.user-name .user-display-name', | |
reviewer_location: '.user-location b', | |
review_rating: '.rating-very-large meta[content]@content', | |
review_date: '.rating-qualifier [content]@content', | |
review_content:'.review-content p' | |
}]) | |
.paginate('.u-decoration-none.next.pagination-links_anchor@href') | |
//.limit(2) | |
.write('results2.json') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment