This commit is contained in:
Ronald Ip 2024-04-11 16:46:57 -04:00 committed by GitHub
commit 7df09ae6d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ class TwitterBaseIE(InfoExtractor):
headers = {
'Authorization': 'Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKbT3jJPCEVnMYqilB28NHfOPqkca3qaAxGfsyKCs0wRbw',
}
token = self._get_cookies(self._API_BASE).get('ct0')
if token:
headers['x-csrf-token'] = token.value
if not self._GUEST_TOKEN:
self._GUEST_TOKEN = self._download_json(
self._API_BASE + 'guest/activate.json', video_id,