From cec240eb2d82a32e7b54b40b858f40e7b2a3ba8a Mon Sep 17 00:00:00 2001 From: slipinthedove Date: Thu, 19 Dec 2024 22:35:17 -0300 Subject: [PATCH] use authorization for video-session if cookies are specified --- yt_dlp/extractor/globo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yt_dlp/extractor/globo.py b/yt_dlp/extractor/globo.py index f7b503ab3..a533380d3 100644 --- a/yt_dlp/extractor/globo.py +++ b/yt_dlp/extractor/globo.py @@ -6,6 +6,7 @@ from ..utils import ( float_or_none, orderedSet, str_or_none, + try_get, ) from ..utils.traversal import subs_list_to_dict, traverse_obj @@ -85,6 +86,8 @@ class GloboIE(InfoExtractor): 'content_protection': 'widevine', 'vsid': '2938bc7c-9376-d4b7-ee91-ce46dbbf9f4d', 'tz': '-03:00', + 'Authorization': try_get(self._get_cookies('.globo.com'), + lambda x: f'Bearer {x['GLBID'].value}') or '', 'version': 1, }).encode())