从Amazon python API获取商品价格
我是amzon api的新手,我正在尝试打印从以下代码返回的项目的属性从Amazon python API获取商品价格,python,amazon,amazon-product-api,Python,Amazon,Amazon Product Api,我是amzon api的新手,我正在尝试打印从以下代码返回的项目的属性 items = api.item_search('Books', Publisher="O'Reilly") for book in items: print book.ItemAttributes.Author, book.ItemAttributes.Title 此代码打印返回的书籍的作者和标题。但是我怎样才能得到更多的细节,比如书的价格 有两件事: 看看原稿。在大多数情况下,这些选项可
items = api.item_search('Books', Publisher="O'Reilly")
for book in items:
print book.ItemAttributes.Author, book.ItemAttributes.Title
此代码打印返回的书籍的作者和标题。但是我怎样才能得到更多的细节,比如书的价格 有两件事:
看看原稿。在大多数情况下,这些选项可以直接传递到item_search,请参阅以获取详细信息。
使用import lxml.etree查看XML元素;lxml.etree.tostringbook,pretty_print=True
你想学习api吗?只需执行helpbook.ItemAttributes。这将为您提供所有可用的方法。