mujiburger has asked for the wisdom of the Perl Monks concerning the following question:
$mech->submit_form( form_number => 1, fields => { 'password' => $self->{password} }, );
$mech->submit_form( form_name => 'login', fields => { 'input-login-email' => $self->{account}, 'password' + => $self->{password} }, );
if ($self->{location} eq 'us'){ login_us($self) unless $self->{logged_in}; $mech->get('https://s1.amazon.com/exec/varzea/subst/your-account/m +anage-your-seller-account.html/ref=ya_hp_az_2/'); } elsif ($self->{location} eq 'uk'){ login_uk($self) unless $self->{logged_in}; $mech->get('http://s1.amazon.co.uk/exec/varzea/subst/your-account/ +manage-your-seller-account.html/ref=ya_hp_az_2/'); } $mech->follow_link(text_regex => qr/View your Amazon Payments account +and billing history/i); $mech->follow_link(text_regex => qr/View your Amazon Payments account +summary/i); $mech->submit_form( form_number => 1, fields => { 'password' => $self->{password} }, ); $mech->follow_link(url_regex => qr/vg=1&ve=6&vf=4/i); sub login_us{ my $self = shift; print "Performing US LOGIN...\n"; $mech->get('http://www.amazon.com/'); $mech->follow_link(text_regex => qr/your account/i); $mech->follow_link(text_regex => qr/Your seller account/i); $mech->submit_form( form_name => 'login', fields => { 'input-login-email' => $self->{account}, 'p +assword' => $self->{password} }, ); $self->{logged_in} = 1; return $mech->content(base_href => [undef]); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: www::mechanize submit _form silent fail
by PodMaster (Abbot) on Feb 18, 2006 at 07:41 UTC | |
|
Re: www::mechanize submit _form silent fail
by adamk (Chaplain) on Feb 18, 2006 at 08:53 UTC | |
|
Re: www::mechanize submit _form silent fail
by mujiburger (Acolyte) on Feb 18, 2006 at 09:09 UTC | |
|
Re: www::mechanize submit _form silent fail
by monarch (Priest) on Feb 18, 2006 at 11:02 UTC | |
by mujiburger (Acolyte) on Feb 18, 2006 at 13:13 UTC |