我使用WWW :: Mechanize :: PhantomJS編寫Perl腳本來獲取頁面內容https://www.landata.vic.gov.au/
,但內容爲空。WWW :: Mechanize :: PhantomJS無法獲取HTTPS頁面
看來SSL證書有問題,誰能幫我解決這個問題?
這是我從我的節目中提取代碼:
use strict;
use warnings;
use CGI qw(:cgi-lib :standard);
use WWW::Mechanize::PhantomJS;
use Utility;
use JSON;
#use DBI;
use DateTime;
use DateTime::TimeZone;
#Create PhantomJs object
my $website = WWW::Mechanize::PhantomJS -> new(
launch_arg => ['ghostdriver/src/main.js']
);
#Launch the website
$website -> get(https://www.landata.vic.gov.au/);
#Get content of the page
print $website->content(format => 'html');
'得到(https://www.landata.vic.gov.au/);'? Somethings missing –
'使用CGI qw(:cgi-lib:standard);'......嗯......非常令人費解。爲什麼你需要這個? –