cragr: do not fallback on mobile website when homepage isn't the accounts list
This commit is contained in:
parent
ca1417d5c7
commit
1282a32cb1
1 changed files with 8 additions and 0 deletions
|
|
@ -115,6 +115,14 @@ class Cragr(BaseBrowser):
|
|||
if self.is_on_page(LoginErrorPage):
|
||||
raise BrowserIncorrectPassword()
|
||||
|
||||
if self.page is None:
|
||||
raise self.WebsiteNotSupported()
|
||||
|
||||
if not self.is_on_page(AccountsPage):
|
||||
# Sometimes the home page is Releves.
|
||||
new_url = re.sub('act=([^&=]+)', 'act=Synthcomptes', self.page.url, 1)
|
||||
self.location(new_url)
|
||||
|
||||
if not self.is_on_page(AccountsPage):
|
||||
raise self.WebsiteNotSupported()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue