Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
the problem is that it fails with retrieving https pages. I've tried adding the HTTPS_PROXY env, added noproxy => 0, I've tried going to a protected page by sending my credentials and it redirects to the home page. I'm lost. What do i do?#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; use Crypt::SSLeay; # proxy $ENV{HTTPS_PROXY}='http://proxy:8080/'; my $mechanize = WWW::Mechanize->new(noproxy => 0); $mechanize->cookie_jar(HTTP::Cookies->new(file=>"mechcookies.txt",auto +save => 1)); $mechanize->proxy(['http', 'https'], 'http://proxy:8080/'); $mechanize->credentials('http://www.site.com/dashboard','ABCDEF','logi +n', 'pass'); $mechanize->get('http://www.site.com/dashboard'); #my $result = $mechanize->submit_form(form_id => 'signin',fields => { +login => 'login', password => 'pass'}); #print "$result" $mechanize->save_content('dump.html');
|
|---|