From 1ca12ca92c32c3db79b9d9426b6b9d23aa0eb57f Mon Sep 17 00:00:00 2001 From: Sylvie Ye Date: Tue, 31 Jul 2018 18:18:27 +0200 Subject: [PATCH] [boursorama] get valid pro card account --- modules/boursorama/browser.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/boursorama/browser.py b/modules/boursorama/browser.py index c7d947c495..9c30586171 100644 --- a/modules/boursorama/browser.py +++ b/modules/boursorama/browser.py @@ -72,6 +72,7 @@ class BoursoramaBrowser(RetryLoginBrowser, StatesMixin): pro_accounts = URL(r'/dashboard/comptes-professionnels\?_hinclude=1', AccountsPage) acc_tit = URL('/comptes/titulaire/(?P.*)\?_hinclude=1', AccbisPage) acc_rep = URL('/comptes/representative/(?P.*)\?_hinclude=1', AccbisPage) + acc_pro = URL('/comptes/professionnel/(?P.*)\?_hinclude=1', AccbisPage) history = URL('/compte/(cav|epargne)/(?P.*)/mouvements.*', HistoryPage) card_transactions = URL('/compte/cav/(?P.*)/carte/.*', HistoryPage) deffered_card_history = URL('https://api.boursorama.com/services/api/files/download.phtml.*', CardHistoryPage) @@ -196,11 +197,15 @@ def get_accounts_list(self): valid_card_url = [] for account in self.accounts_list: if account.type == Account.TYPE_CHECKING: - # the acc_tit contains the non-valid card accounts + # get all tit card account (page can also contains non-valid card) self.acc_tit.go(webid=account._webid) - # search for all valid card valid_card_url.extend([card.url for card in self.page.iter_valid_cards_url()]) - # there is 1 page for all accounts + + # get all pro card account + self.acc_pro.go(webid=account._webid) + valid_card_url.extend([card.url for card in self.page.iter_valid_cards_url()]) + + # there is 1 page for all accounts (one for tit and one for pro) break for account in list(self.accounts_list): -- GitLab