inblosam has asked for the wisdom of the Perl Monks concerning the following question:
Sorry, we're unable to process this request. There are two possible ca +uses for this error: You accessed this page via a bookmark instead of entering through the +AdWords Select homepage You have disabled cookies in your browser.
#!/usr/lib/perl -w use strict; use LWP::UserAgent; use Crypt::SSLeay; use HTTP::Request::Common; use HTTP::Cookies; use LWP::Simple; use LWP::Debug qw(+); my $ua = LWP::UserAgent->new; $ua->cookie_jar(HTTP::Cookies->new(file => "cookie_jar", autosave => 1 +)); $ua->timeout(300); my $req = POST 'https://adwords.google.com/select/main', ['login.userid' => 'test@test.com', 'login.password' => 'testabc', 'cmd' => 'LoginValidation', 'login' => 'Login' ]; my $res = $ua->request($req); unless ($res->is_success) { print "Login Failed: : ". $res->status_line . "\n"; return 0; } my $b = $res->as_string; print "\n\n\nThe 1st result is:\n$b\n"; my $req = HTTP::Request->new(GET=>'https://adwords.google.com/select/m +ain?cmd=CampaignManagement&campaignid=0&timeperiod=simple&timeperiod. +simpletimeperiod=today'); my $res = $ua->request($req); my $c = $res->as_string; print "\n\n\nThe 2nd result is:\n$c\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mimic referring URL in LWP?
by pjf (Curate) on Jun 20, 2002 at 01:32 UTC | |
by inblosam (Monk) on Jun 20, 2002 at 03:14 UTC | |
by pjf (Curate) on Jun 21, 2002 at 04:00 UTC | |
|
Re: Mimic referring URL in LWP?
by ehdonhon (Curate) on Jun 20, 2002 at 01:25 UTC | |
|
Re: Mimic referring URL in LWP?
by LiTinOveWeedle (Scribe) on Jun 20, 2002 at 12:53 UTC | |
by inblosam (Monk) on Jun 20, 2002 at 16:12 UTC |