python-amazon-simple-product-api
python-amazon-simple-product-api copied to clipboard
Is it possible to get product rating and number of reviews?
I would like to get product rating and number of reviews, how do I achieve that?
Thanks
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.