Extract star ratings (get data behind icons & graphics)

ParseHub automatically extracts the text and the link of a selected element. However, the data you want won't always be available as text, such as the reviews in stars of a product.

To get this data, you will have to modify the HTML attributes that ParseHub is extracting. 

Usually data behind icons is hidden in the class Attribute. You can also extract the entire HTML of the element to be able to get the data you need and apply regular expressions to clean the data up.

If you're looking to extract image data, check out this tutorial.

Get data from icons via class Attribute

For this example go to a list of products on Walmart - http://www.walmart.ca/en/appliances/small-appliances/coffee-maker/N-658

1. Click on the "Select page" command + button that is located on the right of the command.

2. From the tool box choose the "Select" tool.

3. Click on the star ratings to select them.

4. In this case nothing will be extracted for you because there is no text on the page only images of stars. Rename the selection "stars".

5. Click on the + button of the "stars" selection & extraction command.

6. Choose the "Extract" tool from the tool box. 

7. From the dropdown in the extraction command options select "class Attribute".

Your CSV sample results should look like this:

Your JSON sample results should look like this:

If this doesn't retrieve the data you're looking for, try extracting the other "Attribute" options in the Extract dropdown menu.

Have more questions? Submit request!

0 Comments

Article is closed for comments.