我找到了这个代码样本,用于在易趣中从here进行查询,还下载了ebay-sdk for Python。如何安装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])发布于 2012-05-04 17:22:34
这是一个相当简单的过程
1)转到http://developer.ebay.com/,在那里注册,并获得应用id密钥。
2)您可以简单地执行'pip install ebaysdk‘来安装ebaysdk
3)将该文件复制到同一个目录https://github.com/timotheus/ebaysdk-python/blob/master/ebay.yaml中,将该文件中的appid替换为您在步骤1中生成的appid
4)执行这个例子,这次它可以工作了:)
https://stackoverflow.com/questions/10442990
复制相似问题