python-amazon-simple-product-api
python-amazon-simple-product-api copied to clipboard
New method similar_productos() of AmazonProduct object
I added this method to AmazonProduct objects. Its an interesting method to discover other products:
@property
def similar_products(self):
"""SimlarProducts.
:return:
List Of ASIN Similar Products (list)
"""
result = []
similar_products = self._safe_get_element('SimilarProducts')
if similar_product is not None:
for similar_product in similar_products:
result.append(similar_product.ASIN.text)
return result
sorry I made a mistake. I have to change this string 'SimilarProducts' for this other string: "'SimilarProducts.SimilarProduct'". I will pull request again
Thanks @aplicacionamedida , can you please run pep8 and submit again