Remove multiple whitespaces

This commit is contained in:
Florent 2012-12-10 18:12:16 +01:00 committed by Romain Bignon
commit 2bb7255a2b

View file

@ -49,6 +49,7 @@ class AccountHistory(BasePage):
for tr in table.xpath('tr'):
textdate = tr.find('td[@class="op_date"]').text_content()
textraw = tr.find('td[@class="op_label"]').text_content().strip()
textraw = re.sub(' +', ' ', textraw)
# The id will be rewrite
op = Transaction(1)
amount = op.clean_amount(tr.find('td[@class="op_amount"]').text_content())