From 955737b2d40c0ce947c13659a27aae0c41077c65 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20M=E2=80=A4?= Date: Fri, 18 Mar 2016 21:50:44 +0600 Subject: [PATCH] [extractor/generic] Force Content-Type to lowecase --- youtube_dl/extractor/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index b75db1252..cce7799e2 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -1248,7 +1248,7 @@ class GenericIE(InfoExtractor): } # Check for direct link to a video - content_type = head_response.headers.get('Content-Type', '') + content_type = head_response.headers.get('Content-Type', '').lower() m = re.match(r'^(?Paudio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P[^;\s]+)', content_type) if m: upload_date = unified_strdate( -- 2.40.0