Skip Menu |

This queue is for tickets about the Finance-Bank-LaPoste CPAN distribution.

Report information
The Basics
Id: 40635
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Finance-Bank-LaPoste

People
Owner: Nobody in particular
Requestors: bduparchy [...] yahoo.fr
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 4.00
Fixed in: (no value)



Subject: Authentification as changed again
Hello I'm using your perl module since several years and it works fine ! thanks. But since today, I raise an exception : bad response from first url The website of labanquepostale has changed today. It seems to be the reason. Regards
can you try if this patch works for you too?
Index: Finance/Bank/LaPoste.pm =================================================================== --- Finance/Bank/LaPoste.pm (revision 411) +++ Finance/Bank/LaPoste.pm (working copy) @@ -113,7 +113,7 @@ =cut -my $first_url = 'https://www.particuliers.labanquepostale.fr/index/comptes/clavier_statique.html'; +my $first_url = 'https://www.labanquepostale.fr/index/particuliers/banque_en_ligne/clavier_statique.html'; my $base_url = 'https://voscomptesenligne.labanquepostale.fr/voscomptes/canalXHTML'; sub _login { @@ -143,7 +143,7 @@ my $response = $self->{ua}->request(HTTP::Request->new(GET => "$base_url/releve/syntheseAssurancesEtComptes.ea")); $response->is_success or die "can't access account\n" . $response->error_as_HTML; - if ($response->content =~ /frame src="liste_comptes.jsp"/) { + if ($response->content =~ /frame src=".*liste_comptes.jsp"/) { $response = $self->{ua}->request(HTTP::Request->new(GET => "$base_url/releve/liste_comptes.jsp")); $response->is_success or die "can't access account\n" . $response->error_as_HTML; } @@ -257,7 +257,7 @@ $self->{balance} ||= do { my ($balance) = $html =~ /Solde\s+au.*?:\s+(.*?)\s+euros/s; - $balance =~ s/<.*>\s*//; # (since 24/06/2004) remove: </span><span class="soldeur"> + $balance =~ s/<.*?>\s*//g; # (since 24/06/2004) remove: </span><span class="soldeur"> or <strong>...</strong> $normalize_number->($balance); }; my $l = $parse_table->($html); @@ -265,9 +265,8 @@ # drop first line which contain columns title shift @$l } else { - # (since 24/06/2004), we need to drop some lines and some fields @$l = map { - my (undef, $date, $description, undef, $amount) = @$_; + my ($date, $description, $amount) = @$_; $date && $date =~ m!(\d+)/(\d+)! ? [ $date, $description, $amount ] : (); } @$l; }
From: bduparchy [...] yahoo.fr
Hi Thanks for your patch and for your efficiency. I've used your patch and it has fixed the bug, great! :) I've applied it in the directory of the librairy: sudo patch -p0 <p.patch and my application is working fine now. Although your module produce the right result, I get an error message : Use of uninitialized value in string eq at /usr/share/perl/5.8/Finance/Bank/LaPoste.pm line 263. But this error doesn't seem to break anything. Thank you again Best regards Bertrand
Show quoted text
> I've used your patch and it has fixed the bug, great! :)
ok, i just release Finance-Bank-LaPoste 5.00 with the patch applied Show quoted text
> Use of uninitialized value in string eq at > /usr/share/perl/5.8/Finance/Bank/LaPoste.pm line 263.
i've also modified the code to get rid of this warning