#!/usr/bin/perl -wd use strict; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $response = $mech->get( "https://secure.ancestry.com/login" ); $mech->submit_form( form_number => 1, fields => { Username => 'MyUserName', Password => 'MyPassword', ReturnUrl => '' }, ); print $response->as_string( );
mech-dump https://secure.ancestry.com/login shows the form to look like this:
POST https://secure.ancestry.com/Login
Username= (text)
Password= (password)
ReturnUrl= (hidden readonly)
I think my confusion may be that I don't know what to do with the 'ReturnUrl' field so (I believe) I'm passing it back a null entry...
Anyway, each time I run it the server gives back a standard 'unknown user/pass' page...
I've double/triple checked my user/pass is correct.
Anyone have any ideas on this one?
Thank you!
JclH
Update
Thank you guys for the replies. Not sure which one, but one of the suggestions seems to have worked. Thanks!In reply to WWW::Mechanize authentication problem by jclh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |