简体   繁体   中英

How to use ebay sdk in Python?

I have found this code sample to make a query in ebay from here and also downloaded ebay-sdk for Python. How can I install the sdk and integrate this code with it?

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])

It is quite a simple process

1) Go to http://developer.ebay.com/ , register over there, and get the app id key.

2) You can simply do a 'pip install ebaysdk' to install the ebaysdk

3) Copy this file in the same directory https://github.com/timotheus/ebaysdk-python/blob/master/ebay.yaml In this file replace appid with what you generated in step 1

4) Execute the example, this time it will work :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM