Greetings,
I am trying to use WWW::Mechanize to get my account data. First thing is
that the website tells me "Sorry you need Internet Explorer 4.O or greater".
I think I have done everything to set it to be IE 6.O (Also 5.5). What am
I doing wrong?
Thank you,
Joe.
#!/usr/bin/perl # americanfunds - gets account info from american funds 401k website # use strict; use warnings; use WWW::Mechanize; use HTML::TreeBuilder; use HTML::TableExtract; use Data::Dumper; $Data::Dumper::Terse = 1; my $User_agent_id = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)';
my $m = WWW::Mechanize->new( autocheck => 1); $m->agent_alias( 'Windows IE 6' ); #$m->agent($User_agent_id);
main('12345678', '123456');
sub main
{
my ($id, $pass) = @_; $m->get('http://www.americanfunds.com/retire'),
or die "can't get initial americanfunds.com/retire screen";my $str = $m->content; print "1. $str\n";
$m->follow_link(n => 1 ) or die "can't get login screen";
$str = $m->content; print "2. $str\n";
exit; }
