detect other cases of auth failures
This commit is contained in:
parent
5699a18cf0
commit
a4355cdff6
1 changed files with 4 additions and 1 deletions
|
|
@ -37,6 +37,7 @@ class SocieteGenerale(BaseBrowser):
|
||||||
PAGES = {
|
PAGES = {
|
||||||
'https://particuliers.societegenerale.fr/.*': LoginPage,
|
'https://particuliers.societegenerale.fr/.*': LoginPage,
|
||||||
'https://.*.societegenerale.fr//acces/authlgn.html': BadLoginPage,
|
'https://.*.societegenerale.fr//acces/authlgn.html': BadLoginPage,
|
||||||
|
'https://.*.societegenerale.fr/error403.html': BadLoginPage,
|
||||||
'.*restitution/cns_listeprestation.html': AccountsList,
|
'.*restitution/cns_listeprestation.html': AccountsList,
|
||||||
'.*restitution/cns_detail.*\.html.*': AccountHistory,
|
'.*restitution/cns_detail.*\.html.*': AccountHistory,
|
||||||
}
|
}
|
||||||
|
|
@ -73,7 +74,9 @@ class SocieteGenerale(BaseBrowser):
|
||||||
|
|
||||||
if self.is_on_page(BadLoginPage):
|
if self.is_on_page(BadLoginPage):
|
||||||
error = self.page.get_error()
|
error = self.page.get_error()
|
||||||
if error.startswith('Votre session a'):
|
if error is None:
|
||||||
|
raise BrowserIncorrectPassword()
|
||||||
|
elif error.startswith('Votre session a'):
|
||||||
raise BrowserUnavailable('Session has expired')
|
raise BrowserUnavailable('Session has expired')
|
||||||
else:
|
else:
|
||||||
raise BrowserIncorrectPassword(error)
|
raise BrowserIncorrectPassword(error)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue