Leser: 1
7 Einträge, 1 Seite |
1 2 3 4
use Win32::Internet; my $INET = new Win32::Internet(); my $file = $INET->FetchURL("http://www.seite.de");
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use WWW::Mechanize; use HTML::Form; my $mech = WWW::Mechanize->new( autocheck => 1 ); my $response = $mech->get( "http://www.seite.de" ); $mech->submit_form( form_number => 1, fields => { Name123 => 'User', PW123 => '12345', } ); open (AUSGABE, ">dump.htm"); print AUSGABE $mech->content; close (AUSGABE); exit;
1 2 3
$mech->form_number($number) Selects the numberth form on the page as the target for subsequent calls to field() and click(). Also returns the form that was selected.
Quote@inputs = $form->inputs
This method returns the list of inputs in the form. If called in scalar context it returns the number of inputs contained in the form. See "INPUTS" for what methods are available for the input objects returned.
1 2 3 4 5 6 7
$form = $mech->form_number(1); @inputs = $form->inputs; foreach $input (@inputs) { print $input->type.'->'.$input->name."\n"; }
7 Einträge, 1 Seite |