From 67146ea575ca5bcbc9ff22d062c3569ba30affa9 Mon Sep 17 00:00:00 2001 From: coletdjnz Date: Sat, 26 Apr 2025 11:52:07 +1200 Subject: [PATCH] [ie/youtube] revert back to warning and do not cache is_authenticated --- yt_dlp/extractor/youtube/_base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/youtube/_base.py b/yt_dlp/extractor/youtube/_base.py index 4a6b81b5d3..6d6f8e39cb 100644 --- a/yt_dlp/extractor/youtube/_base.py +++ b/yt_dlp/extractor/youtube/_base.py @@ -600,9 +600,9 @@ class YoutubeBaseInfoExtractor(InfoExtractor): return ' '.join(authorizations) - @functools.cached_property + @property def is_authenticated(self): - return bool(self._has_auth_cookies()) + return self._has_auth_cookies() def _has_auth_cookies(self): yt_sapisid, yt_1psapisid, yt_3psapisid = self._get_sid_cookies() @@ -616,11 +616,11 @@ class YoutubeBaseInfoExtractor(InfoExtractor): # Check that we are still logged-in and cookies have not rotated after every request if self._had_cookie_auth and not self._has_auth_cookies(): - raise ExtractorError( + self.report_warning( 'The provided YouTube account cookies are no longer valid. ' 'They have likely been rotated in the browser as a security measure. ' f'For tips on how to effectively export YouTube cookies, refer to {self._COOKIE_HOWTO_WIKI_URL} .', - expected=True) + only_once=False) return response