philipperemy / amazon-reviews-scraper

Yet another multi language scraper for Amazon targeting reviews.
Apache License 2.0
118 stars 42 forks source link

Scrape the number of Helpful ratings #2

Closed sughodke closed 6 years ago

sughodke commented 6 years ago

Extending the scraper to include the number of times it was voted helpful by other Amazon users.

Add the below attribute to get_comments_with_product_id() and incorporate it in the reviews list.

helpful = review.find(attrs={'data-hook': 'helpful-vote-statement'}).text

# Retain only the number of helpful votes
helpful = helpful.strip().split(' ')[0]
philipperemy commented 6 years ago

@sughodke thanks! Can you open a Pull Request to reflect this change?

philipperemy commented 6 years ago

Done https://github.com/philipperemy/amazon-reviews-scraper/commit/3b70578c9d08632b52d7c4daa8dc408ad8c62490