Created
October 13, 2009 05:11
-
-
Save JEEN/209007 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Config::Pit; | |
use WWW::Mechanize; | |
my $config = pit_get('www.naver.com', require => { | |
url => "your url on example", | |
username => "your username on example", | |
password => "your password on example", | |
}); | |
my $mech = WWW::Mechanize->new; | |
$mech->get($config->{url}); | |
$mech->follow_link(n => 3); | |
$mech->follow_link( text_regex => qr/download this/i ); | |
$mech->follow_link( 'http//www.host.com/index.html' ); | |
$mech->submit_form( | |
form_number => 3, | |
fields => { | |
username => $config->{username}, | |
password => $config->{password}, | |
}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment