Open geowat opened 5 years ago
Try the following but keep in mind that larger images are not available for all items.
Image output will be three URLs in 'galleryInfoContainer'
from ebaysdk.finding import Connection as Finding
from ebaysdk.utils import dict2xml
api = Finding(domain='svcs.sandbox.ebay.com', config_file='ebay.yaml', version='1.13.0')
outputSelector = ['GalleryInfo']
request = api_request = {
'outputSelector': outputSelector,
'keywords': 't-shirt',
'paginationInput' : [
{
'entriesPerPage' : 1
}
]
}
display(dict2xml(request))
response = api.execute('findItemsAdvanced', request)
import pprint
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(response.dict())
{ 'ack': 'Success',
'itemSearchURL': 'http://shop.sandbox.ebay.com/i.html?_nkw=t-shirt&_ddo=1&_ipg=1&_os=GI%7CD&_pgn=1',
'paginationOutput': { 'entriesPerPage': '1',
'pageNumber': '1',
'totalEntries': '11705',
'totalPages': '11705'},
'searchResult': { '_count': '1',
'item': [ { 'autoPay': 'false',
'country': 'US',
'galleryInfoContainer': { 'galleryURL': [ { '_gallerySize': 'Large',
'value': 'http://thumbs3.sandbox.ebaystatic.com/pict/1103990117704040_0.jpg'},
{ '_gallerySize': 'Medium',
'value': 'http://thumbs3.sandbox.ebaystatic.com/pict/110399011770_0.jpg'},
{ '_gallerySize': 'Small',
'value': 'http://thumbs3.sandbox.ebaystatic.com/pict/1103990117708080_0.jpg'}]},
'galleryURL': 'http://thumbs3.sandbox.ebaystatic.com/pict/1103990117704040_0.jpg',
'globalId': 'EBAY-US',
'isMultiVariationListing': 'false',
'itemId': '110399011770',
'listingInfo': { 'bestOfferEnabled': 'false',
'buyItNowAvailable': 'false',
'endTime': '2019-06-03T03:30:13.000Z',
'gift': 'false',
'listingType': 'Classified',
'startTime': '2019-05-04T03:30:13.000Z'},
'location': 'USA',
'primaryCategory': { 'categoryId': '173633',
'categoryName': 'Sports '
'Tickets'},
'returnsAccepted': 'false',
'sellingStatus': { 'convertedCurrentPrice': { '_currencyId': 'USD',
'value': '740.3'},
'currentPrice': { '_currencyId': 'USD',
'value': '740.3'},
'sellingState': 'Active',
'timeLeft': 'P0DT2H46M27S'},
'shippingInfo': { 'expeditedShipping': 'false',
'oneDayShippingAvailable': 'false',
'shipToLocations': 'Worldwide',
'shippingServiceCost': { '_currencyId': 'USD',
'value': '0.0'},
'shippingType': 'FreePickup'},
'subtitle': 'Busch Stadium | Diamond '
'Box 159',
'title': 'Oakland Athletics at St. '
'Louis Cardinals Tickets '
'(June T-Shirt ... - Saint '
'Louis',
'topRatedListing': 'false',
'viewItemURL': 'http://cgi.sandbox.ebay.com/Oakland-Athletics-St-Louis-Cardinals-Tickets-June-T-Shirt-Saint-Louis-/110399011770'}]},
'timestamp': '2019-06-03T00:43:46.422Z',
'version': '1.13.0'}
I think I need
galleryPlusPictureURL
which has higher resolution thumbnails compared withgalleryURL
which has about 100 pixels only. However, this attribute is only returned upon request. I have tried the following, but none has worked out yet. Any help would be appreciated to get optional URL -galleryPlusPictureURL
.