Possible Duplicate:
Amazon API library for Python?
I want to make a simple query to the Amazon product API by using python-amazon-product-api and lxml.objectify.
from amazonproduct import API
AWS_KEY = '..'
SECRET_KEY = '..'
api = API(AWS_KEY, SECRET_KEY, 'de')
node = api.item_search('Books', Publisher='Galileo Press')
# node object returned is a lxml.objectified element
# .pyval will convert the node content into int here
total_results = node.Items.TotalResults.pyval # <--- error
total_pages = node.Items.TotalPages.pyval
# get all books from result set and print author and title
for book in node.Items.Item:
print '%s: "%s"' % (book.ItemAttributes.Author, book.ItemAttributes.Title)
Error message:
AttributeError: 'LxmlItemSearchPaginator' object has no attribute 'Items'
lxml is correctly installed!
Where is the mistake?