removed list(map(str,item_id_results)) because itemIds are already strings
This commit is contained in:
parent
3b0b96fd92
commit
873050f898
@ -33,9 +33,10 @@ class FindingApi:
|
||||
|
||||
response = requests.get("https://svcs.ebay.com/services/search/FindingService/v1", params=params)
|
||||
data = response.json()
|
||||
pretty_data = json.dumps(data, indent=2)
|
||||
itemid_results_list.append(
|
||||
item_id_results = map(str, itemid_results_list))
|
||||
for item in data['findItemsByCategoryResponse'][0]['searchResult'[0]['item']:
|
||||
itemid_results_list.append(item['itemId']) # above this line you will have to check whether the id exists in the pandas dataframe before you go on to create your list for the shopping
|
||||
#api: check df --> if does not exist, append itemId to itemid_results_list --> with curated list, make a list of 20-itemId lists.
|
||||
item_id_results = list(map(str, itemid_results_list))
|
||||
item_id_results = ','.join(item_id_results) # you will have to split this into 20 item lists strings to feed into ItemID param. Consider making a list of str lists.
|
||||
return item_id_results
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user