mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 20:55:52 +01:00
[extractor/youtube] Fix duration
for premieres (#5382)
Closes #5378 Authored by: nosoop
This commit is contained in:
parent
e63faa101c
commit
9da6612b0f
@ -3787,10 +3787,9 @@ def feed_entry(name):
|
|||||||
return self.playlist_result(
|
return self.playlist_result(
|
||||||
entries, video_id, video_title, video_description)
|
entries, video_id, video_title, video_description)
|
||||||
|
|
||||||
duration = int_or_none(
|
duration = (int_or_none(get_first(video_details, 'lengthSeconds'))
|
||||||
get_first(video_details, 'lengthSeconds')
|
or int_or_none(get_first(microformats, 'lengthSeconds'))
|
||||||
or get_first(microformats, 'lengthSeconds')
|
or parse_duration(search_meta('duration')) or None)
|
||||||
or parse_duration(search_meta('duration'))) or None
|
|
||||||
|
|
||||||
live_broadcast_details, live_status, streaming_data, formats, automatic_captions = \
|
live_broadcast_details, live_status, streaming_data, formats, automatic_captions = \
|
||||||
self._list_formats(video_id, microformats, video_details, player_responses, player_url, duration)
|
self._list_formats(video_id, microformats, video_details, player_responses, player_url, duration)
|
||||||
|
Loading…
Reference in New Issue
Block a user