From 38da7e2565e3084226373a1932e959da4ddb337f Mon Sep 17 00:00:00 2001 From: Gabriel Kerneis Date: Sun, 1 Apr 2012 14:32:28 +0200 Subject: [PATCH] boursorama and bp: convert labels to unicode --- modules/boursorama/pages/accounts_list.py | 3 ++- modules/bp/pages/accountlist.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/boursorama/pages/accounts_list.py b/modules/boursorama/pages/accounts_list.py index b7243615..41088742 100644 --- a/modules/boursorama/pages/accounts_list.py +++ b/modules/boursorama/pages/accounts_list.py @@ -23,6 +23,7 @@ from decimal import Decimal from weboob.capabilities.bank import Account from weboob.tools.browser import BasePage +from weboob.tools.misc import to_unicode class AccountsList(BasePage): @@ -42,7 +43,7 @@ class AccountsList(BasePage): elif td.attrib.get('class', '') == 'account-name': a = td.find('a') - account.label = a.text + account.label = to_unicode(a.text) account._link_id = a.get('href', '') elif td.attrib.get('class', '') == 'account-number': diff --git a/modules/bp/pages/accountlist.py b/modules/bp/pages/accountlist.py index 0cb22e4e..e3028eb0 100644 --- a/modules/bp/pages/accountlist.py +++ b/modules/bp/pages/accountlist.py @@ -22,6 +22,7 @@ from decimal import Decimal from weboob.capabilities.bank import Account, AccountNotFound from weboob.tools.browser import BasePage +from weboob.tools.misc import to_unicode __all__ = ['AccountList'] @@ -48,7 +49,7 @@ class AccountList(BasePage): for line in lines: account = Account() tmp = line.xpath("./td//a")[0] - account.label = tmp.text + account.label = to_unicode(tmp.text) account._link_id = tmp.get("href") tmp = line.xpath("./td/span/strong")