From d26bfa7fde65f4a0dd3fe0f746d39b29053338bc Mon Sep 17 00:00:00 2001 From: coletdjnz Date: Sat, 26 Apr 2025 11:36:28 +1200 Subject: [PATCH] Revert "[ie/youtube] revert back to warning" This reverts commit 595d9b90417ad61b4c7493cbc4ca4f1ad0d7cf37. --- yt_dlp/extractor/youtube/_base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/youtube/_base.py b/yt_dlp/extractor/youtube/_base.py index 69a8f49150..4a6b81b5d3 100644 --- a/yt_dlp/extractor/youtube/_base.py +++ b/yt_dlp/extractor/youtube/_base.py @@ -616,10 +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(): - self.report_warning( + raise ExtractorError( '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} .') + f'For tips on how to effectively export YouTube cookies, refer to {self._COOKIE_HOWTO_WIKI_URL} .', + expected=True) return response