From 693b4ac98b74d2eaf8157f66d50921fdc9902353 Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 29 Dec 2021 22:48:06 +0100 Subject: Add application/vnd.ms-excel as CSV mime type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows sends application/vnd.ms-excel as MIME Type instead of text/csv Signed-off-by: Jesús --- youtube/subscriptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube/subscriptions.py') diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py index 7a2bf7d..aa6101d 100644 --- a/youtube/subscriptions.py +++ b/youtube/subscriptions.py @@ -752,7 +752,7 @@ def import_subscriptions(): except (AssertionError, IndexError, defusedxml.ElementTree.ParseError) as e: return '400 Bad Request: Unable to read opml xml file, or the file is not the expected format', 400 - elif mime_type == 'text/csv': + elif mime_type in ('text/csv', 'application/vnd.ms-excel'): content = file.read().decode('utf-8') reader = csv.reader(content.splitlines()) channels = [] -- cgit v1.2.3