mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-21 20:44:02 +00:00
[tvnow] Extract HD formats (closes #21201)
This commit is contained in:
parent
2efefddafd
commit
e75220b11a
@ -47,15 +47,23 @@ class TVNowBaseIE(InfoExtractor):
|
|||||||
r'\.ism/(?:[^.]*\.(?:m3u8|mpd)|[Mm]anifest)',
|
r'\.ism/(?:[^.]*\.(?:m3u8|mpd)|[Mm]anifest)',
|
||||||
'.ism/' + suffix, manifest_url))
|
'.ism/' + suffix, manifest_url))
|
||||||
|
|
||||||
formats = self._extract_mpd_formats(
|
def make_urls(proto, suffix):
|
||||||
url_repl('dash', '.mpd'), video_id,
|
urls = [url_repl(proto, suffix)]
|
||||||
mpd_id='dash', fatal=False)
|
hd_url = urls[0].replace('/manifest/', '/ngvod/')
|
||||||
formats.extend(self._extract_ism_formats(
|
if hd_url != urls[0]:
|
||||||
url_repl('hss', 'Manifest'),
|
urls.append(hd_url)
|
||||||
video_id, ism_id='mss', fatal=False))
|
return urls
|
||||||
formats.extend(self._extract_m3u8_formats(
|
|
||||||
url_repl('hls', '.m3u8'), video_id, 'mp4',
|
for man_url in make_urls('dash', '.mpd'):
|
||||||
'm3u8_native', m3u8_id='hls', fatal=False))
|
formats = self._extract_mpd_formats(
|
||||||
|
man_url, video_id, mpd_id='dash', fatal=False)
|
||||||
|
for man_url in make_urls('hss', 'Manifest'):
|
||||||
|
formats.extend(self._extract_ism_formats(
|
||||||
|
man_url, video_id, ism_id='mss', fatal=False))
|
||||||
|
for man_url in make_urls('hls', '.m3u8'):
|
||||||
|
formats.extend(self._extract_m3u8_formats(
|
||||||
|
man_url, video_id, 'mp4', 'm3u8_native', m3u8_id='hls',
|
||||||
|
fatal=False))
|
||||||
if formats:
|
if formats:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user