problem with HTTP::forms
am 02.04.2007 23:43:33 von marco.perl.listHi,
I am trying to fill a form from a web page and submit it.
I would really appreciate if someone could help me with this issue.
This is the code I used to get to the homepage containing the form:
################################################
!/usr/bin/perl -w
use WWW::Mechanize;
use HTTP::Cookies;
my $mech = WWW::Mechanize->new(agent => "WWW");
$mech->cookie_jar(HTTP::Cookies->new);
my $url = "http://www.immobilienscout24.de/";
$mech->get($url);
$mech->follow_link(text=>"Wohnung kaufen");
$mech->follow_link(text=>"Berlin");
$mech->click_button(
name => "event:doSubmit",
value => "Weiter"
);
$form = $mech->current_form();
$form->dump();
$mech->select("quarterControl",{n => 3});
#########################################
When I try to run I get the following error:
#####################################
GET http://www.immobilienscout24.de/find.national.criteriasInter val/criteriasDialog.go;jsessionid=194BBA6C50A5764EF47C0BDE9E 28D6F7.worker2
[simbaForm]
iac=1 (hidden readonly)
style=is24 (hidden readonly)
is24EC=IS24 (hidden readonly)
quarterControl= (option) [
quarterControl=
(Treptow)/Adlershof (Treptow) (27)]
quarterControl=
(Treptow)/Altglienicke (Treptow) (10)]
quarterControl=
[*
(Hohensch?nhausen)/Alt-Hohensch?nhausen (Hohensch?nhausen) (7)]
quarterControl=
[*
quarterControl=
(Marzahn)/Biesdorf (Marzahn) (46)]
quarterControl=
(Wei?ensee)/Blankenburg (Wei?ensee) (4)]
quarterControl=
(Pankow)/Blankenfelde (Pankow) (2)]
quarterControl=
(Treptow)/Bohnsdorf (Treptow) (4)]
quarterControl=
(Neuk?lln)/Britz (Neuk?lln) (52)]
quarterControl=
(Pankow)/Buch (Pankow) (1)]
quarterControl=
(Neuk?lln)/Buckow (Neuk?lln) (113)]
quarterControl=
[*
(Charlottenburg) (677)]
quarterControl=
(Zehlendorf)/Dahlem (Zehlendorf) (74)]
quarterControl=
(Hohensch?nhausen)/Falkenberg (Hohensch?nhausen) (2)]
quarterControl=
Buchholz (Pankow)/Franz?sisch Buchholz (Pankow) (30)]
quarterControl=
(Sch?neberg)/Friedenau (Sch?neberg) (182)]
quarterControl=
[*
(Lichtenberg) (54)]
quarterControl=
[*
(47)]
quarterControl=
[*
(Friedrichshain) (363)]
quarterControl=
(Reinickendorf)/Frohnau (Reinickendorf) (43)]
quarterControl=
(Spandau)/Gatow (Spandau) (1)]
quarterControl=
(K?penick)/Gr?nau (K?penick) (15)]
quarterControl=
(Wilmersdorf)/Grunewald (Wilmersdorf) (165)]
quarterControl=
(Spandau)/Haselhorst (Spandau) (20)]
quarterControl=
(Reinickendorf)/Heiligensee (Reinickendorf) (28)]
quarterControl=
(Wei?ensee)/Heinersdorf (Wei?ensee) (4)]
quarterControl=
(Hellersdorf)/Hellersdorf (Hellersdorf) (24)]
quarterControl=
(Reinickendorf)/Hermsdorf (Reinickendorf) (32)]
quarterControl=
(Treptow)/Johannisthal (Treptow) (20)]
quarterControl=
(Lichtenberg)/Karlshorst (Lichtenberg) (98)]
quarterControl=
(Wei?ensee)/Karow (Wei?ensee) (2)]
quarterControl=
(Hellersdorf)/Kaulsdorf (Hellersdorf) (20)]
quarterControl=
(Spandau)/Kladow (Spandau) (10)]
quarterControl=
(Reinickendorf)/Konradsh?he (Reinickendorf) (4)]
quarterControl=
(K?penick)/K?penick (K?penick) (116)]
quarterControl=
(Kreuzberg)/Kreuzberg (Kreuzberg) (207)]
quarterControl=
(Steglitz)/Lankwitz (Steglitz) (122)]
quarterControl=
(Lichtenberg)/Lichtenberg (Lichtenberg) (61)]
quarterControl=
(Tempelhof)/Lichtenrade (Tempelhof) (70)]
quarterControl=
(Steglitz)/Lichterfelde (Steglitz) (313)]
quarterControl=
(Reinickendorf)/L?bars (Reinickendorf) (2)]
quarterControl=
(Hellersdorf)/Mahlsdorf (Hellersdorf) (21)]
quarterControl=
(Hohensch?nhausen)]
quarterControl=
(Tempelhof)/Mariendorf (Tempelhof) (116)]
quarterControl=
(Tempelhof)/Marienfelde (Tempelhof) (47)]
quarterControl=
(Marzahn)/Marzahn (Marzahn) (36)]
quarterControl=
(Mitte)/Mitte (Mitte) (582)]
quarterControl=
(K?penick)/M?ggelheim (K?penick) (11)]
quarterControl=
[*
(Hohensch?nhausen)/Neu-Hohensch?nhausen (Hohensch?nhausen) (3)]
quarterControl=
(Neuk?lln)/Neuk?lln (Neuk?lln) (178)]
quarterControl=
[*
(17)]
quarterControl=
[*
(104)]
quarterControl=
(Zehlendorf)/Nikolassee (Zehlendorf) (95)]
quarterControl=
[*
(24)]
quarterControl=
(Pankow)/Pankow (Pankow) (91)]
quarterControl=
(Treptow)/Pl?nterwald (Treptow) (21)]
quarterControl=
Berg (Prenzlauer Berg)/Prenzlauer Berg (Prenzlauer Berg) (615)]
quarterControl=
(K?penick)/Rahnsdorf (K?penick) (11)]
quarterControl=
[*
(Reinickendorf) (206)]
quarterControl=
(Pankow)/Rosenthal (Pankow) (48)]
quarterControl=
(Neuk?lln)/Rudow (Neuk?lln) (54)]
quarterControl=
(Lichtenberg)]
quarterControl=
[*
(96)]
quarterControl=
(K?penick)]
quarterControl=
(Sch?neberg)/Sch?neberg (Sch?neberg) (344)]
quarterControl=
(Spandau)/Siemensstadt (Spandau) (24)]
quarterControl=
(Spandau)/Spandau (Spandau) (377)]
quarterControl=
(Spandau)/Staaken (Spandau) (32)]
quarterControl=
(Steglitz)/Steglitz (Steglitz) (350)]
quarterControl=
(Reinickendorf)/Tegel (Reinickendorf) (56)]
quarterControl=
(Tempelhof)/Tempelhof (Tempelhof) (145)]
quarterControl=
(Tiergarten)/Tiergarten (Tiergarten) (248)]
quarterControl=
(Treptow)/Treptow (Treptow) (44)]
quarterControl=
[*
(Reinickendorf) (11)]
quarterControl=
(Zehlendorf)/Wannsee (Zehlendorf) (39)]
quarterControl=
(Hohensch?nhausen)/Wartenberg (Hohensch?nhausen) (16)]
quarterControl=
(Wedding)/Wedding (Wedding) (182)]
quarterControl=
(Wei?ensee)/Wei?ensee (Wei?ensee) (106)]
quarterControl=
(Wilmersdorf)/Wilmersdorf (Wilmersdorf) (519)]
quarterControl=
(Reinickendorf)/Wittenau (Reinickendorf) (71)]
quarterControl=
(Zehlendorf)/Zehlendorf (Zehlendorf) (292)]
criteriasGroup.nrRoomsControl.min= (text)
criteriasGroup.nrRoomsControl.max= (text)
criteriasGroup.netAreaControl.min= (text)
criteriasGroup.netAreaControl.max= (text)
criteriasGroup.priceControl.min= (text)
criteriasGroup.priceControl.max= (text)
criteriasGroup.isRentedControl=
event:doSubmit=Ergebnisse anzeigen (submit)
>Illegal value 'Altglienicke (Treptow)' for field 'quarterControl' at
/usr/lib/perl5/site_perl/5.8.8/WWW/Mechanize.pm line 1232
Does anybody know what I am doing wrong ?
Marco