80degreez has asked for the wisdom of the Perl Monks concerning the following question:
When the script is executed, no output whatsoever.use strict; use WWW::Mechanize; use HTTP::Cookies; my $mech = WWW::Mechanize->new( agent =>"Mozilla/5.0 (X11; U; Li +nux i68+6; en-US; rv:1.7) Gecko/20040918 Firefox/0.9.3 "); my $i = 0; my $usr = "username"; my $pw = "password"; $mech->get("http://www.http://www.soundclick.com/mysoundclick"); $mech->cookie_jar( HTTP::Cookies->new() ); if( $mech->content() =~ /CFForm_1/ ){ $mech->input_name("email"); $mech->input_name("password"); $mech->field( email => $usr ); $mech->field( password => $pw ); $mech->click(); if ($mech->success() ) { if ( $mech->content() =~ /My personal member profile/ ) { print "User $usr logged in successfully!\n" ; } else { print " User $usr was unable to log in successfully!\n"; } } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using WWW::Mechanize
by Fletch (Bishop) on Apr 26, 2007 at 19:10 UTC | |
Re: Using WWW::Mechanize
by akho (Hermit) on Apr 26, 2007 at 19:17 UTC | |
by 80degreez (Initiate) on Apr 26, 2007 at 23:28 UTC | |
by chargrill (Parson) on Apr 27, 2007 at 00:48 UTC | |
by akho (Hermit) on Apr 28, 2007 at 12:35 UTC | |
Re: Using WWW::Mechanize
by eXile (Priest) on Apr 27, 2007 at 14:19 UTC |