1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-01-08 18:48:49 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Ronald Ip
0df6ad0c1e
Merge 86d709410a into e1b3fa242c 2024-07-25 08:19:32 +09:00
Ronald Ip
86d709410a
[twitter] Fix for private videos (#27643)
Closes #27643
2022-02-15 11:55:12 +08:00

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,