check on login failure
This commit is contained in:
parent
5286e8eb70
commit
82a617c907
2 changed files with 7 additions and 3 deletions
|
|
@ -19,7 +19,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser
|
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
||||||
|
|
||||||
from .pages.login import LoginPage
|
from .pages.login import LoginPage
|
||||||
from .pages.accounts_list import AccountsList, AccountHistoryPage
|
from .pages.accounts_list import AccountsList, AccountHistoryPage
|
||||||
|
|
@ -72,9 +72,13 @@ class Fortuneo(BaseBrowser):
|
||||||
assert isinstance(self.password, basestring)
|
assert isinstance(self.password, basestring)
|
||||||
|
|
||||||
if not self.is_on_page(LoginPage):
|
if not self.is_on_page(LoginPage):
|
||||||
self.location('https://' + self.DOMAIN_LOGIN + '/fr/identification.jsp')
|
self.location('https://' + self.DOMAIN_LOGIN + '/fr/identification.jsp', no_login=True)
|
||||||
|
|
||||||
self.page.login(self.username, self.password)
|
self.page.login(self.username, self.password)
|
||||||
|
|
||||||
|
if self.is_on_page(LoginPage):
|
||||||
|
raise BrowserIncorrectPassword()
|
||||||
|
|
||||||
self.location('https://' + self.DOMAIN_LOGIN + '/fr/prive/mes-comptes/synthese-mes-comptes.jsp')
|
self.location('https://' + self.DOMAIN_LOGIN + '/fr/prive/mes-comptes/synthese-mes-comptes.jsp')
|
||||||
|
|
||||||
def get_history(self, account):
|
def get_history(self, account):
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class LoginPage(BasePage):
|
||||||
self.browser.select_form(nr=3)
|
self.browser.select_form(nr=3)
|
||||||
self.browser['login'] = login
|
self.browser['login'] = login
|
||||||
self.browser['passwd'] = passwd
|
self.browser['passwd'] = passwd
|
||||||
self.browser.submit()
|
self.browser.submit(nologin=True)
|
||||||
|
|
||||||
|
|
||||||
# vim:ts=4:sw=4
|
# vim:ts=4:sw=4
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue