From 01687fbe89d685be96a9471d18780b55f54aea3a Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 4 Jul 2017 05:42:31 -0500 Subject: [PATCH] enforce utf-8 index encoding --- config.py | 4 ++-- index.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.py b/config.py index d3880e0f..98abf0d5 100644 --- a/config.py +++ b/config.py @@ -9,8 +9,8 @@ from subprocess import run, PIPE FETCH_WGET = os.getenv('FETCH_WGET', 'True' ).lower() == 'true' FETCH_WGET_REQUISITES = os.getenv('FETCH_WGET_REQUISITES', 'True' ).lower() == 'true' -FETCH_AUDIO = os.getenv('FETCH_AUDIO', 'True' ).lower() == 'true' -FETCH_VIDEO = os.getenv('FETCH_VIDEO', 'True' ).lower() == 'true' +FETCH_AUDIO = os.getenv('FETCH_AUDIO', 'False' ).lower() == 'true' +FETCH_VIDEO = os.getenv('FETCH_VIDEO', 'False' ).lower() == 'true' FETCH_PDF = os.getenv('FETCH_PDF', 'True' ).lower() == 'true' FETCH_SCREENSHOT = os.getenv('FETCH_SCREENSHOT', 'True' ).lower() == 'true' FETCH_FAVICON = os.getenv('FETCH_FAVICON', 'True' ).lower() == 'true' diff --git a/index.py b/index.py index 3a87162d..19af455e 100644 --- a/index.py +++ b/index.py @@ -21,5 +21,5 @@ def dump_index(links, service): template_vars = (datetime.now().strftime('%Y-%m-%d %H:%M'), article_rows) - with open(os.path.join(service, 'index.html'), 'w') as f: + with open(os.path.join(service, 'index.html'), 'w', encoding='utf-8') as f: f.write(index_html.format(*template_vars))