fixes in CMB, update AUTHORS
This commit is contained in:
parent
2dbf63354f
commit
ef16a5b726
2 changed files with 16 additions and 15 deletions
6
AUTHORS
6
AUTHORS
|
|
@ -33,6 +33,9 @@ Noe Rubinstein <noe.rubinstein@gmail.com>
|
||||||
* Bototo, Eatmanga, MangaFox, MangaHere, MangaReader, Mangatoshokan
|
* Bototo, Eatmanga, MangaFox, MangaHere, MangaReader, Mangatoshokan
|
||||||
and Simplyreadit backends maintainer.
|
and Simplyreadit backends maintainer.
|
||||||
|
|
||||||
|
Johann Broudin <johann.broudin@6-8.fr>
|
||||||
|
* CMB, FranceInter and LeMouv backends maintainer.
|
||||||
|
|
||||||
Pierre Mazière <pierre.maziere@gmail.com>
|
Pierre Mazière <pierre.maziere@gmail.com>
|
||||||
* LCL backend maintainer;
|
* LCL backend maintainer;
|
||||||
* BNPorc fixes.
|
* BNPorc fixes.
|
||||||
|
|
@ -40,9 +43,6 @@ Pierre Mazière <pierre.maziere@gmail.com>
|
||||||
Xavier Guerrin <xavier@tuxfamily.org>
|
Xavier Guerrin <xavier@tuxfamily.org>
|
||||||
* CrAgr backend maintainer.
|
* CrAgr backend maintainer.
|
||||||
|
|
||||||
Johann Broudin <johann.broudin@6-8.fr>
|
|
||||||
* FranceInter and LeMouv backends maintainer.
|
|
||||||
|
|
||||||
Roger Philibert <roger.philibert@gmail.com>
|
Roger Philibert <roger.philibert@gmail.com>
|
||||||
* Ehentai, Izneo and Youjizz backends maintainer.
|
* Ehentai, Izneo and Youjizz backends maintainer.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2011 Johann Broudin
|
# Copyright(C) 2012 Johann Broudin
|
||||||
#
|
#
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
|
|
@ -43,13 +43,13 @@ class CmbBackend(BaseBackend, ICapBank):
|
||||||
NAME = 'cmb'
|
NAME = 'cmb'
|
||||||
MAINTAINER = 'Johann Broudin'
|
MAINTAINER = 'Johann Broudin'
|
||||||
EMAIL = 'Johann.Broudin@6-8.fr'
|
EMAIL = 'Johann.Broudin@6-8.fr'
|
||||||
VERSION = '0.2'
|
VERSION = '0.a'
|
||||||
LICENSE = 'AGPLv3+'
|
LICENSE = 'AGPLv3+'
|
||||||
DESCRIPTION = 'Credit Mutuel de Bretagne'
|
DESCRIPTION = 'Credit Mutuel de Bretagne'
|
||||||
CONFIG = BackendConfig(
|
CONFIG = BackendConfig(
|
||||||
ValueBackendPassword('login', label='Account ID', masked=False),
|
ValueBackendPassword('login', label='Account ID', masked=False),
|
||||||
ValueBackendPassword('password', label='Password', masked=True))
|
ValueBackendPassword('password', label='Password', masked=True))
|
||||||
connected = False
|
cookie = None
|
||||||
headers = {
|
headers = {
|
||||||
'User-Agent':
|
'User-Agent':
|
||||||
'Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OSX; en-us) ' +
|
'Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OSX; en-us) ' +
|
||||||
|
|
@ -74,15 +74,13 @@ class CmbBackend(BaseBackend, ICapBank):
|
||||||
if response.status == 302:
|
if response.status == 302:
|
||||||
self.cookie = response.getheader('Set-Cookie').split(';')[0]
|
self.cookie = response.getheader('Set-Cookie').split(';')[0]
|
||||||
self.cookie += ';'
|
self.cookie += ';'
|
||||||
self.connected = True
|
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
raise BrowserIncorrectPassword()
|
raise BrowserIncorrectPassword()
|
||||||
return false
|
return false
|
||||||
|
|
||||||
def iter_accounts(self):
|
def iter_accounts(self):
|
||||||
|
if not self.cookie:
|
||||||
if not self.connected:
|
|
||||||
self.login()
|
self.login()
|
||||||
|
|
||||||
def do_http():
|
def do_http():
|
||||||
|
|
@ -95,7 +93,7 @@ class CmbBackend(BaseBackend, ICapBank):
|
||||||
headers)
|
headers)
|
||||||
response = conn.getresponse()
|
response = conn.getresponse()
|
||||||
data = response.read()
|
data = response.read()
|
||||||
conn.close
|
conn.close()
|
||||||
return data
|
return data
|
||||||
|
|
||||||
data = do_http()
|
data = do_http()
|
||||||
|
|
@ -155,6 +153,9 @@ class CmbBackend(BaseBackend, ICapBank):
|
||||||
raise AccountNotFound()
|
raise AccountNotFound()
|
||||||
|
|
||||||
def iter_history(self, account):
|
def iter_history(self, account):
|
||||||
|
if not self.cookie:
|
||||||
|
self.login()
|
||||||
|
|
||||||
page = "/domiweb/prive/particulier/releve/"
|
page = "/domiweb/prive/particulier/releve/"
|
||||||
if account.cmbtype == 'D':
|
if account.cmbtype == 'D':
|
||||||
page += "10-releve.act"
|
page += "10-releve.act"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue