Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/globo.py (Python)

Code before:
        'params': {
            'skip_download': True,
        },
    },
        {
        'url': 'globo:12824146',
        'info_dict': {
            'id': '12824146',
            'ext': 'mp4',
            'title': 'Acordo de damas',
            'episode_number': 1,
            'season_number': 2,
        },
        'params': {
            'skip_download': True,
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)

        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']

        formats = []
        video = self._download_json(
            'https://playback.video.globo.com/v4/video-session', video_id,
            f'Downloading resource info for {video_id}',
            headers={'Content-Type': 'application/json'},
            data=json.dumps({
                'player_type': 'mirakulo_8k_hdr',
                'video_id': video_id,
                'quality': 'max',
                'content_protection': 'widevine',
                'vsid': f'{uuid.uuid4()}',
                'consumption': 'streaming',
                'capabilities': {'low_latency': True},
                'tz': '-03:00',
                'Authorization': try_get(self._get_cookies('https://globo.com'),
                                         lambda x: f'Bearer {x["GLBID"].value}') or '',
                'version': 1,

Review comment (suggestion):
maybe overkill but I really hate trying to decipher the `}}}`s

use `separators` param if the default whitespace is a problem for the graphql

```suggestion
                'variables': json.dumps({'videoId': video_id}),
```

Code after:
            'title': 'Capítulo de 14⧸08⧸1989',
            'episode_number': 1,
        },
        'params': {
            'skip_download': True,
        },
    },
        {
        'url': 'globo:12824146',
        'info_dict': {
            'id': '12824146',
            'ext': 'mp4',
            'title': 'Acordo de damas',
            'episode_number': 1,
            'season_number': 2,
        },
        'params': {
            'skip_download': True,
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)

        info = self._download_json(
            'https://cloud-jarvis.globo.com/graphql', video_id,
            query={
                'operationName': 'getVideoView',
                'variables': json.dumps({'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(
            'https://playback.video.globo.com/v4/video-session', video_id,
            f'Downloading resource info for {video_id}',
            headers={'Content-Type': 'application/json'},
            data=json.dumps(filter_dict({
                'player_type': 'mirakulo_8k_hdr',
                'video_id': video_id,
                'quality': 'max',
                'content_protection': 'widevine',
                'vsid': f'{uuid.uuid4()}',
                'consumption': 'streaming',
                'capabilities': {'low_latency': True},
                'tz': '-03:00',