amazon-product-api icon indicating copy to clipboard operation
amazon-product-api copied to clipboard

Update Amazon.js - Fixing verified purchase check & parsing total number of reviews

Open dotrahat opened this issue 3 years ago • 0 comments

  1. Selector of verified purchase badge is different on amazon than what is used in this package. So, I Updated Selector where it checks if purchase is verified while scraping reviews and now it gets it correctly.
  2. "Get total number of reviews" didn't get the number correctly if there is a comma in number like 1,345. If comma exists, it only returns the number present before comma (1 in case of 1,345). I added replace function there to get rid of commas before parseInt uses it. So, After I Updated this code now it gets total number of reviews correctly.

dotrahat avatar Jul 12 '22 20:07 dotrahat