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

New method similar_productos() of AmazonProduct object

Open aplicacionamedida opened this issue 8 years ago • 2 comments

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

aplicacionamedida avatar Oct 27 '16 13:10 aplicacionamedida

sorry I made a mistake. I have to change this string 'SimilarProducts' for this other string: "'SimilarProducts.SimilarProduct'". I will pull request again

aplicacionamedida avatar Oct 27 '16 13:10 aplicacionamedida

Thanks @aplicacionamedida , can you please run pep8 and submit again

yoavaviram avatar Feb 21 '17 13:02 yoavaviram