aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-18 21:50:10 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-18 21:50:10 +0600
commit263eff9537c73caa9bff42b1e675043eaa124f9a (patch)
treef71b4592cf0557df33e5040c8b29e13a8247e2c5 /youtube_dl
parentcae21032ab38f404a9959e6b28984b960e579fb5 (diff)
[extractor/generic] Properly extract format id from Content-Type
Fixes extraction for cases like: audio/x-mpegURL; charset=utf-8
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/generic.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 8121f04a5..b75db1252 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -1249,7 +1249,7 @@ class GenericIE(InfoExtractor):
# Check for direct link to a video
content_type = head_response.headers.get('Content-Type', '')
- m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>.+)$', content_type)
+ m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type)
if m:
upload_date = unified_strdate(
head_response.headers.get('Last-Modified'))