paypal: Try to convert from utf-8, fall back on latin-1
This commit is contained in:
parent
126b5be301
commit
49c37a5600
2 changed files with 9 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ import datetime
|
|||
|
||||
from weboob.tools.browser import BasePage, BrokenPageError
|
||||
from weboob.tools.parsers.csvparser import CsvParser
|
||||
from weboob.tools.misc import to_unicode
|
||||
from weboob.capabilities.bank import Account, Transaction
|
||||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||
|
||||
|
|
@ -201,5 +202,12 @@ class HistoryParser(CsvParser):
|
|||
HEADER = True
|
||||
FMTPARAMS = {'skipinitialspace': True}
|
||||
|
||||
def decode_row(self, row, encoding):
|
||||
"""
|
||||
PayPal returns different encodings (latin-1 and utf-8 are know ones)
|
||||
"""
|
||||
return [to_unicode(cell) for cell in row]
|
||||
|
||||
|
||||
class UselessPage(BasePage):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue