diff --git a/modules/banquepopulaire/pages.py b/modules/banquepopulaire/pages.py index 2eb1f89ca8fe789b233ec255f92f79bed26ee88d..d151710c3e9364bfe14f30266db58433eeff3f21 100644 --- a/modules/banquepopulaire/pages.py +++ b/modules/banquepopulaire/pages.py @@ -496,7 +496,7 @@ def get_token(self): headers = {'Referer': self.url} # Sometime, the page is a 302 and redirect to a page where there are no information that we need, - # so we try with 2 others url to further fetch token when empty page + # so we try with 3 others url to further fetch token when empty page r = self.browser.open(url, data='taskId=aUniversMesComptes', params={'vary': vary}, headers=headers) if not int(r.headers.get('Content-Length', 0)): @@ -505,6 +505,9 @@ def get_token(self): if not int(r.headers.get('Content-Length', 0)): r = self.browser.open(url, data={'taskId': 'equipementDom'}, params={'vary': vary}, headers=headers) + if not int(r.headers.get('Content-Length', 0)): + r = self.browser.open(url) + doc = r.page.doc date = None for script in doc.xpath('//script'):