You are here:  » eBay


eBay

Submitted by Keeop on Sat, 2018-10-27 15:35 in

Hi David,

Just wondering if the eBay API or connection method has changed at all as I'm not getting any eBay results being pulled in from any of my sites (using various incarnations of the ebay.php scripts etc.) ??

Is it still working your end?

Cheers.
Keeop

Submitted by support on Mon, 2018-10-29 08:39

Hello Keeop,

I've just ran a test to double check and I'm getting eBay results as expected.

To check for any errors, if you've have an installation of the Async API modules (results appear in tabs alongside search results) edit html/searchresults_ebay.php and look for the following code at line 139:

    $xml = api_fetch($url);

...and REPLACE with:

    $xml = api_fetch($url);
    print "<pre>".htmlentities($xml)."</pre>";

Then visit a page and switch to the eBay tab and the API response should be displayed.

If you're using an older, self contained version of ebay.php that displays results below the search results, look for the following code at line 70:

    MagicParser_parse($url,"myEbayRecordHandler","xml|FINDITEMSBYKEYWORDSRESPONSE/SEARCHRESULT/ITEM/");

...and REPLACE with:

    $xml = file_get_contents($url);
    print "<pre>".htmlentities($xml)."</pre>";
    MagicParser_parse("string://".$xml,"myEbayRecordHandler","xml|FINDITEMSBYKEYWORDSRESPONSE/SEARCHRESULT/ITEM/");

In either case, if an error message is displayed and you're not sure from the response where the problem lies let me know what is displayed and I'll check it out further with you.

If nothing is displayed, that would indicate a fetching issue. In which case, do you have other API modules e.g. Amazon working fine on the same server?

Cheers,
David.
--
PriceTapestry.com

Submitted by Keeop on Mon, 2018-10-29 16:58

Hi David,

Yes, Amazon is working OK. I'm getting no content at all. Strange. The Amazon script also uses File_Get_Contents which is why I'm a bit confused. Ah, just output a sample URL and pasted that and get this as part of the response - 'Service call has exceeded the number of times the operation is allowed to be called'. So, have they put a limit on the number of requests that can be made in a certain time period then? Hmm..

Cheers.
Keeop

Submitted by Keeop on Mon, 2018-10-29 17:03

Hmm, as a follow up maybe the script needs to change so that only 'human' visitors are triggering it, not bots, spiders etc.? With Amazon, if a product page is called, the Amazon script puts that found product in to my database so can be used again. With eBay, products are only displayed on the fly - no writing to the database.

Cheers.
Chris

Submitted by support on Mon, 2018-10-29 17:17

Hello Chris,

That's exactly what I was about to suggest. It's straight forward to inspect the user agent of the request and not include ebay.php if it contains "bot" (case insensitively), for example if you currently have;

  require("ebay.php");

...REPLACE with:

  if (stripos($_SERVER["HTTP_USER_AGENT"],"bot")===FALSE)
  {
    require("ebay.php");
  }

If you're not sure how to implement for the inclusion method you are currently using let me know what code is currently in place and I'll check it out further for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by sirmanu on Tue, 2018-10-30 12:01

Hi. A couple of months ago they sent this mail.
I hope it helps:

Last week, several partners flagged issues with the Finding API and we wanted to provide you with an update. As of late last week, our Developer Network team began enforcing call limits for the Finding API, which for basic Developer accounts is 5,000 calls per day. Previously, if you exceeded the call limit, the API would still function, however, now once the call limit is reached the API won’t return any more data until the next day.

While this change applies to the Finding API now, it is likely going to apply to other APIs soon. We recommend you review your usage and if necessary, follow the steps to increase your call limits for any eBay API you use.

In the meantime, if you anticipate needing more than 5,000 calls per day, we ask that you please complete our Compatible App Check. The Developer team will review and get back to you soon.

Submitted by Keeop on Thu, 2018-11-01 09:44

Hi David,

Think we need a NOT operator in here!

Cheers.
Keeop

Submitted by support on Thu, 2018-11-01 10:49

Ooops yes! Corrected above;

stripos() can return 0 (string found right at the beginning in position zero) as well as FALSE (string not found at all) so whilst you're unlikely to expect "bot" at the start of the user agent, using === FALSE covers the possibility...

Cheers,
David.
--
PriceTapestry.com

Submitted by Keeop on Thu, 2018-11-01 11:10

Hi David,

Cool, thanks.

Still getting that same 'result' back from eBay though. Very strange. Went on the Developer section to get a report on API usage and have had no calls in months!! I'm not much of an expert with this so do you have any ideas on what might be going on or where to look?

Cheers.
Keeop

Submitted by Keeop on Fri, 2018-11-02 11:35

It's finally back! Patience was the key.............!

Cheers.
Keeop