alvise has asked for the wisdom of the Perl Monks concerning the following question:
the above code does not return the webpage that is returned when the form is manually submitted with those 3 selects selected. What am I doing wrong ? Thanks in advance, Alvise#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; use HTTP::Cookies; my $cookie_jar = HTTP::Cookies->new(file => 'cookies', autosave => 1, +ignore_discard => 1); my $mech = WWW::Mechanize->new( cookie_jar => $cookie_jar, autocheck = +> 1 ); $mech->get( 'https://oc4jese1ssl.pubblica.istruzione.it/trasparenzaPub +b/ricercacv.do' ); $mech -> form_id ( 'RicercaCVAF' ); $mech -> select ( "codRegione", "AB_ABRUZZO" ); $mech -> select ( "codProvincia", "CH_CHIETI" ); $mech -> select ( "codComune", "E372_VASTO" ); $mech -> field ( "submitName", "Cerca la scuola" ); $mech -> submit ( ); print $mech -> content;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using Mechanize
by Corion (Patriarch) on Apr 22, 2016 at 21:43 UTC | |
by runrig (Abbot) on Apr 22, 2016 at 22:00 UTC | |
|
Re: using Mechanize
by nysus (Parson) on Apr 23, 2016 at 12:32 UTC |