- 论坛徽章:
- 0
|
回复 2# 兰花仙子
官方网站介绍用法,可是我有些地方看不懂,热心的花仙子可否指点一下,谢谢啦~
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
$mech->get( $url );
$mech->follow_link( n => 3 );
$mech->follow_link( text_regex => qr/download this/i ); #.....这里我不懂是什么意思
$mech->follow_link( url => 'http://host.com/index.html' );
$mech->submit_form(
form_number => 3,
fields => {
username => 'mungo',
password => 'lost-and-alone',
}
);
$mech->submit_form(
form_name => 'search',
fields => { query => 'pot of gold', }, #.....这里我也不懂是什么意思
button => 'Search Now' );#.....这里也不懂
); |
|