mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 22:35:21 +00:00
parent
3472227074
commit
86d709410a
@ -83,6 +83,9 @@ class TwitterBaseIE(InfoExtractor):
|
|||||||
headers = {
|
headers = {
|
||||||
'Authorization': 'Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKbT3jJPCEVnMYqilB28NHfOPqkca3qaAxGfsyKCs0wRbw',
|
'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:
|
if not self._GUEST_TOKEN:
|
||||||
self._GUEST_TOKEN = self._download_json(
|
self._GUEST_TOKEN = self._download_json(
|
||||||
self._API_BASE + 'guest/activate.json', video_id,
|
self._API_BASE + 'guest/activate.json', video_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user