The AmzRating class extends the AmzBase class and, as such the following attributes are available to be called as an index call or as an attribute:
- ratings_text (str): The star rating (e.g. "4.5/5").
- ratings_count_text (str): The number of votes (e.g. "100").
This class should usually not be instantiated directly (rather be used as part of an AmzProduct element) but can be created by passing an HTML element to the constructor. If nothing is passed, an empty AmzRating object is created.
html_element (LXML root): A root for an HTML tree derived from an element on an Amazon search page.
Inherited method from AmzBase.
Gets the total number of ratings.
int: The number of ratings.
Gets the value the star rating is out of (usually 5).
float: The denominator of the star rating.
Gets the value the average value of the star rating (usually between 0 and 5).
float: The numerator of the star rating.
Gets a percentage value of the rating - 0% being a 0/5 star rating and 100% being a 5/5 star rating.
float: The star percentage.
Gives a visual representation of the star rating, rounding to the nearest star.
star_repr (str): A (typically) single character used to represent a star.
str: A representation of the star rating.
Inherited method from AmzBase.
Inherited method from AmzBase.
Inherited method from AmzBase.
Inherited method from AmzBase.
Inherited method from AmzBase.
Inherited method from AmzBase.