From 11dfa446ecac607d2e5627d8a0f09d9f33b6308d Mon Sep 17 00:00:00 2001 From: bashonly Date: Tue, 20 May 2025 15:30:24 -0500 Subject: [PATCH] cleanup Authored by: bashonly --- yt_dlp/extractor/twitch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/twitch.py b/yt_dlp/extractor/twitch.py index 2024da88be..62ed01f3bf 100644 --- a/yt_dlp/extractor/twitch.py +++ b/yt_dlp/extractor/twitch.py @@ -1022,7 +1022,7 @@ class TwitchStreamIE(TwitchPlaylistBaseIE): 'id': 'v' + video_id, 'url': f'https://www.twitch.tv/videos/{video_id}', 'title': node.get('title'), - 'timestamp': unified_timestamp(node.get('publishedAt')), + 'timestamp': unified_timestamp(node.get('publishedAt')) or 0, } def _real_extract(self, url): @@ -1063,7 +1063,7 @@ class TwitchStreamIE(TwitchPlaylistBaseIE): if self.get_param('live_from_start'): entry = next(self._entries(channel_name, None, 'time'), None) - if entry and timestamp <= (entry.get('timestamp') or 0): + if entry and entry['timestamp'] >= timestamp: return entry self.report_warning('Unable to extract associated VOD; cannot download live from start')