0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-04 23:35:04 +00:00

[udemy] Extract more HLS formats

This commit is contained in:
Sergey M․ 2017-12-09 20:02:19 +07:00
parent 6f1ec339a0
commit 913b61eeee
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -257,6 +257,11 @@ def extract_formats(source_list):
video_url = source.get('file') or source.get('src') video_url = source.get('file') or source.get('src')
if not video_url or not isinstance(video_url, compat_str): if not video_url or not isinstance(video_url, compat_str):
continue 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') format_id = source.get('label')
f = { f = {
'url': video_url, 'url': video_url,