mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 06:27:21 +00:00
Added new qualities for videos
This commit is contained in:
parent
2eb268c3ff
commit
174cacc9e0
|
@ -146,26 +146,28 @@ def _get_alfabet(alphabet_data):
|
||||||
return alphabet
|
return alphabet
|
||||||
|
|
||||||
def _extract_png_formats(self, video_id):
|
def _extract_png_formats(self, video_id):
|
||||||
png = self._download_webpage(
|
|
||||||
f'http://www.rtve.es/ztnr/movil/thumbnail/{self._manager}/videos/{video_id}.png',
|
|
||||||
video_id, 'Downloading url information', query={'q': 'v2'})
|
|
||||||
q = qualities(['Media', 'Alta', 'HQ', 'HD_READY', 'HD_FULL'])
|
|
||||||
formats = []
|
formats = []
|
||||||
for quality, video_url in self._decrypt_url(png):
|
|
||||||
ext = determine_ext(video_url)
|
for manager in (self._manager, 'rtveplayw'):
|
||||||
if ext == 'm3u8':
|
png = self._download_webpage(
|
||||||
formats.extend(self._extract_m3u8_formats(
|
f'http://www.rtve.es/ztnr/movil/thumbnail/{manager}/videos/{video_id}.png',
|
||||||
video_url, video_id, 'mp4', 'm3u8_native',
|
video_id, 'Downloading url information', query={'q': 'v2'})
|
||||||
m3u8_id='hls', fatal=False))
|
q = qualities(['Media', 'Alta', 'HQ', 'HD_READY', 'HD_FULL'])
|
||||||
elif ext == 'mpd':
|
for quality, video_url in self._decrypt_url(png):
|
||||||
formats.extend(self._extract_mpd_formats(
|
ext = determine_ext(video_url)
|
||||||
video_url, video_id, 'dash', fatal=False))
|
if ext == 'm3u8':
|
||||||
else:
|
formats.extend(self._extract_m3u8_formats(
|
||||||
formats.append({
|
video_url, video_id, 'mp4', 'm3u8_native',
|
||||||
'format_id': quality,
|
m3u8_id='hls', fatal=False))
|
||||||
'quality': q(quality),
|
elif ext == 'mpd':
|
||||||
'url': video_url,
|
formats.extend(self._extract_mpd_formats(
|
||||||
})
|
video_url, video_id, 'dash', fatal=False))
|
||||||
|
else:
|
||||||
|
formats.append({
|
||||||
|
'format_id': quality,
|
||||||
|
'quality': q(quality),
|
||||||
|
'url': video_url,
|
||||||
|
})
|
||||||
return formats
|
return formats
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
|
Loading…
Reference in a new issue