From a6197a09f2ad9f0af3ce692ea9f09130aa8554a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 29 Nov 2017 06:43:19 -0500 Subject: [PATCH] Force UTF8 encoding for saved subtitles --- get_subtitle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get_subtitle.py b/get_subtitle.py index f9adef8bb..0dc1014cc 100644 --- a/get_subtitle.py +++ b/get_subtitle.py @@ -17,7 +17,7 @@ def download_subtitle(path, language, hi, providers): try: best_subtitle = best_subtitles[video][0] - result = save_subtitles(video, [best_subtitle]) + result = save_subtitles(video, [best_subtitle], encoding='utf-8') downloaded_provider = str(result[0]).strip('<>').split(' ')[0][:-8] downloaded_language = pycountry.languages.lookup(str(str(result[0]).strip('<>').split(' ')[2].strip('[]'))).name message = downloaded_language + " subtitles downloaded from " + downloaded_provider + "."