problem with HTTP::forms

problem with HTTP::forms

am 02.04.2007 23:43:33 von marco.perl.list

Hi,

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) [/off|*/Keine Einschr?nkung]
quarterControl= (option) [*/off|Adlershof
(Treptow)/Adlershof (Treptow) (27)]
quarterControl= (option) [*/off|Altglienicke
(Treptow)/Altglienicke (Treptow) (10)]
quarterControl= (option)
[*/off|Alt-Hohensch?nhausen
(Hohensch?nhausen)/Alt-Hohensch?nhausen (Hohensch?nhausen) (7)]
quarterControl= (option)
[*/off|Baumschulenweg (Treptow)/Baumschulenweg (Treptow) (42)]
quarterControl= (option) [*/off|Biesdorf
(Marzahn)/Biesdorf (Marzahn) (46)]
quarterControl= (option) [*/off|Blankenburg
(Wei?ensee)/Blankenburg (Wei?ensee) (4)]
quarterControl= (option) [*/off|Blankenfelde
(Pankow)/Blankenfelde (Pankow) (2)]
quarterControl= (option) [*/off|Bohnsdorf
(Treptow)/Bohnsdorf (Treptow) (4)]
quarterControl= (option) [*/off|Britz
(Neuk?lln)/Britz (Neuk?lln) (52)]
quarterControl= (option) [*/off|Buch
(Pankow)/Buch (Pankow) (1)]
quarterControl= (option) [*/off|Buckow
(Neuk?lln)/Buckow (Neuk?lln) (113)]
quarterControl= (option)
[*/off|Charlottenburg (Charlottenburg)/Charlottenburg
(Charlottenburg) (677)]
quarterControl= (option) [*/off|Dahlem
(Zehlendorf)/Dahlem (Zehlendorf) (74)]
quarterControl= (option) [*/off|Falkenberg
(Hohensch?nhausen)/Falkenberg (Hohensch?nhausen) (2)]
quarterControl= (option) [*/off|Franz?sisch
Buchholz (Pankow)/Franz?sisch Buchholz (Pankow) (30)]
quarterControl= (option) [*/off|Friedenau
(Sch?neberg)/Friedenau (Sch?neberg) (182)]
quarterControl= (option)
[*/off|Friedrichsfelde (Lichtenberg)/Friedrichsfelde
(Lichtenberg) (54)]
quarterControl= (option)
[*/off|Friedrichshagen (K?penick)/Friedrichshagen (K?penick)
(47)]
quarterControl= (option)
[*/off|Friedrichshain (Friedrichshain)/Friedrichshain
(Friedrichshain) (363)]
quarterControl= (option) [*/off|Frohnau
(Reinickendorf)/Frohnau (Reinickendorf) (43)]
quarterControl= (option) [*/off|Gatow
(Spandau)/Gatow (Spandau) (1)]
quarterControl= (option) [*/off|Gr?nau
(K?penick)/Gr?nau (K?penick) (15)]
quarterControl= (option) [*/off|Grunewald
(Wilmersdorf)/Grunewald (Wilmersdorf) (165)]
quarterControl= (option) [*/off|Haselhorst
(Spandau)/Haselhorst (Spandau) (20)]
quarterControl= (option) [*/off|Heiligensee
(Reinickendorf)/Heiligensee (Reinickendorf) (28)]
quarterControl= (option) [*/off|Heinersdorf
(Wei?ensee)/Heinersdorf (Wei?ensee) (4)]
quarterControl= (option) [*/off|Hellersdorf
(Hellersdorf)/Hellersdorf (Hellersdorf) (24)]
quarterControl= (option) [*/off|Hermsdorf
(Reinickendorf)/Hermsdorf (Reinickendorf) (32)]
quarterControl= (option) [*/off|Johannisthal
(Treptow)/Johannisthal (Treptow) (20)]
quarterControl= (option) [*/off|Karlshorst
(Lichtenberg)/Karlshorst (Lichtenberg) (98)]
quarterControl= (option) [*/off|Karow
(Wei?ensee)/Karow (Wei?ensee) (2)]
quarterControl= (option) [*/off|Kaulsdorf
(Hellersdorf)/Kaulsdorf (Hellersdorf) (20)]
quarterControl= (option) [*/off|Kladow
(Spandau)/Kladow (Spandau) (10)]
quarterControl= (option) [*/off|Konradsh?he
(Reinickendorf)/Konradsh?he (Reinickendorf) (4)]
quarterControl= (option) [*/off|K?penick
(K?penick)/K?penick (K?penick) (116)]
quarterControl= (option) [*/off|Kreuzberg
(Kreuzberg)/Kreuzberg (Kreuzberg) (207)]
quarterControl= (option) [*/off|Lankwitz
(Steglitz)/Lankwitz (Steglitz) (122)]
quarterControl= (option) [*/off|Lichtenberg
(Lichtenberg)/Lichtenberg (Lichtenberg) (61)]
quarterControl= (option) [*/off|Lichtenrade
(Tempelhof)/Lichtenrade (Tempelhof) (70)]
quarterControl= (option) [*/off|Lichterfelde
(Steglitz)/Lichterfelde (Steglitz) (313)]
quarterControl= (option) [*/off|L?bars
(Reinickendorf)/L?bars (Reinickendorf) (2)]
quarterControl= (option) [*/off|Mahlsdorf
(Hellersdorf)/Mahlsdorf (Hellersdorf) (21)]
quarterControl= (option) [*/off|Malchow
(Hohensch?nhausen)]
quarterControl= (option) [*/off|Mariendorf
(Tempelhof)/Mariendorf (Tempelhof) (116)]
quarterControl= (option) [*/off|Marienfelde
(Tempelhof)/Marienfelde (Tempelhof) (47)]
quarterControl= (option) [*/off|Marzahn
(Marzahn)/Marzahn (Marzahn) (36)]
quarterControl= (option) [*/off|Mitte
(Mitte)/Mitte (Mitte) (582)]
quarterControl= (option) [*/off|M?ggelheim
(K?penick)/M?ggelheim (K?penick) (11)]
quarterControl= (option)
[*/off|Neu-Hohensch?nhausen
(Hohensch?nhausen)/Neu-Hohensch?nhausen (Hohensch?nhausen) (3)]
quarterControl= (option) [*/off|Neuk?lln
(Neuk?lln)/Neuk?lln (Neuk?lln) (178)]
quarterControl= (option)
[*/off|Niedersch?neweide (Treptow)/Niedersch?neweide (Treptow)
(17)]
quarterControl= (option)
[*/off|Niedersch?nhausen (Pankow)/Niedersch?nhausen (Pankow)
(104)]
quarterControl= (option) [*/off|Nikolassee
(Zehlendorf)/Nikolassee (Zehlendorf) (95)]
quarterControl= (option)
[*/off|Obersch?neweide (K?penick)/Obersch?neweide (K?penick)
(24)]
quarterControl= (option) [*/off|Pankow
(Pankow)/Pankow (Pankow) (91)]
quarterControl= (option) [*/off|Pl?nterwald
(Treptow)/Pl?nterwald (Treptow) (21)]
quarterControl= (option) [*/off|Prenzlauer
Berg (Prenzlauer Berg)/Prenzlauer Berg (Prenzlauer Berg) (615)]
quarterControl= (option) [*/off|Rahnsdorf
(K?penick)/Rahnsdorf (K?penick) (11)]
quarterControl= (option)
[*/off|Reinickendorf (Reinickendorf)/Reinickendorf
(Reinickendorf) (206)]
quarterControl= (option) [*/off|Rosenthal
(Pankow)/Rosenthal (Pankow) (48)]
quarterControl= (option) [*/off|Rudow
(Neuk?lln)/Rudow (Neuk?lln) (54)]
quarterControl= (option) [*/off|Rummelsburg
(Lichtenberg)]
quarterControl= (option)
[*/off|Schmargendorf (Wilmersdorf)/Schmargendorf (Wilmersdorf)
(96)]
quarterControl= (option) [*/off|Schm?ckwitz
(K?penick)]
quarterControl= (option) [*/off|Sch?neberg
(Sch?neberg)/Sch?neberg (Sch?neberg) (344)]
quarterControl= (option) [*/off|Siemensstadt
(Spandau)/Siemensstadt (Spandau) (24)]
quarterControl= (option) [*/off|Spandau
(Spandau)/Spandau (Spandau) (377)]
quarterControl= (option) [*/off|Staaken
(Spandau)/Staaken (Spandau) (32)]
quarterControl= (option) [*/off|Steglitz
(Steglitz)/Steglitz (Steglitz) (350)]
quarterControl= (option) [*/off|Tegel
(Reinickendorf)/Tegel (Reinickendorf) (56)]
quarterControl= (option) [*/off|Tempelhof
(Tempelhof)/Tempelhof (Tempelhof) (145)]
quarterControl= (option) [*/off|Tiergarten
(Tiergarten)/Tiergarten (Tiergarten) (248)]
quarterControl= (option) [*/off|Treptow
(Treptow)/Treptow (Treptow) (44)]
quarterControl= (option)
[*/off|Waidmannslust (Reinickendorf)/Waidmannslust
(Reinickendorf) (11)]
quarterControl= (option) [*/off|Wannsee
(Zehlendorf)/Wannsee (Zehlendorf) (39)]
quarterControl= (option) [*/off|Wartenberg
(Hohensch?nhausen)/Wartenberg (Hohensch?nhausen) (16)]
quarterControl= (option) [*/off|Wedding
(Wedding)/Wedding (Wedding) (182)]
quarterControl= (option) [*/off|Wei?ensee
(Wei?ensee)/Wei?ensee (Wei?ensee) (106)]
quarterControl= (option) [*/off|Wilmersdorf
(Wilmersdorf)/Wilmersdorf (Wilmersdorf) (519)]
quarterControl= (option) [*/off|Wittenau
(Reinickendorf)/Wittenau (Reinickendorf) (71)]
quarterControl= (option) [*/off|Zehlendorf
(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= (checkbox) [*/off|true/Ja]
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