|
Posted by mccownf on June 29, 2005, 2:06 pm
Please log in for more thread options
Maybe someone knows why the Google API is having problems when the '&'
char appears in a query. This is necessary when trying to find out
info about a URL as the code below demonstrates.
my $query =
'http://www.duexotictimbers.com/gallerydisplay.aspx?cat=bowls&test=1';
my $google_search = SOAP::Lite->service("file:GoogleSearch.wsdl");
my $results = $google_search ->
doGoogleSearch(
$google_key, $query, 0, 10, "false", "", "false",
"", "latin1", "latin1");
@} or exit;
The last line causes this run-time error:
Can't use an undefined value as an ARRAY reference at ...
Any ideas how this problem can be fixed? I tried replacing the & with
%26 but then Google can't find the site.
Thanks,
Frank
|
|
Posted by mccownf on June 30, 2005, 4:55 am
Please log in for more thread options
The $query from the previous post should have been
my $query = 'info:http://...etc...';
Frank
|
|
Posted by Thomas Wittek on June 30, 2005, 2:04 pm
Please log in for more thread options
> Any ideas how this problem can be fixed? I tried replacing the & with
> %26 but then Google can't find the site.
Did you try to replace the & by a ; ?
This might work.
-Thomas
|
|
Posted by mccownf on June 30, 2005, 8:21 am
Please log in for more thread options
I think I found the problem. Since this is being converted into a SOAP
query (XML), the '&' char must be converted in '&'. The & is
then converted back into a '&' char when performing the actual query.
This also applied to using the Net::Google module. An automatic
conversion of these chars would be nice to have done.
Frank
|
|
Posted by mccownf on June 30, 2005, 11:04 am
Please log in for more thread options
Argh... If you are viewing this in a web browser, you're not seeing the
actual chars I posted. The previous post is talking about converting
the '&' char into the '&' char.
|
| Similar Threads | Posted | | SOAP::Lite : Problem of # sign added by SOAP::Lite in the sent SOAPActionstring | November 5, 2004, 8:45 pm |
| SOAP::Lite WSDL method with multiple soap:body parts | February 16, 2005, 3:32 pm |
| Writing a HTML/ASP SOAP client for a SOAP::Lite destination | March 16, 2005, 5:19 pm |
| Help with SOAP::Lite | January 19, 2005, 11:35 pm |
| SOAP::Lite | March 3, 2005, 6:13 am |
| Using SOAP::Lite and .NET | November 16, 2005, 2:12 pm |
| SOAP::Lite | March 5, 2007, 4:26 am |
| use SOAP::Lite +autodispatch ??? | November 23, 2004, 3:12 am |
| SOAP::Lite weirdness | April 6, 2006, 8:07 am |
| ForkOnAccept for SOAP::Lite TCP server | November 27, 2004, 11:32 am |
|