homer123 has asked for the wisdom of the Perl Monks concerning the following question:
When I do use this script I get a success for the first part but I cant seem to post the username and passwrd. I get the following error msg.use LWP::UserAgent; use HTTP::Cookies; use WWW::Mechanize; my $start_page = 'https://secure2.playboy.com/security/loginStart.do?s +c_target=cyber.playboy.com'; my $mech = WWW::Mechanize->new(); my $mech = WWW::Mechanize->new( cookie_jar => "lwpcookies.txt"); my $mech = WWW::Mechanize->new( agent=>"Mozilla/5.0 (X11; U; Linux i68 +6; en-US; rv:1.7) Gecko/20040918 Firefox/0.9.3 " ); $mech->get( $start_page ); if ($mech->success()==1) { print "Success \n"; } $mech->submit_form( form_name => 'loginForm', fields => { username => 'xxxx', password => 'xxxx', savedPWAction => 'on', submitButton => 'ENTER THE CLUB' } ); #$mech->click_button(name => 'submitButton'); #$button='submitButton'; $mech->click; $result = $mech->success(); if ($result == 1){ print "Success"; } else { print "Fail"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Loging into a website using javascript for login
by PodMaster (Abbot) on Sep 27, 2004 at 08:46 UTC | |
by homer123 (Initiate) on Sep 27, 2004 at 14:23 UTC | |
by Kanji (Parson) on Sep 27, 2004 at 16:30 UTC | |
by homer123 (Initiate) on Sep 27, 2004 at 18:05 UTC | |
by Kanji (Parson) on Sep 27, 2004 at 20:30 UTC | |
|
Re: Loging into a website using javascript for login
by jacques (Priest) on Sep 27, 2004 at 14:43 UTC | |
|
Re: Loging into a website using javascript for login
by homer123 (Initiate) on Sep 28, 2004 at 03:12 UTC | |
|
Re: Loging into a website using javascript for login
by homer123 (Initiate) on Sep 28, 2004 at 03:13 UTC |