in reply to Re: WWW::Mechanize form field types
in thread WWW::Mechanize form field types
use strict; use WWW::Mechanize; use HTML::Form; use LWP::UserAgent; my $url = "a valid url to an .aspx form here"; my $mech = WWW::Mechanize->new(autocheck => 1); $mech->get( $url ) or die("Could not connect to $url"); my $ua = LWP::UserAgent->new; my $response = $ua->get($url); my @forms = HTML::Form->parse($response); foreach my $page (1..15) { foreach my $form (@forms) { my @fields = ""; @fields = $form->inputs; foreach my $hurr (0..$#fields) { print "$fields[$hurr]\t $page / 15\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: WWW::Mechanize form field types
by Gangabass (Vicar) on Jun 30, 2008 at 08:57 UTC | |
by Lawliet (Curate) on Jun 30, 2008 at 22:26 UTC |