From 4d90834d0952280ce4c89d81f4b697c04f419e44 Mon Sep 17 00:00:00 2001 From: dove <147140405+slipinthedove@users.noreply.github.com> Date: Fri, 13 Dec 2024 06:31:57 -0300 Subject: [PATCH 1/2] lint query and headers Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com> --- yt_dlp/extractor/globo.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/yt_dlp/extractor/globo.py b/yt_dlp/extractor/globo.py index 5f8c6a5ac..4910c0740 100644 --- a/yt_dlp/extractor/globo.py +++ b/yt_dlp/extractor/globo.py @@ -62,13 +62,16 @@ class GloboIE(InfoExtractor): info = self._download_json( 'https://cloud-jarvis.globo.com/graphql', video_id, - query={'operationName': 'getVideoView', - 'variables': f'{{"videoId":{video_id}}}', - 'query': self._VIDEO_VIEW}, - headers={'content-type': 'application/json', - 'x-platform-id': 'web', - 'x-device-id': 'desktop', - 'x-client-version': '2024.12-5'})['data']['video'] + query={ + 'operationName': 'getVideoView', + 'variables': f'{{"videoId":{video_id}}}', + 'query': self._VIDEO_VIEW, + }, headers={ + 'content-type': 'application/json', + 'x-platform-id': 'web', + 'x-device-id': 'desktop', + 'x-client-version': '2024.12-5', + })['data']['video'] formats = [] video = self._download_json( From b6dbbb6ce3d065245177e1c3c7a5f3d70e60e850 Mon Sep 17 00:00:00 2001 From: dove <147140405+slipinthedove@users.noreply.github.com> Date: Fri, 13 Dec 2024 06:33:21 -0300 Subject: [PATCH 2/2] uploader set explicitly as str Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com> --- yt_dlp/extractor/globo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/extractor/globo.py b/yt_dlp/extractor/globo.py index 4910c0740..78c259cc4 100644 --- a/yt_dlp/extractor/globo.py +++ b/yt_dlp/extractor/globo.py @@ -103,7 +103,7 @@ class GloboIE(InfoExtractor): **traverse_obj(info, { 'title': ('headline', {str}), 'duration': ('duration', {float_or_none(scale=1000)}), - 'uploader': ('title', 'headline', {str_or_none}), + 'uploader': ('title', 'headline', {str}), 'uploader_id': ('title', 'originProgramId', {str_or_none}), }), 'formats': formats,