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

Code before:
                'title': metadata['title'],
                'description': metadata.get('description'),
                'season_number': int_or_none(metadata.get('season_num')),
                'episode_number': int_or_none(metadata.get('episode_num')),
            })
            query['switch'] = 'progressive'

        tp_url = 'http://link.theplatform.com/s/%s/%s' % (account_pid, tp_path)

        tp_metadata = self._download_json(
            update_url_query(tp_url, {'format': 'preview'}),
            display_id, fatal=False)
        if tp_metadata:
            info.update({
                'title': tp_metadata.get('title'),
                'description': tp_metadata.get('description'),
                'duration': float_or_none(tp_metadata.get('duration'), 1000),
                'season_number': (
                    int_or_none(tp_metadata.get('pl1$seasonNumber'))
                    or int_or_none(tp_metadata.get('nbcu$seasonNumber'))),
                'episode_number': (
                    int_or_none(tp_metadata.get('pl1$episodeNumber'))
                    or int_or_none(tp_metadata.get('nbcu$episodeNumber'))),
                # For some reason the series is sometimes wrapped into a single element array.
                'series': try_get(
                    tp_metadata.get('pl1$show') or tp_metadata.get('nbcu$show'),
                    lambda x: x[0] if isinstance(x, list) else x,
                    expected_type=str),
                'episode': (
                    tp_metadata.get('pl1$episodeName')
                    or tp_metadata.get('nbcu$episodeName')
                    or tp_metadata.get('title')),
            })

        info.update({
            '_type': 'url_transparent',
            'id': release_pid,
            'url': smuggle_url(update_url_query(tp_url, query), {'force_smil_url': True}),
            'ie_key': 'ThePlatform',
        })
        return info


Review comment (suggestion):
```suggestion
                    dict_get(tp_metadata, ('pl1$show', 'nbcu$show')),
```
OR (with the latest master)
```suggestion
                    traverse_obj(tp_metadata, ('pl1$show',), ('nbcu$show',)),
```

Same for `episode`, `season_number` and `episode_number`

Code after:
            info.update({
                'title': metadata['title'],
                'description': metadata.get('description'),
                'season_number': int_or_none(metadata.get('season_num')),
                'episode_number': int_or_none(metadata.get('episode_num')),
            })
            query['switch'] = 'progressive'

        tp_url = 'http://link.theplatform.com/s/%s/%s' % (account_pid, tp_path)

        tp_metadata = self._download_json(
            update_url_query(tp_url, {'format': 'preview'}),
            display_id, fatal=False)
        if tp_metadata:
            info.update({
                'title': tp_metadata.get('title'),
                'description': tp_metadata.get('description'),
                'duration': float_or_none(tp_metadata.get('duration'), 1000),
                'season_number': int_or_none(
                    dict_get(tp_metadata, ('pl1$seasonNumber', 'nbcu$seasonNumber'))),
                'episode_number': int_or_none(
                    dict_get(tp_metadata, ('pl1$episodeNumber', 'nbcu$episodeNumber'))),
                # For some reason the series is sometimes wrapped into a single element array.
                'series': try_get(
                    dict_get(tp_metadata, ('pl1$show', 'nbcu$show')),
                    lambda x: x[0] if isinstance(x, list) else x,
                    expected_type=str),
                'episode': dict_get(
                    tp_metadata, ('pl1$episodeName', 'nbcu$episodeName', 'title')),
            })

        info.update({
            '_type': 'url_transparent',
            'id': release_pid,
            'url': smuggle_url(update_url_query(tp_url, query), {'force_smil_url': True}),
            'ie_key': 'ThePlatform',
        })
        return info