Problem with perl & google

Discussion in 'Perl Misc' started by Paul, Oct 7, 2005.

  1. Paul

    Paul Guest

    This sample work:

    $URL="http://search.yahoo.com/search?p=perl&fr=FP-tab-web-t&toggle=1&cop=&ei
    =UTF-8";
    use LWP::Simple;
    unless (defined ($webstr = get $URL)){die "could not get $URL\n";}
    print $webstr;
    But this don't:
    $URL="http://www.google.com/search?hl=hr&q=perl&lr=";
    use LWP::Simple;
    unless (defined ($webstr = get $URL)){die "could not get $URL\n";}
    print $webstr;
    Why is problem with google?

    Thanks.
     
    Paul, Oct 7, 2005
    #1
    1. Advertising

  2. "Paul" <> wrote in
    news:di58tk$gbv$-com.hr:

    > This sample work:
    >
    > $URL="http://search.yahoo.com/search?p=perl&fr=FP-tab-web-t&toggle=1

    &co
    > p=&ei =UTF-8";
    > use LWP::Simple;
    > unless (defined ($webstr = get $URL)){die "could not get
    > $URL\n";} print $webstr;
    > But this don't:
    > $URL="http://www.google.com/search?hl=hr&q=perl&lr=";
    > use LWP::Simple;
    > unless (defined ($webstr = get $URL)){die "could not get
    > $URL\n";} print $webstr;
    > Why is problem with google?


    You should always ask the computer *why* something failed, and report it
    when you are posting here.

    D:\Home\asu1\UseNet\clpmisc> wget
    "http://www.google.com/search?hl=hr&q=perl&lr= "
    --07:23:55-- http://www.google.com/search?hl=hr&q=perl&lr=
    => `search@hl=hr&q=perl&lr='
    Resolving www.google.com... 64.233.161.99, 64.233.161.104,
    64.233.161.147 Connecting to www.google.com|64.233.161.99|:80...
    connected. HTTP request sent, awaiting response... 403 Forbidden
    07:23:56 ERROR 403: Forbidden.

    You are violating the Google TOS.

    http://www.google.com/apis/

    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Oct 7, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Thompson

    FAQ - references to Google/Google Groups

    Andrew Thompson, Jun 20, 2005, in forum: Java
    Replies:
    0
    Views:
    654
    Andrew Thompson
    Jun 20, 2005
  2. Replies:
    2
    Views:
    2,048
    Jeffrey Schwab
    Nov 28, 2005
  3. Krice
    Replies:
    9
    Views:
    305
    Default User
    Apr 25, 2008
  4. JSH
    Replies:
    0
    Views:
    390
  5. Ethan Herdrick
    Replies:
    1
    Views:
    114
    Ethan Herdrick
    May 11, 2006
Loading...

Share This Page