1
我使用WWW ::機械化來檢索網頁中的形式:爲什麼WWW :: Mechanize找不到合適的表單?
#!/usr/bin/perl
use WWW::Mechanize;
my $mechanize = WWW::Mechanize->new();
$mechanize->proxy(['http', 'ftp'], 'http://proxy/');
$mechanize->get("http://www.temp.com/");
$mechanize->form_id('signin');
網站HTML代碼具有如下
<form action="https://www.temp.com/session" id="signin" method="post">
,但我得到的錯誤
There is no form with ID "signin" at SiteScraper.pl
我該怎麼做?