enforce utf-8 index encoding

This commit is contained in:
Nick Sweeting 2017-07-04 05:42:31 -05:00
parent fd1435164b
commit 01687fbe89
2 changed files with 3 additions and 3 deletions

View file

@ -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'

View file

@ -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))