X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=youtube_dl%2Fextractor%2Fonionstudios.py;h=6fb1a3fcc0bd565677b232adcb883b3649715dde;hb=dabe15701b3c12ef7e6af1f3333e1d3e39149592;hp=9fd5b212314405faa40e4cb18dd9e259b45fcbab;hpb=6c26815d638c55c106fb73a3d0ce6d87fd94bd4c;p=youtube-dl diff --git a/youtube_dl/extractor/onionstudios.py b/youtube_dl/extractor/onionstudios.py index 9fd5b2123..6fb1a3fcc 100644 --- a/youtube_dl/extractor/onionstudios.py +++ b/youtube_dl/extractor/onionstudios.py @@ -8,6 +8,7 @@ from ..utils import ( determine_ext, int_or_none, float_or_none, + mimetype2ext, ) @@ -50,9 +51,8 @@ class OnionStudiosIE(InfoExtractor): source_url = source.get('url') if not source_url: continue - content_type = source.get('content_type') - ext = determine_ext(source_url) - if content_type == 'application/x-mpegURL' or ext == 'm3u8': + ext = mimetype2ext(source.get('content_type')) or determine_ext(source_url) + if ext == 'm3u8': formats.extend(self._extract_m3u8_formats( source_url, video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False)) else: