python - 如何在 ebaysdk 上导入产品 API?
问题描述
我正在尝试使用 UPC 查找产品的信息(描述、标题、图像、方面以及基本上所有内容)。我通过使用 eBay 的交易 API (GetItem) 和 productID 设法做到了这一点。但是,当我尝试使用 UPC 进行操作时,我遇到了问题。网上没有太多说明。我找到了getProductDetails
应该回答我的问题的函数:
这是我的代码:
from ebaysdk.trading import Connection
api = Connection(devid=dev_id, certid=cert_id, appid=app_id, token=token_id, globalId="EBAY-US", config_file=None)
response = api.execute('getProductDetails', {"productDetailsRequest": {"dataset": {"UPC": "#UPCNUMBER"}}})
r = response.dict()
print(r)
但是,当我尝试使用相同的 API(交易)时,我收到了这个错误:
ConnectionError: 'getProductDetails: Class: RequestError, Severity: Error, Code: 2, Unsupported API call. The API call "getProductDetails" is invalid or not supported in this release.'
我试图了解我应该使用什么 API,但互联网上没有任何信息。从文档中,我可以理解这是一个产品 API。但是,在查看不同的ebaysdk.xxx
子模块时,我看不到任何适合的子模块。
有人知道这件事吗?
解决方案
推荐阅读
- vbscript - 如何将双引号参数传递给 vbscript?
- react-native - 如何仅在某些屏幕上显示 TabNavigator 而对其他屏幕不显示?- 路由“TabNavigator”的组件必须是 React 组件
- angularjs - 仅当用户键入超过 4 个字符时,使用后端 API 的 ngSelect
- reactjs - 如何使用 npm 修复权限错误
- php - PHP IMAP:如何获得正确的正文?
- python - 绘制 numpy.histogram2d()
- python - 类实例中的条件方法执行
- c# - C#如何使用OpenCV去除验证码的噪音?
- python - 如何遍历这个 outerHTML 代码以获取某些数据?(我不知道如何抓取它,所以我想试试这个)
- matlab - 如何将符号数组与矩阵随机相乘