diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 719a151c49..77a8b93f36 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -3787,10 +3787,9 @@ def feed_entry(name): return self.playlist_result( entries, video_id, video_title, video_description) - duration = int_or_none( - get_first(video_details, 'lengthSeconds') - or get_first(microformats, 'lengthSeconds') - or parse_duration(search_meta('duration'))) or None + duration = (int_or_none(get_first(video_details, 'lengthSeconds')) + or int_or_none(get_first(microformats, 'lengthSeconds')) + or parse_duration(search_meta('duration')) or None) live_broadcast_details, live_status, streaming_data, formats, automatic_captions = \ self._list_formats(video_id, microformats, video_details, player_responses, player_url, duration)