From 913b61eeee9436a3ddf5675ec935d00c3a05b7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Sat, 9 Dec 2017 20:02:19 +0700 Subject: [PATCH] [udemy] Extract more HLS formats --- youtube_dl/extractor/udemy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py index b66033923..195f5ce78 100644 --- a/youtube_dl/extractor/udemy.py +++ b/youtube_dl/extractor/udemy.py @@ -257,6 +257,11 @@ class UdemyIE(InfoExtractor): video_url = source.get('file') or source.get('src') if not video_url or not isinstance(video_url, compat_str): continue + if source.get('type') == 'application/x-mpegURL' or determine_ext(video_url) == 'm3u8': + formats.extend(self._extract_m3u8_formats( + video_url, video_id, 'mp4', entry_protocol='m3u8_native', + m3u8_id='hls', fatal=False)) + continue format_id = source.get('label') f = { 'url': video_url,