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

Is it possible to get product rating and number of reviews?

Open iranzo opened this issue 5 years ago • 1 comments

I would like to get product rating and number of reviews, how do I achieve that?

Thanks

iranzo avatar Jul 23 '19 11:07 iranzo

Sadly, this is somewhat awkward to access. The PA API provides a URL to an iframe, which contains the rating and reviews rendered as HTML. This is described in the documentation: https://docs.aws.amazon.com/AWSECommerceService/latest/DG/ItemLookup.html

The iframe URL can be accessed using the reviews property of a AmazonProduct instance. From there on, you'll have to parse the HTML returned to you. It's visually similar to the review section you can see on the Amazon product pages, but slightly different in its HTML structure.

norman-thomas avatar Oct 17 '19 09:10 norman-thomas