pax_global_header 0000666 0000000 0000000 00000000064 14575653726 0014536 g ustar 00root root 0000000 0000000 52 comment=5f3d558793b537a74480241ac6981479f5938cd3
woob-master-5f3d558793b537a74480241ac6981479f5938cd3-modules-becm/ 0000775 0000000 0000000 00000000000 14575653726 0022750 5 ustar 00root root 0000000 0000000 woob-master-5f3d558793b537a74480241ac6981479f5938cd3-modules-becm/modules/ 0000775 0000000 0000000 00000000000 14575653726 0024420 5 ustar 00root root 0000000 0000000 woob-master-5f3d558793b537a74480241ac6981479f5938cd3-modules-becm/modules/becm/ 0000775 0000000 0000000 00000000000 14575653726 0025326 5 ustar 00root root 0000000 0000000 woob-master-5f3d558793b537a74480241ac6981479f5938cd3-modules-becm/modules/becm/__init__.py 0000664 0000000 0000000 00000001474 14575653726 0027445 0 ustar 00root root 0000000 0000000 # Copyright(C) 2010-2011 Julien Veyssier
#
# This file is part of a woob module.
#
# This woob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This woob 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this woob module. If not, see .
# flake8: compatible
from .module import BECMModule
__all__ = ['BECMModule']
woob-master-5f3d558793b537a74480241ac6981479f5938cd3-modules-becm/modules/becm/browser.py 0000664 0000000 0000000 00000006755 14575653726 0027400 0 ustar 00root root 0000000 0000000 # Copyright(C) 2010-2011 Julien Veyssier
#
# This file is part of a woob module.
#
# This woob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This woob 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this woob module. If not, see .
# flake8: compatible
from woob.browser.browsers import need_login
from woob.browser.url import URL
from woob.exceptions import BrowserIncorrectPassword
from woob_modules.creditmutuel.browser import CreditMutuelBrowser
from .pages import AdvisorPage
__all__ = ['BECMBrowser']
class BECMBrowser(CreditMutuelBrowser):
HAS_MULTI_BASEURL = True # Some of the users will use CreditMutuel's BASEURL when others will use becm.fr
login = CreditMutuelBrowser.login.with_urls(r'/fr/authentification.html')
advisor = URL(r'/fr/banques/Details.aspx\?banque=.*', AdvisorPage)
alternative_decoupled_state = CreditMutuelBrowser.decoupled_state.with_urls(
r'/(?P.*)fr/otp/SOSD_OTP_GetTransactionState.htm'
)
alternative_cancel_decoupled = CreditMutuelBrowser.cancel_decoupled.with_urls(
r'/(?P.*)fr/otp/SOSD_OTP_CancelTransaction.htm'
)
def init_login(self):
# We use by default the creditmutuel's BASEURL, with the 'currentSubBank' logic.
# But it's not always the correct one for all users.
# If we hit WRONG_BROWSER_EXCEPTION, we change the BASEURL and some URLs and retry the login.
try:
super().init_login()
except self.WRONG_BROWSER_EXCEPTION:
self.BASEURL = 'https://www.becm.fr'
if self.decoupled_state == self.alternative_decoupled_state:
# to avoid infinite loops
# if the if is True it means that this isn't the first time we get the exception
# there's no point in continuing
raise BrowserIncorrectPassword()
# We keep the (?P.*) and setcurrentSubBank to an empty string
# to minimize changes to the parents module code and avoid UrlNotResolvable errors
self.currentSubBank = ''
# switching the parents urls to this domains (https://www.becm.fr) specific urls
self.decoupled_state = self.alternative_decoupled_state
self.cancel_decoupled = self.alternative_cancel_decoupled
# redo login
super().init_login()
@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)
if advisor:
return iter([advisor])
return iter([])
woob-master-5f3d558793b537a74480241ac6981479f5938cd3-modules-becm/modules/becm/favicon.png 0000664 0000000 0000000 00000003433 14575653726 0027464 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-master-5f3d558793b537a74480241ac6981479f5938cd3-modules-becm/modules/becm/module.py 0000664 0000000 0000000 00000003101 14575653726 0027160 0 ustar 00root root 0000000 0000000 # Copyright(C) 2010-2011 Julien Veyssier
# Copyright(C) 2012-2013 Romain Bignon
#
# This file is part of a woob module.
#
# This woob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This woob 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this woob module. If not, see .
# flake8: compatible
from woob.capabilities.bank import CapBankTransferAddRecipient
from woob.capabilities.contact import CapContact
from woob_modules.creditmutuel.module import CreditMutuelModule
from .browser import BECMBrowser
__all__ = ['BECMModule']
class BECMModule(CreditMutuelModule, CapBankTransferAddRecipient, CapContact):
NAME = 'becm'
MAINTAINER = 'Victor Kannemacher'
EMAIL = 'vkannemacher.budgetinsight@gmail.com'
VERSION = '3.6'
DEPENDENCIES = ('creditmutuel',)
DESCRIPTION = 'Banque Européenne Crédit Mutuel'
LICENSE = 'LGPLv3+'
BROWSER = BECMBrowser
def create_default_browser(self):
browser = self.create_browser(self.config)
browser.new_accounts.urls.insert(0, "/mabanque/fr/banque/comptes-et-contrats.html")
return browser
woob-master-5f3d558793b537a74480241ac6981479f5938cd3-modules-becm/modules/becm/pages.py 0000664 0000000 0000000 00000003173 14575653726 0027003 0 ustar 00root root 0000000 0000000 # Copyright(C) 2010-2012 Julien Veyssier
#
# This file is part of a woob module.
#
# This woob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This woob 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this woob module. If not, see .
# flake8: compatible
from woob.browser.elements import ItemElement, method
from woob.browser.filters.standard import CleanText, Format
from woob.browser.pages import HTMLPage, LoggedPage
from woob.capabilities import NotAvailable
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-master-5f3d558793b537a74480241ac6981479f5938cd3-modules-becm/modules/becm/requirements.txt 0000664 0000000 0000000 00000000014 14575653726 0030605 0 ustar 00root root 0000000 0000000 woob ~= 3.2