1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-01-30 22:59:48 +00:00

Handle multiple Content-Type headers

This commit is contained in:
Michaël Arnauts 2019-04-14 12:02:57 +02:00
parent 180a9dff1f
commit 0bde0bc671

View File

@ -2272,7 +2272,7 @@ class GenericIE(InfoExtractor):
# Check for direct link to a video # Check for direct link to a video
content_type = head_response.headers.get('Content-Type', '').lower() content_type = head_response.headers.get('Content-Type', '').lower()
m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type) m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s,]+)', content_type)
if m: if m:
format_id = compat_str(m.group('format_id')) format_id = compat_str(m.group('format_id'))
if format_id.endswith('mpegurl'): if format_id.endswith('mpegurl'):