question

ywa_7089 avatar image
0 Likes"
ywa_7089 asked ·

How to use python ebaysdk to filter items from a multi variation listing (listing of more than one item)

When I use the python finding sdk to search for listings with eBay, I usually get results that include a listing containing two or more items that I am not searching for. An example: request1 = { 'keywords': "Iphone x 64gb", # I am searching for Listings of an iPhone x 64gb 'itemFilter': [ {'name': 'Condition', 'value': 'Used'}, {'name': 'currency', 'value': 'CAD'}, {'name': 'minPrice', 'value': 100.0} ], 'paginationInput': { 'entriesPerPage': 100, 'pageNumber': 13 }, 'sortOrder': 'BestMatch' } api = find_connect(config_file='ebay.yml', siteid="EBAY-ENCA") resp = api.execute('FindPopularItems', request1).dict() # Change from XML to dictionary parse_response(reps) # send the dictionary of listings to be parsed When I look at some of the listings that have been returned from the API request, I can get something like this itemId: 303279232871 title: Apple iPhone X Smartphone 64GB 256GB AT&T Sprint T-Mobile Verizon or Unlocked globalId: EBAY-US subtitle: 30-Day Warranty - Free Charger & Cable - Easy Returns! primaryCategory: {'categoryId': '9355', 'categoryName': 'Cell Phones & Smartphones'} galleryURL: https://thumbs4.ebaystatic.com/pict/303279232871404000000001_2.jpg viewItemURL: https://www.ebay.ca/itm/Apple-iPhone-X-Smartphone-64GB-256GB-AT-T-Sprint-T-Mobile-Verizon-Unlocked-/303279232871?var=602277420740 paymentMethod: PayPal autoPay: true postalCode: 660** location: USA country: US shippingInfo: {'shippingServiceCost': {'_currencyId': 'CAD', 'value': '23.83'}, 'shippingType': 'Flat', 'shipToLocations': 'Worldwide'} sellingStatus: {'currentPrice': {'_currencyId': 'USD', 'value': '309.0'}, 'convertedCurrentPrice': {'_currencyId': 'CAD', 'value': '436.46'}, 'sellingState': 'Active', 'timeLeft': 'P21DT20H28M35S'} listingInfo: {'bestOfferEnabled': 'false', 'buyItNowAvailable': 'false', 'startTime': '2019-09-09T14:07:31.000Z', 'endTime': '2020-05-09T14:07:31.000Z', 'listingType': 'FixedPrice', 'gift': 'false', 'watchCount': '18'} galleryPlusPictureURL: https://galleryplus.ebayimg.com/ws/web/303279232871_1_3459_1_00000001.jpg condition: {'conditionId': '2500', 'conditionDisplayName': 'Seller refurbished'} isMultiVariationListing: true # **This means that it is a multi variation listing** topRatedListing: false This is a listing of an iPhone x 64gb and 256gb which have different prices. There may even be more than 2 items with different prices (a customer might want to but it used or new, etc). However, I do not just want to discard it from my dataset as eBay's API only returns 10000 listings at maximum and only allows 5000 calls a day (the data is still relevant).
finding apipythonebaysdkmulti variation listingmulti-variation-listing
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.