Navigation Menu

Skip to content

Commit

Permalink
Translate   to ordinary space before parsing account screen; sli…
Browse files Browse the repository at this point in the history
…ghtly more robust
  • Loading branch information
Steven N. Severinghaus committed Apr 2, 2009
1 parent 199eeeb commit c45d958
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Finance/Bank/US/INGDirect.pm
Expand Up @@ -79,13 +79,13 @@ sub accounts {
use HTML::Strip;
my $hs = HTML::Strip->new;
my @lines = grep /command=goToAccount/, split(/[\n\r]/, $self->{_account_screen});
@lines = split(/\n/, $hs->parse(join "\n", @lines));
@lines = map { tr/\xa0/ /; $_ } split(/\n/, $hs->parse(join "\n", @lines));
my %accounts;
for (@lines) {
my @data = splice(@lines, 0, 3);
my %account;
($account{type} = $data[0]) =~ s/^\s*(.*) \xa0\xa0/$1/;
($account{type} = $data[0]) =~ s/^\s*(.*?)\s*$/$1/;
($account{nickname}, $account{number}, $account{balance}) = split /\s/, $data[1];
($account{available} = $data[2]) =~ s/^\s*(.*?)\s*$/$1/;
$accounts{$account{number}} = \%account;
Expand Down

0 comments on commit c45d958

Please sign in to comment.