mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-12 18:31:25 +01:00
Compare commits
No commits in common. "836e057abb54824986f1409cbd43032fa6fe11cb" and "ca9e1740434a27175ae38f58d6141b70c4faee2e" have entirely different histories.
836e057abb
...
ca9e174043
|
@ -139,12 +139,10 @@ class DouyuTVIE(DouyuBaseIE):
|
|||
if stream_url:
|
||||
rate_id = traverse_obj(stream_info, ('rate', {int_or_none}))
|
||||
rate_info = traverse_obj(stream_info, ('multirates', lambda _, v: v['rate'] == rate_id), get_all=False)
|
||||
ext = determine_ext(stream_url)
|
||||
formats.append({
|
||||
'url': stream_url,
|
||||
'format_id': str_or_none(rate_id),
|
||||
'ext': 'mp4' if ext == 'm3u8' else ext,
|
||||
'protocol': 'm3u8_native' if ext == 'm3u8' else 'https',
|
||||
'ext': 'mp4' if '.m3u8' in stream_url else determine_ext(stream_url),
|
||||
'quality': rate_id % -10000 if rate_id is not None else None,
|
||||
**traverse_obj(rate_info, {
|
||||
'format': ('name', {str_or_none}),
|
||||
|
@ -276,14 +274,12 @@ class DouyuShowIE(DouyuBaseIE):
|
|||
for name, url in traverse_obj(url_info, ('data', 'thumb_video', {dict.items}, ...)):
|
||||
video_url = traverse_obj(url, ('url', {url_or_none}))
|
||||
if video_url:
|
||||
ext = determine_ext(video_url)
|
||||
formats.append({
|
||||
'format': self._FORMATS.get(name),
|
||||
'format_id': name,
|
||||
'url': video_url,
|
||||
'quality': self._QUALITIES.get(name),
|
||||
'ext': 'mp4' if ext == 'm3u8' else ext,
|
||||
'protocol': 'm3u8_native' if ext == 'm3u8' else 'https',
|
||||
'ext': 'mp4' if '.m3u8' in video_url else determine_ext(video_url),
|
||||
**parse_resolution(self._RESOLUTIONS.get(name))
|
||||
})
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user