Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Can't make WWW::Mechanize work through proxy programmatically

by igoryonya (Pilgrim)
on Sep 24, 2022 at 05:46 UTC ( [id://11147099]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $mech->proxy(['http'],  'http://127.0.0.1:8118');
    $mech->proxy(['https'],  undef);
    
  2. or download this
    #!/usr/bin/env perl
    use WWW::Mechanize;
    ...
    
    $mech->get($url);
    print $mech->content;
    
  3. or download this
    $ENV{'HTTPS_PROXY'} = 'http://127.0.0.1:8118';
    my $mech = WWW::Mechanize->new(
    ...
      noproxy=>0
    );
    $mech->env_proxy;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11147099]
Approved by Athanasius
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-19 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found