Skip to content

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

Open
dotrahat wants to merge 1 commit intodrawrowfly:masterfrom
dotrahat:patch-1
Open

Update Amazon.js - Fixing verified purchase check & parsing total number of reviews#89
dotrahat wants to merge 1 commit intodrawrowfly:masterfrom
dotrahat:patch-1

Conversation

@dotrahat
Copy link

  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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant