Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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])
like image 945
Quazi Marufur Rahman Avatar asked May 04 '12 05:05

Quazi Marufur Rahman


1 Answers

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

like image 170
subiet Avatar answered Oct 07 '22 19:10

subiet