pax_global_header 0000666 0000000 0000000 00000000064 13436457030 0014517 g ustar 00root root 0000000 0000000 52 comment=3863a14eedf17551743a8bbccf0237874d7f4a16
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/ 0000775 0000000 0000000 00000000000 13436457030 0021764 5 ustar 00root root 0000000 0000000 woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/modules/ 0000775 0000000 0000000 00000000000 13436457030 0023434 5 ustar 00root root 0000000 0000000 woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/modules/becm/ 0000775 0000000 0000000 00000000000 13436457030 0024342 5 ustar 00root root 0000000 0000000 woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/modules/becm/__init__.py 0000664 0000000 0000000 00000001510 13436457030 0026450 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Julien Veyssier
#
# This file is part of a weboob module.
#
# This weboob module 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.
#
# This weboob module 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 this weboob module. If not, see .
from .module import BECMModule
__all__ = ['BECMModule']
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/modules/becm/browser.py 0000664 0000000 0000000 00000005677 13436457030 0026416 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Julien Veyssier
#
# This file is part of a weboob module.
#
# This weboob module 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.
#
# This weboob module 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 this weboob module. If not, see .
from __future__ import unicode_literals
from weboob.browser.browsers import AbstractBrowser
from weboob.browser.profiles import Wget
from weboob.browser.url import URL
from weboob.browser.browsers import need_login
from weboob.exceptions import ActionNeeded, AuthMethodNotImplemented
from .pages import AdvisorPage, LoginPage
__all__ = ['BECMBrowser']
class BECMBrowser(AbstractBrowser):
PROFILE = Wget()
TIMEOUT = 30
BASEURL = 'https://www.becm.fr'
PARENT = 'creditmutuel'
login = URL('/fr/authentification.html', LoginPage)
advisor = URL('/fr/banques/Details.aspx\?banque=.*', AdvisorPage)
def do_login(self):
# Clear cookies.
self.do_logout()
self.login.go()
if not self.page.logged:
self.page.login(self.username, self.password)
# Many "Credit Mutuel" customers tried to add their connection to BECM, but the BECM
# website does not return any error when you try to login with correct Crédit Mutuel
# credentials, therefore we must suggest them to try regular Crédit Mutuel if login fails.
if self.login.is_here():
raise ActionNeeded("La connexion au site de BECM n'a pas fonctionné avec les identifiants fournis.\
Si vous êtes client du Crédit Mutuel, veuillez réessayer en sélectionnant le module Crédit Mutuel.")
if self.verify_pass.is_here():
raise AuthMethodNotImplemented("L'identification renforcée avec la carte n'est pas supportée.")
@need_login
def get_advisor(self):
advisor = None
if not self.is_new_website:
self.accounts.stay_or_go(subbank=self.currentSubBank)
if self.page.get_advisor_link():
advisor = self.page.get_advisor()
self.location(self.page.get_advisor_link()).page.update_advisor(advisor)
else:
advisor = self.new_accounts.stay_or_go(subbank=self.currentSubBank).get_advisor()
link = self.page.get_agency()
if link:
self.location(link)
self.page.update_advisor(advisor)
return iter([advisor]) if advisor else iter([])
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/modules/becm/budgea.py 0000664 0000000 0000000 00000000176 13436457030 0026147 0 ustar 00root root 0000000 0000000
urls = ('https://www.becm.fr',)
account_types = ('card', 'checking', 'lifeinsurance', 'loan', 'market', 'pea', 'savings', )
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/modules/becm/favicon.png 0000664 0000000 0000000 00000003433 13436457030 0026500 0 ustar 00root root 0000000 0000000 PNG
IHDR @ @ iq IDATx՛]hU(i1Ec`KZJ 5Qd
RԊ1.*J)`%$*>#OU[(y1XWmAmIMjMdw>L&9prw9{s9!&OgQ P AR+MW)&@ ^@1ZakB7Www 2 .K+(QO(/CBDK`B,d'"`r5ÓaYAX R
Pw 5Py G `}qi$ 0a^mzǀ*_e'(g-/0^[_" $ZJ b
S6Ν{}j,:s),55YTMMIS
=X6&ҕ+cg.Iґ#ҍ7J0/x!V`vWGF
κJYbmɅ,r Kx\*S>ΟWUq@鷆0(ɓR6[,X>/
uw5A{TOOuR)kᅨD}}V ^l+鍎|,a|ҦYA% ,o"!e2łϻLΙ 3rA*j*eRmtڜ?+ǥ_o/BBRS ZXn1s08hn6Ion? L)_ (XfTy緵'.]*K`CAD#ɍAJGqWݺKEA\u/}S8SIg)w mN?
Rqܑ{E(4:}QʍΟ7A]xAN9&&G萎=33V fYF ئOpI Сv9$+7˚'?V/voǎYٝ3gygó8bB.:k)-'sZ&~b%1}AJ
&mpwC"l --vmua~رZ[˿,?ryll._yV[!g8 <
̸yOCIf:9 pbb۠˚e2ݖx`a)>~)9#mV/BCC0=]>~xt@YKRݩu
D3&:=D_j!?jr)'Y(9''Ү]K@A_/v^}uI rke7B>-o%W2I]]P~X2zzN=yC_
Uz]XgsY4T8]3@Aر39~=4/+{4X
Ǡm]d,Jo-,8Ppj0hrIRkV. 5߾uD,LmA.d~=||9,ث,/M쯔dLwgϛ7Þ=av|9?O=liIy.ǮnA[RyYy=a`=Q]]ccq5~\^Qzp?/hZ7$[Z/5 %' IENDB` woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/modules/becm/module.py 0000664 0000000 0000000 00000003555 13436457030 0026211 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Julien Veyssier
# Copyright(C) 2012-2013 Romain Bignon
#
# This file is part of a weboob module.
#
# This weboob module 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.
#
# This weboob module 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 this weboob module. If not, see .
from weboob.capabilities.bank import CapBankTransferAddRecipient
from weboob.capabilities.contact import CapContact
from weboob.tools.backend import AbstractModule, BackendConfig
from weboob.tools.value import ValueBackendPassword
from .browser import BECMBrowser
__all__ = ['BECMModule']
class BECMModule(AbstractModule, CapBankTransferAddRecipient, CapContact):
NAME = 'becm'
MAINTAINER = u'Victor Kannemacher'
EMAIL = 'vkannemacher.budgetinsight@gmail.com'
VERSION = '1.6'
DESCRIPTION = u'Banque Européenne Crédit Mutuel'
LICENSE = 'AGPLv3+'
CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False),
ValueBackendPassword('password', label='Mot de passe'))
BROWSER = BECMBrowser
PARENT = 'creditmutuel'
def create_default_browser(self):
browser = self.create_browser(self.config['login'].get(), self.config['password'].get(), weboob=self.weboob)
browser.new_accounts.urls.insert(0, "/mabanque/fr/banque/comptes-et-contrats.html")
return browser
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/modules/becm/pages.py 0000664 0000000 0000000 00000004470 13436457030 0026020 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2012 Julien Veyssier
#
# This file is part of a weboob module.
#
# This weboob module 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.
#
# This weboob module 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 this weboob module. If not, see .
from weboob.browser.pages import HTMLPage, LoggedPage
from weboob.browser.elements import method, ItemElement
from weboob.browser.filters.standard import CleanText, Format
from weboob.capabilities import NotAvailable
from weboob.exceptions import BrowserIncorrectPassword
class LoginPage(HTMLPage):
REFRESH_MAX = 10.0
def login(self, login, passwd):
form = self.get_form(xpath='//form[contains(@name, "ident")]')
form['_cm_user'] = login
form['_cm_pwd'] = passwd
form.submit()
@property
def logged(self):
return self.doc.xpath('//div[@id="e_identification_ok"]')
def on_load(self):
error_msg_xpath = '//div[has-class("err")]//p[contains(text(), "votre mot de passe est faux")]'
if self.doc.xpath(error_msg_xpath):
raise BrowserIncorrectPassword(CleanText(error_msg_xpath)(self.doc))
class AdvisorPage(LoggedPage, HTMLPage):
@method
class update_advisor(ItemElement):
obj_email = CleanText('//table//*[@itemprop="email"]')
obj_phone = CleanText('//table//*[@itemprop="telephone"]', replace=[(' ', '')])
obj_mobile = NotAvailable
obj_fax = CleanText('//table//*[@itemprop="faxNumber"]', replace=[(' ', '')])
obj_agency = CleanText('//div/*[@itemprop="name"]')
obj_address = Format('%s %s %s', CleanText('//table//*[@itemprop="streetAddress"]'),
CleanText('//table//*[@itemprop="postalCode"]'),
CleanText('//table//*[@itemprop="addressLocality"]'))
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-becm/modules/becm/test.py 0000664 0000000 0000000 00000002050 13436457030 0025670 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Julien Veyssier
#
# This file is part of a weboob module.
#
# This weboob module 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.
#
# This weboob module 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 this weboob module. If not, see .
from weboob.tools.test import BackendTest
class BanqueEuropeenneCreditMutuelTest(BackendTest):
MODULE = 'becm'
def test_becm(self):
l = list(self.backend.iter_accounts())
if len(l) > 0:
a = l[0]
list(self.backend.iter_history(a))