Commit c187a15e authored by Axel Pelerin's avatar Axel Pelerin Committed by Vincent A

[banquepopulaire] Add one more location to find token

While navigating, we fetch a token on differents places to access the
website, but in some case we are unable to find it at given location, so
I add one more url that works for almost all the cases.
parent 29a92236
......@@ -496,7 +496,7 @@ class HomePage(LoggedPage, MyHTMLPage):
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 @@ class HomePage(LoggedPage, MyHTMLPage):
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'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment