Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

WWW::Mechanize and

by Anonymous Monk
on Dec 07, 2012 at 13:40 UTC ( #1007738=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, i tried to login into the page with the usual WWW::Mechanize methods:
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use WWW::Mechanize; use HTTP::Cookies; my $url = ''; my $mech = WWW::Mechanize->new( cookie_jar => HTTP::Cookies->new( file + => 'cookies.txt') ); $mech->get($url); $mech->form_name('login_form'); $mech->field(userInput => 'user'); $mech->field(passwordInput => 'password'); $mech->click(); my $content = $mech->content(); print Dumper($content);
Unfortunately $content does not contain the correct response. Is there a way to get a correct logon to the page ? Thanks!

Replies are listed 'Best First'.
Re: WWW::Mechanize and
by marto (Bishop) on Dec 07, 2012 at 13:44 UTC
Re: WWW::Mechanize and
by Anonymous Monk on Dec 08, 2012 at 03:58 UTC

    This url tells me you have money to hire a programmer to write this program for you :)

    This url tells me there is probably a better alternative to scraping cdclogin.html

    Maybe it involves Net::SAML/Net::SAML2 ... that first URL had a FAQ/Help links, if you have an account, ask about easier ways to automate authentication , they'll probably help you :)

      Thanks for pointing me to that interesting links. IŽll give Http::Recorder a try. Paying someone else for a solution was not what i had in mind ;). My intention was to access Ciscos Error Message Decoder Tool. Something which has been done before by that guy:
Re: WWW::Mechanize and
by Anonymous Monk on Dec 08, 2012 at 03:48 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1007738]
Approved by mbethke
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-01-18 23:40 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (166 votes). Check out past polls.