Update yt_dlp/extractor/youtube/_base.py

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
coletdjnz 2025-04-27 09:51:48 +12:00 committed by GitHub
parent f69ec68096
commit 9f97ee4309
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -455,8 +455,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
def _initialize_consent(self):
if self._has_auth_cookies:
return
cookies = self._youtube_cookies
socs = cookies.get('SOCS')
socs = self._youtube_cookies.get('SOCS')
if socs and not socs.value.startswith('CAA'): # not consented
return
self._set_cookie('.youtube.com', 'SOCS', 'CAI', secure=True) # accept all (required for mixes)