简体   繁体   English

Amazon Product API搜索不可用的商品

[英]Amazon Product API Search Unavailable Items

Currently, I am using amazonproduct to search items' UPC code based on keywords. 目前,我正在使用amazonproduct根据关键字搜索商品的UPC代码。 It worked for most of the cases. 它适用于大多数情况。 However, sometimes I did find that my current search function could not find items which were not available (or sometimes it only returned a fraction of items containing the key words). 但是,有时我确实发现我当前的搜索功能找不到不可用的项目(或者有时它只返回了包含关键字的部分项目)。 I checked the official document on the parameter Availability , but still not sure what is the proper value to feed to it in order to retrieve both current available and unavailable items. 我在参数Availability上检查了官方文档,但仍不确定要获取给它的正确值是什么,以便同时检索当前可用和不可用的项目。

For example, below code could not find Neutrogena Moisture Rich Sunless Tanning , which was no longer on available. 例如,下面的代码无法找到Neutrogena Moisture Rich Sunless Tanning ,不再可用。 However, item's information is still available here . 但是, 此处仍提供项目的信息。

import amazonproduct
config = {
    'access_key': 'access_key',
    'secret_key': 'secret_key',
    'associate_tag': 'associate_tag',
    'locale': 'us'
}
api = amazonproduct.API(cfg=config)
items=api.item_search('All', Keywords=self.product_name, ResponseGroup='Medium', Availability="PROPER VALUE")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM