fix authentication on banquepopulaire
This commit is contained in:
parent
4784cb59c5
commit
a84979a927
2 changed files with 13 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ class BanquePopulaire(BaseBrowser):
|
|||
'https://[^/]+/cyber/internet/Sort.do\?.*': TransactionsPage,
|
||||
'https://[^/]+/s3f-web/indispo.*': UnavailablePage,
|
||||
'https://[^/]+/portailinternet/_layouts/Ibp.Cyi.Layouts/RedirectSegment.aspx.*': RedirectPage,
|
||||
'https://[^/]+/portailinternet/Catalogue/Segments/.*.aspx\?vary=(?P<vary>.*)': HomePage,
|
||||
'https://[^/]+/portailinternet/Catalogue/Segments/.*.aspx(\?vary=(?P<vary>.*))?': HomePage,
|
||||
'https://[^/]+/portailinternet/Pages/.*.aspx\?vary=(?P<vary>.*)': HomePage,
|
||||
'https://[^/]+/portailinternet/Pages/default.aspx': HomePage,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,18 @@ class IndexPage(BasePage):
|
|||
|
||||
class HomePage(BasePage):
|
||||
def get_token(self):
|
||||
vary = self.group_dict['vary']
|
||||
vary = None
|
||||
if self.group_dict.get('vary', None) is not None:
|
||||
vary = self.group_dict['vary']
|
||||
else:
|
||||
for script in self.document.xpath('//script'):
|
||||
if script.text is None:
|
||||
continue
|
||||
|
||||
m = re.search("'vary', '([\d-]+)'\)", script.text)
|
||||
if m:
|
||||
vary = m.group(1)
|
||||
break
|
||||
|
||||
#r = self.browser.openurl(self.browser.request_class(self.browser.buildurl(self.browser.absurl("/portailinternet/_layouts/Ibp.Cyi.Application/GetuserInfo.ashx"), action='UInfo', vary=vary), None, {'Referer': self.url}))
|
||||
#print r.read()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue