From: Jean-Michel Nirgal Vourgère Date: Mon, 29 Jan 2018 17:09:12 +0000 (+0100) Subject: Fixed csv charset X-Git-Url: https://git.nirgal.com/?p=nef.git;a=commitdiff_plain;h=HEAD Fixed csv charset --- 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