missing-pieces-china avatar image
missing-pieces-china asked

Retrieve EPS URL for largest picture available

I'm writing my own application in C# to manage my ebay listings and I've hit a problem. I want to download all the pictures for my listings to my local computer but in the GetSellerItems response I only get the URL's for the thumbnails. How do i return the URL for the largest picture available? Some older listings will have 500px images, other recent ones will have 1600px or larger. Code for my GetSellerItems call here: eBayAPIInterfaceService service = eBayExtensions.BuildSoapHeader("GetSellerList", true); DetailLevelCodeTypeCollection dltc = new DetailLevelCodeTypeCollection(); DetailLevelCodeType dl = new DetailLevelCodeType(); dl = DetailLevelCodeType.ReturnAll; dltc.Add(dl); int pagenum = 1; int itemcount = 0; bool moreitems = true; GetSellerListRequestType request = eBayExtensions.GetSellerListings(dltc); DateTime startdatefrom = new DateTime(2013, 07, 01); DateTime startdateto = startdatefrom.AddDays(DateTime.DaysInMonth(startdatefrom.Year,startdatefrom.Month)-1); request.StartTimeFrom = startdatefrom; request.StartTimeTo = startdateto; request.StartTimeFromSpecified = true; request.StartTimeToSpecified = true; request.DetailLevel = dltc; while(startdateto < DateTime.Today.AddDays(45)) { string labeltext = "Processing items listed in " + startdatefrom.ToString("MMMM") + " " + startdatefrom.ToString("YYYY"); moreitems = true; pagenum = 1; while (moreitems == true) { this.Invoke(() => tsLabel.Text = labeltext); PaginationType pt = new PaginationType(); pt.EntriesPerPage = 50; pt.PageNumber = pagenum; request.Pagination = pt; GetSellerListResponseType response = service.GetSellerList(request); } }
10 |600

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

1 Answer

· avatar image
1 Like" answered
Hi, If you want to get the largest EPS image associated with an item, use this : Look for the first underscore, then look for the next period. Replace the text between the underscore and period with the image id for the desired size. For the largest size image, use image id 57 – this will give up to 1600x1600 (original aspect ratio maintained). Cheers!!!!
· 1
10 |600

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

sodabowski avatar image sodabowski commented ·
Exactly what I had figured out before using the API. Default size is named "$_1.JPG", to get the biggest size available you have to call image "$_57.JPG". AFAIK that's an undocumented feature.
0 Likes 0 ·

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.