Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/348.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从Amazon python API获取商品价格_Python_Amazon_Amazon Product Api - Fatal编程技术网

从Amazon python 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 此代码打印返回的书籍的作者和标题。但是我怎样才能得到更多的细节,比如书的价格 有两件事: 看看原稿。在大多数情况下,这些选项可

我是amzon api的新手,我正在尝试打印从以下代码返回的项目的属性

    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。这将为您提供所有可用的方法。