使用Perl模块无法在网页中找到表单-WWW:Mechanize [英] Can't find forms in a webpage using Perl module - WWW:Mechanize
问题描述
我正在使用perl模块WWW:Mechanize
I am using the perl module WWW:Mechanize
直到现在一切都很好,但是对于某些网页,似乎无法找到现有表格:
Until now everything was fine, but for a certain webpage it seems unable to find an existing form:
<form id="formaction" method="post" action="omadm_locate.php">
尽管在打印页面内容时,将打印预期的页面及其右侧的页面.
Although when I print the content of the page, the expected page is printed and its the right page.
我用过print Dumper($mech->forms());
它没有给我任何东西;
I have used print Dumper($mech->forms());
it gave me nothing;
$mech->forms
不返回任何内容;
所有信息告诉我,页面虽然有表单,但没有任何形式,输入文件也是如此...
Everything tells me that the page has no forms although it has, same thing for the input files...
顺便说一句,我可以使用excat方法访问其他页面中的其他表单.
Btw I was able to access other forms in other pages using the excat method.
推荐答案
在旧版本中,WWW :: Mechanize在搜索某些表格时出现错误. 如果您使用的Linux发行版的海关软件包更新不是很重要,那么这一点很重要.
In old versions WWW::Mechanize got errors to search some forms. It's important if you're using some Linux distribution with customs packages which aren't very updated.
这篇关于使用Perl模块无法在网页中找到表单-WWW:Mechanize的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!