2
我使用下面的代碼嘗試從我的網站搜索Google Scholar,它將工作一次或兩次,然後出現錯誤「Error GETing http://scholar.google.com:無法連接到學者.google.com:80(權限被拒絕)」 - 我使用的代碼如下:如何使用Perl訪問Google Scholar
use strict;
use WWW::Mechanize;
my $browser = WWW::Mechanize->new();
$browser->get('http://scholar.google.com');
$browser->form_name('f');
$browser->field('q','PCR');
$browser->submit();
print $browser->content();
任何提示或建議非常讚賞
你需要使用'的https:// scholar.google.com'? – mob 2015-02-10 20:39:23
http://scholar.google.com將我重定向到https網址。 – Sobrique 2015-02-10 21:14:14
是的,它是正確的URL,正如我所提到的,它有時作爲http而不是https安全地工作 – neemie 2015-02-10 21:16:17