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

Code before:
            'season': 'Season 2',
            'thumbnail': r're:^https://.+\.jpg',
            'age_limit': 14,
        },
        'params': {'skip_download': 'm3u8'},
    }, {
        'url': 'https://www.bravotv.com/below-deck/season-3/ep-14-reunion-part-1',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        site, display_id = self._match_valid_url(url).group('site', 'id')
        webpage = self._download_webpage(url, display_id)
        settings = self._search_json(
            r'<script[^>]+data-drupal-selector="drupal-settings-json"[^>]*>', webpage, 'settings', display_id)
        tve = extract_attributes(get_element_html_by_class('tve-video-deck-app', webpage) or '')
        query = {
            'manifest': 'm3u',
            'formats': 'm3u,mpeg4',
        }

        if tve:
            account_pid = tve.get('data-mpx-media-account-pid') or 'HNK2IC'
            account_id = tve['data-mpx-media-account-id']
            metadata = traverse_obj(
                tve, ('data-normalized-video', {lambda x: self._parse_json(x, None)}, {dict}))
            video_id = tve.get('data-guid') or metadata['guid']
            if tve.get('data-entitlement') == 'auth':
                auth = traverse_obj(settings, ('tve_adobe_auth', {dict})) or {}
                site = remove_end(site, 'tv')
                release_pid = tve['data-release-pid']
                resource = self._get_mvpd_resource(
                    tve.get('data-adobe-pass-resource-id') or auth.get('adobePassResourceId') or site,
                    tve['data-title'], release_pid, tve.get('data-rating'))
                query.update({
                    'switch': 'HLSServiceSecure',
                    'auth': self._extract_mvpd_auth(
                        url, release_pid, auth.get('adobePassRequestorId') or site, resource),
                })

        else:
            ls_playlist = traverse_obj(settings, ('ls_playlist', ..., {dict}), get_all=False) or {}
            account_pid = ls_playlist.get('mpxMediaAccountPid') or 'PHSl-B'
            account_id = ls_playlist['mpxMediaAccountId']
            video_id = ls_playlist['defaultGuid']
            metadata = traverse_obj(
                ls_playlist, ('videos', lambda _, v: v['guid'] == video_id, {dict}), get_all=False)

        tp_url = f'https://link.theplatform.com/s/{account_pid}/media/guid/{account_id}/{video_id}'
        tp_metadata = self._download_json(
            update_url_query(tp_url, {'format': 'preview'}), video_id, fatal=False)

Review comment (suggestion):
```suggestion
            metadata = self._parse_json(tve.get('data-normalized-video'), display_id, fatal=False)
```

Code after:
            'duration': 68.235,
            'season': 'Season 2',
            'thumbnail': r're:^https://.+\.jpg',
            'age_limit': 14,
        },
        'params': {'skip_download': 'm3u8'},
    }, {
        'url': 'https://www.bravotv.com/below-deck/season-3/ep-14-reunion-part-1',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        site, display_id = self._match_valid_url(url).group('site', 'id')
        webpage = self._download_webpage(url, display_id)
        settings = self._search_json(
            r'<script[^>]+data-drupal-selector="drupal-settings-json"[^>]*>', webpage, 'settings', display_id)
        tve = extract_attributes(get_element_html_by_class('tve-video-deck-app', webpage) or '')
        query = {
            'manifest': 'm3u',
            'formats': 'm3u,mpeg4',
        }

        if tve:
            account_pid = tve.get('data-mpx-media-account-pid') or 'HNK2IC'
            account_id = tve['data-mpx-media-account-id']
            metadata = self._parse_json(
                tve.get('data-normalized-video', ''), display_id, fatal=False, transform_source=unescapeHTML)
            video_id = tve.get('data-guid') or metadata['guid']
            if tve.get('data-entitlement') == 'auth':
                auth = traverse_obj(settings, ('tve_adobe_auth', {dict})) or {}
                site = remove_end(site, 'tv')
                release_pid = tve['data-release-pid']
                resource = self._get_mvpd_resource(
                    tve.get('data-adobe-pass-resource-id') or auth.get('adobePassResourceId') or site,
                    tve['data-title'], release_pid, tve.get('data-rating'))
                query.update({
                    'switch': 'HLSServiceSecure',
                    'auth': self._extract_mvpd_auth(
                        url, release_pid, auth.get('adobePassRequestorId') or site, resource),
                })

        else:
            ls_playlist = traverse_obj(settings, ('ls_playlist', ..., {dict}), get_all=False) or {}
            account_pid = ls_playlist.get('mpxMediaAccountPid') or 'PHSl-B'
            account_id = ls_playlist['mpxMediaAccountId']
            video_id = ls_playlist['defaultGuid']
            metadata = traverse_obj(
                ls_playlist, ('videos', lambda _, v: v['guid'] == video_id, {dict}), get_all=False)

        tp_url = f'https://link.theplatform.com/s/{account_pid}/media/guid/{account_id}/{video_id}'
        tp_metadata = self._download_json(