[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-win32-users
Subject:    RE: Google API
From:       "Peter Guzis" <PGuzis () encad ! com>
Date:       2005-03-25 18:43:14
Message-ID: 0301153D95B0B547BB0CC728C7E850600358D1FB () ntex2k ! encad ! com
[Download RAW message or body]

The last time I checked Google explicitly blocked the default LWP user agent.  If you set the user agent to a different name (via LWP::UserAgent), the request should work.

-----Original Message-----
From: perl-win32-users-bounces@listserv.ActiveState.com
[mailto:perl-win32-users-bounces@listserv.ActiveState.com]On Behalf Of
Peter Eisengrein
Sent: Friday, March 25, 2005 9:48 AM
To: 'Chris'; perl-win32-users
Subject: RE: Google API


When I use the following code:

use LWP::Simple;
getprint("http://www.google.com/search?q=perl");

I get:
403 Forbidden <URL:http://www.google.com/search?q=perl>

But when I do this:

use LWP::Simple;
getprint("http://www.google.com/");

I get the HTML in return. So, it might be Google that is blocking the query
unless, of course, there is something different in how LWP::Simple packages
the request compared to my browser. FWIW, the response is pretty fast.




> -----Original Message-----
> From: Chris [mailto:or-or.list@contactwdi.com]
> Sent: Friday, March 25, 2005 10:43 AM
> To: perl-win32-users
> Subject: Google API
> 
> 
> All,
> 
> I'm trying to display Google search results from within 
> another site. I've
> tried DBD::Google (Net::Google) & making direct requests via 
> SOAP::Lite.
> Both seem to take 3-5 seconds to produce 10 results (too slow 
> for me). Is
> their a faster way?
> 
> 
> - Chris
> 
> _______________________________________________
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
> 
> 
> __________________________________________________________
> This message was scanned by ATX
> 10:46:02 AM ET - 3/25/2005
> 

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic