Yahoo API problems?
A200560
created: 2006-03-04 13:34:11
Dear friends, I have a service built upon the Yahoo Perl API but I don't understand if today they have some problems with the service.

Look the simple example after "SYNOPSIS":
http://search.cpan.org/~jfriedl/Yahoo-Search-1.4.7/lib/Yahoo/Search.pm

Today my online service is not able to retrive search results. I tried in local on my PC with this example and I obtain: "error processing XML: oops at Yahoo/Search/XML.pm line 78".

Please can you confirm that the service (Web results )is not available?

Thanks, Vincenzo
Re: Yahoo API problems?
created: 2006-03-04 19:48:33

Hi, Vincenzio:

If it's any consolation to you, I get the same error, using that example. Without dissecting the whole module, I couldn't say for sure what the problem is, but I'm thinking that it may have to do with Yahoo! changing their format, and the module not being able to handle the changes. You might find something more specific at Yahoo!'s Developer's Network.

Re: Yahoo API problems?
created: 2006-03-05 09:38:24
Vincenzo-- The example works with the latest version of Yahoo::Search. I compared 1.4.7 with the last version, and found that the problem is that Yahoo seems to have added some whitespace that the search program didn't like/account for. In v1.4.8 they detect & ignore the extra whitespace:

v1.4.7, XML.pm:
76: if ($node->{Data})
77: {
78:     die "oops: node Char='$node->{Char}'" if $node->{Char} ne "";
79:     $val = $node->{Data};
80: }

v1.4.8, XML.pm:
76: if ($node->{Data})
77: {
78:     if ($node->{Char} =~ m/^\s*$/) {
79:         $node->{Char} = "";
80:     } else {
81:         die "oops [$node->{Char}]";
82:     }
83:     $val = $node->{Data};
84: }
--roboticus
Re^2: Yahoo API problems?
created: 2006-03-05 16:16:26
OK, with the latest version Yahoo-Search-1.5.8 - 04 Mar 2006 now works, but Yahoo should announce every change in the API else developers become crazy. Infact, there is no trace of this little change.

Thank you very much!

Vincenzo

perlmonks.org content © perlmonks.org and A200560, roboticus, spiritway

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03