-1
asp 페이지에 로그인하는 데 문제가 있습니다. 여기 기계로 asp 로그인을 무시하십시오.
내 코드입니다 :#!/usr/bin/perl -w
use strict;
use warnings;
use WWW::Mechanize;
use LWP::Debug qw(+);
my $mech = WWW::Mechanize->new;
$mech->agent('User-Agent=Mozilla/4.0');
$mech->get('http://site.net/index.asp');
$mech->submit_form(
form_name => 'form',
fields => {
xpto => '123'
}
);
my $app_content = $mech->content();
print "$app_content\n";
그리고 내가 터미널에서 무엇을 얻을 : (당신의 사용자 에이전트가 이상한 것을 검출하는 것 중 하나
<html>
<head>
<title>Anti Bot</title>
</head>
<body>
<h1 style="color:red;">Bots are not allowed here</h1>
</body>
</html>
당신 말이 맞습니다. "User-Agent ="때문에 작동하지 않습니다. –