Hello! I want to search special characters (for example parcent (%, 0x25)).
I read the O'Reilly's GOOGLE HACKS version 2 and I found that you could make it with Google Search API with SOAP in hack #75. But as you know, Google Search API with SOAP had been deprecated and the hack was also removed in the GOOGLE HACKS version 3. I searched web and found that Google AJAX Search API is the new superset of Google Search API with SOAP. Can I search special characters (for example parcent (%, 0x25)) with it? I don't know well about JavaScript so I searched and found a code written in Perl in the blog. This code uses this functionality: http://code.google.com/intl/en/apis/ajaxsearch/documentation/reference.html#_intro_fonje and I could search the string special characters safely. #! perl # gSearch.pl # use strict; use warnings; use LWP::Simple; use JSON::Syck; my $response = get("http://ajax.googleapis.com/ajax/services/search/ web?v=1.0&rsz=large&hl=ja&q=string"); my $data = JSON::Syck::Load($response); foreach (@{$data->{responseData}{results}}){ from_to($_->{title}, 'utf8' ,'shift-jis'); from_to($_->{titleNoFormatting}, 'utf8' ,'shift-jis'); from_to($_->{content}, 'utf8' ,'shift-jis'); print "-----------------","\n"; print "GsearchResultClass",$_->{GsearchResultClass},"\n"; print "unescapedUrl:",$_->{unescapedUrl},"\n"; print "url:",$_->{url},"\n"; print "visibleUrl:",$_->{visibleUrl},"\n"; print "cacheUrl:",$_->{cacheUrl},"\n"; print "title:",$_->{title},"\n"; print "titleNoFormatting:",$_->{titleNoFormatting},"\n"; print "content:",$_->{content},"\n"; } Can I make this code that can search special characters? Thank you very much in advance! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-AJAX-Search-API?hl=en -~----------~----~----~----~------~----~------~--~---
