如何使用蟒蛇绑定为易趣的查找项ByProduct API通过UPC搜索产品?

我正在尝试使用 EBay 的产品按产品 ID 查找项目,特别是使用 Python 绑定,通过 UPC 查找产品。


我在努力:


    api = Connection(

        appid='my id', config_file=None)


    response = api.execute('findItemsByProduct', {

        'productId': 820103794923,

        'itemFilter': [

            {'name': 'MinQuantity', 'value': 1},

但我得到:


{'ack': 'Failure', 'errorMessage': {'error': {'errorId': '4', 'domain': 'Marketplace', 'severity': 'Error', 'category': 'Request', 'message': 'Product ID is required.', 'subdomain': 'Search'}}, 'version': '1.13.0', 'timestamp': datetime.datetime(2020, 3, 24, 21, 46, 52)}

正确的论点是什么?


守着星空守着你
浏览 76回答 1
1回答

陪伴而非守候

api = Connection(config_file=yaml_path)response = api.execute('findItemsByProduct',&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'<productId type="ReferenceID">820103794923</productId><itemFilter><name>MinQuantity</name><value>1</value></itemFilter>')response.reply{'ack': “成功”, “版本”: “1.13.0”, “时间戳”: datetime.datetime(2020, 3, 26, 10, 13, 10), “搜索结果”: {“_count”: “0”} , “分页输出”: {“页码”: “0”, “条目每页”: “100”, “总页数”: “0”, “总入口”: “0”}, “项目搜索URL”: “https://www.ebay.com/sch/?_samilow=1&_LH_MIL=1&_ddo=1&_ipg=100&_pgn=1&_productid=820103794923'}
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python