【发布时间】:2020-02-26 11:24:06
【问题描述】:
我想使用 R 从Amazon Product API 中提取产品信息。正如this thread 和Amazon's Signed Requests Helper 所建议的,我正在使用以下R 代码:
library("RCurl")
nvp <- list("Service"="AWSECommerceService",
"Version"="2011-08-01",
"AssociateTag"="PutYourAssociateTagHere",
"Operation"="ItemSearch",
"SearchIndex"="Books",
"Keywords"="harry+potter",
"Timestamp"="2020-02-26T11:25:14.000Z",
"AWSAccessKeyId"="XXX") # "XXX" needs to be replaced by the Access Key
getURL(nvp)
# AWSECommerceService 2011-08-01 PutYourAssociateTagHere ItemSearch Books harry+potter 2020-02-26T11:25:14.000Z XXX
# "" "" "" "" "" "" "" ""
如您所见,getURL 函数只是返回空字符。经过数小时的搜索,无论我如何更改先前代码的参数,我仍然无法获得任何其他输出。
如何修改之前的代码以从亚马逊产品 API 返回产品数据?
【问题讨论】:
标签: r amazon-web-services api