Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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!

Comment on WWW::Mechanize and
Download Code
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2015-10-05 05:17 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (107 votes), past polls