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

Code before:
                'pprofile': 'ots_desktop_html',
                'sensitive': 'false',
                'w': '1920',
                'h': '1080',
                'rnd': '1660303',
                'mode': 'LIVE',
                'format': 'SMIL',
                'tracking': 'true',
                'formats': 'M3U+none,MPEG-DASH+none,MPEG4,MP3',
                'vpaid': 'script',
                'schema': '2.0',
                'SDK': 'PDK+6.1.3',
            }
            info = {}

        else:
            live = False
            player_id = traverse_obj(
                video_data, ('video', 'meta', 'pid_streaming_web_high'), 'pid_streaming_web_high',
                ('video', 'meta', 'mpx_pid'), 'mpx_pid')

            title = video_data.get('title')
            if not title:
                title = traverse_obj(
                    nbc_data, ('dataLayer', 'contenttitle'), ('dataLayer', 'title'),
                    ('dataLayer', 'adobe', 'prop22'), ('dataLayer', 'id'))
            description = traverse_obj(video_data, 'summary', 'excerpt', 'video_hero_text')

            date_string = traverse_obj(video_data, 'date_string', 'date_gmt')
            if date_string:
                date_string = self._search_regex(
                    r'datetime="([^"]+)"', date_string, 'date string', fatal=False)
            else:
                date_string = traverse_obj(
                    nbc_data, ('dataLayer', 'adobe', 'prop70'), ('dataLayer', 'adobe', 'eVar70'),
                    ('dataLayer', 'adobe', 'eVar59'))

            video_url = traverse_obj(video_data, ('video', 'meta', 'mp4_url'), 'mp4_url')
            if video_url:
                resolutions = {'1080': '1920', '720': '1280', '540': '960', '360': '640', '234': '416'}
                height = url_basename(video_url).split('-')[1].split('p')[0]
                formats.append({
                    'url': video_url,
                    'ext': 'mp4',
                    'width': int_or_none(resolutions.get(height)),
                    'height': int_or_none(height),
                    'format_id': f'http-{height}',
                })

            entry_protocol = 'm3u8_native'
            query = {

Review comment (suggestion):
```suggestion
            title = video_data.get('title') or traverse_obj(
                nbc_data, ('dataLayer', 'contenttitle'), ('dataLayer', 'title'),
                ('dataLayer', 'adobe', 'prop22'), ('dataLayer', 'id'))
```

Code after:
                'assetTypes': 'LegacyRelease',
                'fwsitesection': fw_ssid,
                'fwNetworkID': fw_network_id,
                'pprofile': 'ots_desktop_html',
                'sensitive': 'false',
                'w': '1920',
                'h': '1080',
                'rnd': '1660303',
                'mode': 'LIVE',
                'format': 'SMIL',
                'tracking': 'true',
                'formats': 'M3U+none,MPEG-DASH+none,MPEG4,MP3',
                'vpaid': 'script',
                'schema': '2.0',
                'SDK': 'PDK+6.1.3',
            }
            info = {
                'title': f'{channel} livestream',
            }

        else:
            live = False
            player_id = traverse_obj(
                video_data, ('video', 'meta', 'pid_streaming_web_high'), 'pid_streaming_web_high',
                ('video', 'meta', 'mpx_pid'), 'mpx_pid')

            date_string = traverse_obj(video_data, 'date_string', 'date_gmt')
            if date_string:
                date_string = self._search_regex(
                    r'datetime="([^"]+)"', date_string, 'date string', fatal=False)
            else:
                date_string = traverse_obj(
                    nbc_data, ('dataLayer', 'adobe', 'prop70'), ('dataLayer', 'adobe', 'eVar70'),
                    ('dataLayer', 'adobe', 'eVar59'))

            video_url = traverse_obj(video_data, ('video', 'meta', 'mp4_url'), 'mp4_url')
            if video_url:
                height = url_basename(video_url).split('-')[1].split('p')[0]
                formats.append({
                    'url': video_url,
                    'ext': 'mp4',
                    'width': int_or_none(self._RESOLUTIONS.get(height)),
                    'height': int_or_none(height),
                    'format_id': f'http-{height}',
                })

            query = {
                'mbr': 'true',
                'assetTypes': 'LegacyRelease',
                'fwsitesection': fw_ssid,
                'fwNetworkID': fw_network_id,