ebay-ml-lister/update_dataset.py

14 lines
553 B
Python
Raw Normal View History

'''
Update dataset; instantiates FindingApi and makes call to eBay's Finding Api
using the findItemsByCategory service. Updates the master_ids list and raw_data.
'''
import ebay_api
# Make call to ebay Finding service and return list of twenty_id strings
finding = ebay_api.FindingApi(4) # 4 is URL paramter for used items
twenty_id_list = finding.get_ids_from_cats()[0]
# renew oauth token and make call to shopping service to get item data and write to local file
shopping = ebay_api.ShoppingApi()
data = shopping.conky(twenty_id_list)