我想使用Perl的Mechanize庫填寫Web表單。Perl WWW ::機械化 - 身份驗證錯誤獲取URL
只要我在搜索框中輸入URL,它就會提示下面的消息,我可以手動登錄成功。
然而,當我運行下面的腳本,我得到以下錯誤:
如何正確地在第一個身份驗證對話框證書使用我$mech
對象填寫?
my $mech = WWW::Mechanize->new('keepalive' => 1);
my $url = "http://URL/I/NEED/TO/ACCESS";
my $username = "username";
my $password = "password";
$mech->credentials($username, $password);
$mech->get($url); <----------------- ERROR (LINE 93)
編輯:
這裏是請求站點
--2013-08-30 11:16:17-- http://moss.micron.com/MFG/ProbeTest/Lists/Manufacturing%20Requests/AllItems.aspx
Resolving moss.micron.com... 137.201.88.118
Connecting to moss.micron.com|137.201.88.118|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 401 Unauthorized
Server: Microsoft-IIS/7.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 12.0.0.6341
Date: Fri, 30 Aug 2013 17:16:17 GMT
Connection: keep-alive
Content-Length: 0
Authorization failed.
您正在使用什麼版本的機械? – Nate
如何檢查當前版本? –
剛剛檢查。我正在使用VERSION 1.70 –