mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 10:31:29 +00:00
parent
d51b2816e3
commit
6678a4f0b3
|
@ -3684,17 +3684,13 @@ def _list_formats(self, video_id, microformats, video_details, player_responses,
|
||||||
is_live = get_first(live_broadcast_details, 'isLiveNow')
|
is_live = get_first(live_broadcast_details, 'isLiveNow')
|
||||||
live_content = get_first(video_details, 'isLiveContent')
|
live_content = get_first(video_details, 'isLiveContent')
|
||||||
is_upcoming = get_first(video_details, 'isUpcoming')
|
is_upcoming = get_first(video_details, 'isUpcoming')
|
||||||
if is_live is None and is_upcoming or live_content is False:
|
|
||||||
is_live = False
|
|
||||||
if is_upcoming is None and (live_content or is_live):
|
|
||||||
is_upcoming = False
|
|
||||||
post_live = get_first(video_details, 'isPostLiveDvr')
|
post_live = get_first(video_details, 'isPostLiveDvr')
|
||||||
live_status = ('post_live' if post_live
|
live_status = ('post_live' if post_live
|
||||||
else 'is_live' if is_live
|
else 'is_live' if is_live
|
||||||
else 'is_upcoming' if is_upcoming
|
else 'is_upcoming' if is_upcoming
|
||||||
else None if None in (is_live, is_upcoming, live_content)
|
else 'was_live' if live_content
|
||||||
else 'was_live' if live_content else 'not_live')
|
else 'not_live' if False in (is_live, live_content)
|
||||||
|
else None)
|
||||||
streaming_data = traverse_obj(player_responses, (..., 'streamingData'), default=[])
|
streaming_data = traverse_obj(player_responses, (..., 'streamingData'), default=[])
|
||||||
*formats, subtitles = self._extract_formats_and_subtitles(streaming_data, video_id, player_url, live_status, duration)
|
*formats, subtitles = self._extract_formats_and_subtitles(streaming_data, video_id, player_url, live_status, duration)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue