我找到了这个代码示例,可以从这里在 ebay 中进行查询,还下载了适用于 Python 的 ebay-sdk。如何安装 sdk 并将此代码与其集成?
from ebaysdk import finding, nodeText
f = finding()
f.execute('findItemsAdvanced', {'keywords': 'shoes'})
dom = f.response_dom()
mydict = f.response_dict()
myobj = f.response_obj()
print myobj.itemSearchURL
# process the response via DOM
items = dom.getElementsByTagName('item')
for item in items:
print nodeText(item.getElementsByTagName('title')[0])