From 510fc6461f1cfd62cec8ec312692a643c91f767b Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Tue, 26 Mar 2013 16:11:22 +0100 Subject: [PATCH] fix detection of old website --- modules/cragr/web/browser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/cragr/web/browser.py b/modules/cragr/web/browser.py index 6d7085a5..d5582efa 100644 --- a/modules/cragr/web/browser.py +++ b/modules/cragr/web/browser.py @@ -38,7 +38,7 @@ class Cragr(BaseBrowser): 'https?://[^/]+/stb/entreeBam': LoginPage, 'https?://[^/]+/stb/entreeBam\?.*act=Synthcomptes': AccountsPage, 'https?://[^/]+/stb/entreeBam\?.*act=Synthepargnes': SavingsPage, - 'https?://[^/]+/stb/collecteNI\?.*act=Releves.*': TransactionsPage, + 'https?://[^/]+/stb/.*act=Releves.*': TransactionsPage, 'https?://[^/]+/stb/collecteNI\?.*sessionAPP=Releves.*': TransactionsPage, 'https?://[^/]+/stb/.*/erreur/.*': LoginErrorPage, } @@ -110,7 +110,8 @@ class Cragr(BaseBrowser): if self.is_on_page(LoginErrorPage) or not self.is_logged(): raise BrowserIncorrectPassword() - assert self.is_on_page(AccountsPage) + if not self.is_on_page(AccountsPage): + raise self.WebsiteNotSupported() # Store the current url to go back when requesting accounts list. self.accounts_url = self.page.url