From ac8e035d29ba63177bf3e032e4bbc4ffe2cde6df Mon Sep 17 00:00:00 2001 From: ffourcot Date: Thu, 8 Sep 2011 17:31:09 +0200 Subject: [PATCH] Split the ex-label in category and label Signed-off-by: Romain Bignon --- weboob/backends/bnporc/pages/account_history.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weboob/backends/bnporc/pages/account_history.py b/weboob/backends/bnporc/pages/account_history.py index 6570fa35..904be673 100644 --- a/weboob/backends/bnporc/pages/account_history.py +++ b/weboob/backends/bnporc/pages/account_history.py @@ -46,6 +46,9 @@ class AccountHistory(BasePage): if tds[1].tail: label += tds[1].tail label = label.strip() amount = tds[2].text.replace('.', '').replace(',', '.') + (category, useless, label) = label.partition(' ') + category = category.strip() + label = label.strip() # if we don't have exactly one '.', this is not a floatm try the next operation = Operation(len(self.operations)) if amount.count('.') != 1: @@ -56,6 +59,7 @@ class AccountHistory(BasePage): operation.date = d operation.label = label + operation.category = category self.operations.append(operation) def get_operations(self):