mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-10-31 22:44:32 +01:00
[toggle] Extract DASH and ISM formats (closes #15721)
This commit is contained in:
parent
0c3e5f4921
commit
949faa15e8
@ -132,7 +132,7 @@ class ToggleIE(InfoExtractor):
|
|||||||
formats = []
|
formats = []
|
||||||
for video_file in info.get('Files', []):
|
for video_file in info.get('Files', []):
|
||||||
video_url, vid_format = video_file.get('URL'), video_file.get('Format')
|
video_url, vid_format = video_file.get('URL'), video_file.get('Format')
|
||||||
if not video_url or not vid_format:
|
if not video_url or video_url == 'NA' or not vid_format:
|
||||||
continue
|
continue
|
||||||
ext = determine_ext(video_url)
|
ext = determine_ext(video_url)
|
||||||
vid_format = vid_format.replace(' ', '')
|
vid_format = vid_format.replace(' ', '')
|
||||||
@ -143,6 +143,18 @@ class ToggleIE(InfoExtractor):
|
|||||||
note='Downloading %s m3u8 information' % vid_format,
|
note='Downloading %s m3u8 information' % vid_format,
|
||||||
errnote='Failed to download %s m3u8 information' % vid_format,
|
errnote='Failed to download %s m3u8 information' % vid_format,
|
||||||
fatal=False))
|
fatal=False))
|
||||||
|
elif ext == 'mpd':
|
||||||
|
formats.extend(self._extract_mpd_formats(
|
||||||
|
video_url, video_id, mpd_id=vid_format,
|
||||||
|
note='Downloading %s MPD manifest' % vid_format,
|
||||||
|
errnote='Failed to download %s MPD manifest' % vid_format,
|
||||||
|
fatal=False))
|
||||||
|
elif ext == 'ism':
|
||||||
|
formats.extend(self._extract_ism_formats(
|
||||||
|
video_url, video_id, ism_id=vid_format,
|
||||||
|
note='Downloading %s ISM manifest' % vid_format,
|
||||||
|
errnote='Failed to download %s ISM manifest' % vid_format,
|
||||||
|
fatal=False))
|
||||||
elif ext in ('mp4', 'wvm'):
|
elif ext in ('mp4', 'wvm'):
|
||||||
# wvm are drm-protected files
|
# wvm are drm-protected files
|
||||||
formats.append({
|
formats.append({
|
||||||
|
Loading…
Reference in New Issue
Block a user