How to get the list of price offers on an item from Amazon with python-amazon-product-api item_looku

Posted by miernik on Stack Overflow See other posts from Stack Overflow or by miernik
Published on 2010-03-15T06:16:34Z Indexed on 2010/03/15 6:19 UTC
Read the original article Hit count: 333

Filed under:
|
|
|
|

I am trying to write a function to get a list of offers (their prices) for an item based on the ASIN:

def price_offers(asin):
    from amazonproduct import API, ResultPaginator, AWSError
    from config import AWS_KEY, SECRET_KEY
    api = API(AWS_KEY, SECRET_KEY, 'de')
    str_asin = str(asin)
    node = api.item_lookup(id=str_asin, ResponseGroup='Offers', Condition='All', MerchantId='All')
    for a in node:
        print a.Offer.OfferListing.Price.FormattedPrice

I am reading http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?ItemLookup.html and trying to make this work, but all the time it just says:

Failure instance: Traceback: <type 'exceptions.AttributeError'>: no such child: {http://webservices.amazon.com/AWSECommerceService/2009-10-01}Offer

© Stack Overflow or respective owner

Related posts about python

Related posts about amazon