mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-06-12 05:44:43 +00:00
[ie/youtube] Make cookie rotation detection fatal
This commit is contained in:
parent
4ce8da2227
commit
7cb1c0507f
@ -617,12 +617,11 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
|
|||||||
# Check that we are still logged-in and cookies have not rotated after every request
|
# 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():
|
if self._had_cookie_auth and not self._has_auth_cookies():
|
||||||
self._had_cookie_auth = False
|
self._had_cookie_auth = False
|
||||||
# TODO: should this be an error? Since now all visitor data, etc. we have extracted would be invalid.
|
raise ExtractorError(
|
||||||
self.report_warning(
|
|
||||||
'The provided YouTube account cookies are no longer valid. '
|
'The provided YouTube account cookies are no longer valid. '
|
||||||
'They have likely been rotated in the browser as a security measure. '
|
'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} .',
|
||||||
only_once=True)
|
expected=True)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user