in reply to Extracting Pages via proxy server using WWW::Mechanize

PerlUser,
Perhaps Re: WWW:::Mechanize and credentials will be of help. If not, more details are required to help.

Cheers - L~R

  • Comment on Re: Extracting Pages via proxy server using WWW::Mechanize

Replies are listed 'Best First'.
Re^2: Extracting Pages via proxy server using WWW::Mechanize
by Anonymous Monk on Jan 04, 2006 at 09:37 UTC

    Hi Cheers,

    Thanks for your reply.
    I tried the code. but it's not what i expect.
    I done the extraction using LWP::UserAgent. but now i am expecting the same by using WWW::Mechanize.
    In LWP::UserAgent i used the statement like '$req->proxy_authorization_basic($username, $password);' to access the proxy.
    In WWW::Mechanize where i have to give my username and password for proxy server?.

    The code i tried in LWP::UserAgent

    use LWP::UserAgent; my $ua = new LWP::UserAgent; $ua->proxy(['http']=> 'http://11.12.5.20:3350'); my $url = 'http://www.yahoo.com'; my $req = HTTP::Request->new(GET => $url); $req->proxy_authorization_basic($username, $password); my $res = $ua->request($req); if ($res->is_success) { print $res->content; }
    Thanks,
    PerlUser