如何在易趣API上启用描述搜索?

2024-10-02 02:35:15 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我的密码:

from ebaysdk.finding import Connection


page_number = 1
num = 1

try:
    api = Connection(appid='xxxxxxxxxxxxxxxxxxxxx', config_file=None, siteid='EBAY-DE')

    api_request = {
            'keywords': 'isbn',
            'categoryId': '267',
            'descriptionSearch': True,
            'paginationInput': {
            'entriesPerPage': '100',
            'pageNumber': page_number },
        }

    response = api.execute('findItemsAdvanced', api_request)


    reply = response.reply
    url = response.reply.itemSearchURL
    totalentries = response.reply.paginationOutput.totalEntries
    #item = response.reply.searchResult.item[num]

except :
  print "Error dude"

print url
print totalentries

我的问题是:

descriptionSearch未启用,尽管我将其设置为True。 我做错什么了?你知道吗

文档说明descriptionSearch需要我提供的布尔值(参见here)。你知道吗

descriptionSearch的默认设置为False,但我的代码应该将其设置为True,对吗?你知道吗


Tags: apitrueurl密码numberresponserequestpage

热门问题