我正在尝试使用 Mechanize 获取 https,但失败了:
use strict;
use warnings;
use IO::Socket::SSL;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new;
$mech->proxy(['https','http'], 'http://proxy:8080/');
$mech->get('https://www.google.com');
print $mech->content;
错误:
Error GETing https://www.google.com: Bad Request at perl4.pl line 9.
当我尝试使用LWP::UserAgent
时,我能够获得 https 而不会出现任何错误:
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->proxy(['https','http'], 'http://proxy:8080/');
$ua->get('https://www.google.com');
有人可以帮忙吗?
目前使用机械化 1.72