mirror of https://github.com/yt-dlp/yt-dlp.git
[abc:iview] extract from both 'hls' and 'hls-latest'
This ensures backward compatibility by also providing the pre-merged formats
This commit is contained in:
parent
fcc727b755
commit
16ed8814be
|
@ -329,13 +329,18 @@ class ABCIViewIE(InfoExtractor):
|
|||
'hdnea': token,
|
||||
})
|
||||
|
||||
for sd_url in traverse_obj(stream, ('streams', 'hls-latest', ('1080', '720', 'sd', 'sd-low'), {str})):
|
||||
if not sd_url:
|
||||
continue
|
||||
formats = self._extract_m3u8_formats(
|
||||
formats = []
|
||||
# hls: pre-merged formats
|
||||
# hls-latest: same as hls, but sometimes has separate audio tracks
|
||||
# Note: pre-merged formats in hls-latest are treated as video-only if audio-only tracks
|
||||
# are present, so we extract both types
|
||||
for label in ('hls', 'hls-latest'):
|
||||
for sd_url in traverse_obj(stream, ('streams', label, ('1080', '720', 'sd', 'sd-low'), {str})):
|
||||
fmts = self._extract_m3u8_formats(
|
||||
tokenize_url(sd_url, token), video_id, 'mp4',
|
||||
entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)
|
||||
if formats:
|
||||
entry_protocol='m3u8_native', m3u8_id=label, fatal=False)
|
||||
if fmts:
|
||||
formats.extend(fmts)
|
||||
break
|
||||
|
||||
subtitles = {}
|
||||
|
|
Loading…
Reference in New Issue