Commit 2c4862ee authored by Vincent Ardisson's avatar Vincent Ardisson Committed by Romain Bignon

[bforbank] import spirica browser with AbstractBrowser instead of symlinks

parent c93255ef
......@@ -26,7 +26,7 @@ from .pages import (
LoginPage, ErrorPage, AccountsPage, HistoryPage, LoanHistoryPage, RibPage,
LifeInsuranceIframe, LifeInsuranceRedir
)
from .spirica.browser import SpiricaBrowser
from .spirica_browser import SpiricaBrowser
class BforbankBrowser(LoginBrowser):
......@@ -42,12 +42,12 @@ class BforbankBrowser(LoginBrowser):
lifeinsurance_iframe = URL(r'/client/accounts/lifeInsurance/consultationDetailSpirica.action', LifeInsuranceIframe)
lifeinsurance_redir = URL(r'https://assurance-vie.bforbank.com:443/sylvea/welcomeSSO.xhtml', LifeInsuranceRedir)
def __init__(self, birthdate, *args, **kwargs):
def __init__(self, weboob, birthdate, *args, **kwargs):
super(BforbankBrowser, self).__init__(*args, **kwargs)
self.birthdate = birthdate
self.accounts = None
self.spirica = SpiricaBrowser('https://assurance-vie.bforbank.com:443/', None, None)
self.spirica = SpiricaBrowser(weboob, 'https://assurance-vie.bforbank.com:443/', None, None)
def do_login(self):
assert isinstance(self.username, basestring)
......
......@@ -43,7 +43,8 @@ class BforbankModule(Module, CapBank):
BROWSER = BforbankBrowser
def create_default_browser(self):
return self.create_browser(self.config['birthdate'].get(),
return self.create_browser(self.weboob,
self.config['birthdate'].get(),
self.config['login'].get(),
self.config['password'].get())
......
../../spirica/browser.py
\ No newline at end of file
../../spirica/pages.py
\ No newline at end of file
# -*- coding: utf-8 -*-
# Copyright(C) 2011 Edouard Lambert
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# weboob is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.browser.browsers import AbstractBrowser
class SpiricaBrowser(AbstractBrowser):
PARENT = 'spirica'
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