Greetings fellow monks!

Usually I code as much as possible on my own. So when I want to do something automatic on a webpage I usually loaded that page with curl and fetched the data I needed with a bunch of REs.

But the lessons in th monastry sunk in and so I started the adventure of WWW::Mechanize, when I felt the need to automatically retrieve some data from my account at Nintendo.

But I failed miserably! Analyzing the web traffic revealed that a login using Mozilla sends different data than a login tried with my script.

Maybe a WWW::Mechanize expert can find out what I'm doing wrong or what I'm missing.

Here is my script with personal data X-ed

#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; my $user= 'XXXX@spamgourmet.com'; my $password= 'XXXX'; my $n=WWW::Mechanize->new(); $n->get( q(http://www.nintendo-europe.com/NOE/de/DE/logout/index.jsp?D +PSLogout=true) ); $n->form_name('login'); $n->set_visible( $user, $password ); $n->submit_form( x => 3, y => 7); print $n->content()


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

In reply to WWW::Mechanize can't log in using it by Skeeve

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.