aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/onionstudios.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-07-06 09:11:46 +0100
committerRemita Amine <remitamine@gmail.com>2016-07-06 09:11:46 +0100
commitab49d7a9fae08763de549f85ba138b22f9122a99 (patch)
treed4a2c796088234b9553db074ccbd5ae1752a540c /youtube_dl/extractor/onionstudios.py
parentb4173f1551c47f64745cb91451c46891e2aaac16 (diff)
downloadyoutube-dl-ab49d7a9fae08763de549f85ba138b22f9122a99.zip
youtube-dl-ab49d7a9fae08763de549f85ba138b22f9122a99.tar.gz
youtube-dl-ab49d7a9fae08763de549f85ba138b22f9122a99.tar.bz2
use mimetype2ext to determine manifest ext in multiple extractors
Diffstat (limited to 'youtube_dl/extractor/onionstudios.py')
-rw-r--r--youtube_dl/extractor/onionstudios.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/onionstudios.py b/youtube_dl/extractor/onionstudios.py
index 9fd5b21..6fb1a3f 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: