mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-28 22:24:34 +01:00
use authorization for video-session if cookies are specified
This commit is contained in:
parent
4c63497cc6
commit
cec240eb2d
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,7 @@ from ..utils import (
|
||||||
float_or_none,
|
float_or_none,
|
||||||
orderedSet,
|
orderedSet,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
|
try_get,
|
||||||
)
|
)
|
||||||
from ..utils.traversal import subs_list_to_dict, traverse_obj
|
from ..utils.traversal import subs_list_to_dict, traverse_obj
|
||||||
|
|
||||||
|
@ -85,6 +86,8 @@ class GloboIE(InfoExtractor):
|
||||||
'content_protection': 'widevine',
|
'content_protection': 'widevine',
|
||||||
'vsid': '2938bc7c-9376-d4b7-ee91-ce46dbbf9f4d',
|
'vsid': '2938bc7c-9376-d4b7-ee91-ce46dbbf9f4d',
|
||||||
'tz': '-03:00',
|
'tz': '-03:00',
|
||||||
|
'Authorization': try_get(self._get_cookies('.globo.com'),
|
||||||
|
lambda x: f'Bearer {x['GLBID'].value}') or '',
|
||||||
'version': 1,
|
'version': 1,
|
||||||
}).encode())
|
}).encode())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue