简体   繁体   English

获得给定ASIN的最低4价格

[英]Get the lowest 4 prices for a given ASIN

I found this API on Amazon web services GetLowestOffersPriceListings , I also have my Acess Key, and Secret which i am not able to use. 我在Amazon Web服务GetLowestOffersPriceListings上找到了此API,我也有我无法使用的Acess Key和Secret。

ASIN = ['B07CGKVJ34','B07HJRQXNY']
url = 'https://mws.amazonservices.com/ASINList.ASIN.1={}&Action=GetLowestOfferListingsForASIN&MarketplaceId=ATVPDKIKX0DER\
&Signature={}&AWSAccessKeyId={}'.format(ASIN[0], secret, key)
res = requests.get(url, headers={'User-Agent': "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"})
print(res.text)

So i think my problem is with url itself, the format is wrong or not correct order. 所以我认为我的问题是网址本身,格式错误或顺序不正确。

What i want is to get the lowest 4 prices for a list of ASIN numbers, I am sorry but i can't share key and secret. 我想要的是获取ASIN号码列表的最低4个价格,很抱歉,我无法共享密钥和秘密。

Edit 1: this URL opens but now i get API version is missing in the message secction. 编辑1:此URL打开,但是现在我在消息部分中缺少API版本。

You are using Amazon Marketplace Web Service (Amazon MWS) to query the Amazon Retail Inventory, which is very different to Amazon Web Services (AWS) which is used to host your own servers and systems. 您正在使用Amazon Marketplace Web服务(Amazon MWS)来查询Amazon零售库存,这与用于托管您自己的服务器和系统的Amazon Web Services(AWS)完全不同。

You need to prefix the url with https:// 您需要在网址前面加上https://

ie

https://mws.amazonservices.com/

Also, the URL you need to call is actually https://mws.amazonservices.com/Products/2011-10-01 , which includes the version. 另外,您需要调用的URL实际上是https://mws.amazonservices.com/Products/2011-10-01 ,其中包括版本。 Here is an example from the Amazon MWS documentation: 这是Amazon MWS文档中的示例:

https://mws.amazonservices.com/Products/2011-10-01
    ?AWSAccessKeyId=AKIAJGUVGFGHNKE2NVUA
    &Action=GetLowestOfferListingsForASIN
    &MWSAuthToken=amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE
    &SellerId=A2NK2PX936TF53
    &SignatureVersion=2
    &Timestamp=2012-02-07T01%3A22%3A39Z
    &Version=2011-10-01
    &Signature=MhSREjubAxTGSldGGWROxk4qvi3sawX1inVGF%2FepJOI%3D
    &SignatureMethod=HmacSHA256
    &MarketplaceId=ATVPDKIKX0DER
    &ASINList.ASIN.1=B002KT3XRQ
    &ASINList.ASIN.2=B002KT3XQC
    &ASINList.ASIN.3=B002KT3XQM

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

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