[weboob] =?y?q?=5BPATCH=201/1=5D=20Fix=20LCL=20backend=20=28site=20change=20=3F=29?=

Luc Didry luc at didry.org
Tue Oct 11 00:22:50 CEST 2011


Signed-off-by: Luc Didry <luc at didry.org>
---
 weboob/backends/lcl/browser.py |    2 +-
 weboob/backends/lcl/pages.py   |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/weboob/backends/lcl/browser.py b/weboob/backends/lcl/browser.py
index bc34168..ec0065a 100644
--- a/weboob/backends/lcl/browser.py
+++ b/weboob/backends/lcl/browser.py
@@ -37,7 +37,7 @@ class LCLBrowser(BaseBrowser):
         'https://particuliers.secure.lcl.fr/everest/UWBI/UWBIAccueil\?DEST=IDENTIFICATION': LoginResultPage,
         'https://particuliers.secure.lcl.fr/outil/UWSP/Synthese/accesSynthese': AccountsPage,
         'https://particuliers.secure.lcl.fr/outil/UWB2/Accueil\?DEST=INIT': FramePage,
-        'https://particuliers.secure.lcl.fr/outil/UWLM/ListeMouvementsPro/accesListeMouvementsPro.*':  AccountHistoryPage,
+        'https://particuliers.secure.lcl.fr/outil/UWLM/ListeMouvementsPar/accesListeMouvementsPar.*': AccountHistoryPage,
         }
 
     def __init__(self, agency, *args, **kwargs):
diff --git a/weboob/backends/lcl/pages.py b/weboob/backends/lcl/pages.py
index db7eb41..f2cf9b4 100644
--- a/weboob/backends/lcl/pages.py
+++ b/weboob/backends/lcl/pages.py
@@ -55,7 +55,7 @@ class AccountsPage(BasePage):
     def get_list(self):
         l = []
         for div in self.document.getiterator('div'):
-            if div.attrib.get('class')=="unCompte-CC" :
+            if div.attrib.get('class')=="unCompte-CD" or div.attrib.get('class')=="unCompte-CE":
                 account = Account()
                 account.id = div.attrib.get('id').replace('-','')
                 for td in div.getiterator('td'):
@@ -77,7 +77,7 @@ class AccountHistoryPage(BasePage):
             text=td.findtext("b")
             if text is None:
                 continue
-            prefix='Opérations effectuées'
+            prefix='Solde au'
             if text.startswith(prefix.decode('utf-8')):
                 table=td.getparent().getparent()
                 for tr in table.iter('tr'):
@@ -86,10 +86,10 @@ class AccountHistoryPage(BasePage):
                         tds=tr.findall('td')
                         d=date(*reversed([int(x) for x in tds[0].text.split('/')]))
                         label=u''+tds[1].find('a').text.strip()
-                        if tds[3].text.strip() != u"":
-                            amount = - float(tds[3].text.strip().replace('.','').replace(',','.').replace(u"\u00A0",'').replace(' ',''))
+                        if tds[2].text.strip() != u"":
+                            amount = - float(tds[2].text.strip().replace('.','').replace(',','.').replace(u"\u00A0",'').replace(' ',''))
                         else:
-                            amount= float(tds[4].text.strip().replace('.','').replace(',','.').replace(u"\u00A0",'').replace(' ',''))
+                            amount= float(tds[3].text.strip().replace('.','').replace(',','.').replace(u"\u00A0",'').replace(' ',''))
                         operation=Operation(len(self.operations))
                         operation.date=d
                         operation.label=label
-- 
1.7.7.rc1




More information about the weboob mailing list