In this tutorial, we'll show you how to:
- Scrape the names of all of the reviewers of a product
- Scrape the star rating of each review
- Scrape the text of each review
I'll use this product from the Walmart website as an example of how to scrape review details: https://www.chapters.indigo.ca/en-ca/books/a-game-of-thrones-a/9780553573404-item.html?ikwid=A+Song+of+Ice+and+Fire&ikwsec=Home&ikwidx=5
Selecting and scraping each reviewer's name
1. In a new template, or with a newly created Select command, click on the name of the first reviewer on a product.
2. Click on the next few reviewers, to train ParseHub to select each of the reviewers' names.
ParseHub should automatically create a Begin New Entry command (hidden under list icon ) and Extract commands, that will get the names of the reviewers.
Getting the star rating for each review
3. Click the plus button to the right of the "Select reviewer" command and add a Relative Select command.
4. Click on one of the reviewer's names, and then click on the star rating so that an arrow shows up between each reviewer and the rating.
5. Click on the plus button to the right of the relative selection, and add an extract command.
6. In the Extract dropdown, select title attribute.
Note that different websites will hide the data about star numbers in different places, so you may need to right click on the rating and click Inspect Elements to find the rating.
Getting the text of each review
7. Like with scraping the star ratings, add a new Relative Select command by clicking on the plus button to the right of the "Select reviewer" command.
8. Click on one of the reviewer's names, and then click on the text, so that an arrow shows up between each reviewer and the text. You may need to zoom out to select the whole comment, which you can do by holding down control (PC) or command (Mac) and pressing 1 and 2 while hovering over part of the comment. When the whole comment is highlighted in blue, click on it.
Using Relative Select commands like this, you could also scrape the review data, number of positive votes the review has, and any other data that comes with it.
We have other tutorials if you need to: