From 20bbfffc57c007d7820ffbafd69cbec2e68a6e9a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Michel=20Nirgal=20Vourg=C3=A8re?= Date: Mon, 29 Jan 2018 18:09:12 +0100 Subject: [PATCH] Fixed csv charset --- go.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.py b/go.py index 7efcdcd..3ee442e 100755 --- a/go.py +++ b/go.py @@ -131,8 +131,8 @@ def download(): httpresponse = httpopen(BASE_URL + '/templates/account/accountActivityListDownload.cfm?AccNum='+cptnum+'&viewMode=CSV&orderBy=TRANSACTION_DATE_DESCENDING&page=1&startDate='+startdate+'&endDate='+enddate+'&startAmount=0&endAmount=999999999999&initialPaginationLoad=true&screenSize=big&showBalance=true') # httpresponse = httpopen(BASE_URL + '/templates/account/accountActivityListDownload.cfm?AccNum='+cptnum+'&viewMode=CSV&orderBy=TRANSACTION_DATE_DESCENDING&page=1&startDate='+startdate+'&endDate='+enddate+'&startAmount=0&endAmount=999999999999&initialPaginationLoad=true&screenSize=big&showBalance=true&hiddenFormId=00000000-0000-0000-0000-000000000000') # hiddenFormId is javascript created random UUID - # logging.debug(httpresponse.info()) - csvdata = httpresponse.read().decode('utf-8') + #logging.debug(httpresponse.info()) # Reports Content-Type: application/csv;charset=windows-1252 + csvdata = httpresponse.read().decode('windows-1252') if len(csvdata) == 0: logging.info('No mouvement for %s', title) continue -- 2.30.2