Hi Monks,
I am trying to write a script that logs into chase.com and grabs account information for two or three accounts automatically. I originally tried WWW::Mechanize but I could not get all the way in because of all the js, cookies etc. that were being thrown back at me.
I was pointed to Mechanize::Firefox which seemed perfect because Firefox already knows how to do all that stuff. I post my code below which I can see is loading up the site and submits the form does not finish. I just end up on a blank page called: https://mfasa.chase.com/auth/login.html. I want the script to go to the home page, fill in the userid and password and submit it and then let firefox do its thing as if I did those things from the browser directly. Any suggestions on what I may be missing are appreciated. Oh, all status' returned are 200.
#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new(); my $url = 'https://www.chase.com/'; sub print_status() { my $status =$mech->status(); print "status = $status\n"; } $mech->get($url, activate => 1, autoclose => 0, js_JSON => 'native'); # Tried this - did not help. print_status(); my $username = 'XXXXXXXX'; my $password = 'XXXXXXXX'; $mech->form_name ('logonform') ; $mech->field (usr_name => $username); $mech->field (usr_password => $password); print_status(); $mech->submit_form(); print_status();
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |