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

Code before:
        # Try to upgrade quality
        potential_urls = [
            mod_url if self._request_webpage(
                HEADRequest(mod_url := re.sub(r'_720(p?)\.m3u8', r'_1080\1.m3u8', url)), video_id,
                note='Checking if higher quality format is available', fatal=False) else url
            for url in potential_urls
        ]

        formats = []
        for url in potential_urls:
            formats.extend(self._extract_m3u8_formats(url, video_id, fatal=False))

        subtitles = {}
        for track in traverse_obj(data, ('result', 'text_tracks', lambda _, v: url_or_none(v['url']))):
            subtitles.setdefault(track.get('language', 'und'), []).append({
                'url': track['url'],
                'ext': track.get('codec'),
                'name': track.get('label'),
            })

        return {
            'id': video_id,
            'title': join_nonempty(
                ('result', 'episode', 'program', 'title'),
                ('result', 'episode', 'title'), from_dict=data, delim=': '),
            **traverse_obj(data, ('result', {
                'thumbnail': ('episode', 'images', 'thumbnail', {url_or_none}),
                'release_date': ('episode', 'release_date', {lambda x: x.replace('-', '')}, {unified_strdate}),
                'duration': ('duration', {functools.partial(float_or_none, scale=1000)}),
                'age_limit': ('age_rating', 'name', {lambda x: x.replace('R', '')}, {parse_age_limit}),
                'series': ('episode', {lambda x: x['program'] if x['kind'] == 'series' else None}, 'title'),
                'series_id': ('episode', {lambda x: x['program'] if x['kind'] == 'series' else None}, 'id'),
                'episode': ('episode', {lambda x: x['title'] if x['kind'] == 'series' else None},),
                'episode_number': ('episode', {lambda x: x['number'] if x['kind'] == 'series' else None}, {int_or_none}),
            }), get_all=False),
            'formats': formats,
            'subtitles': subtitles,
        }


class OnDemandKoreaProgramIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?ondemandkorea\.com/(?:en/)?player/vod/(?P<id>[a-z0-9-]+)(?:$|#)'
    _GEO_COUNTRIES = ['US', 'CA']

    _TESTS = [{
        'url': 'https://www.ondemandkorea.com/player/vod/uskn-news',
        'info_dict': {
            'id': 'uskn-news',
        },
        'playlist_mincount': 755,
    }, {

Review comment (suggestion):
if the `data['result']` suggestion from above is applied
```suggestion
            'title': join_nonempty(
                ('episode', 'program', 'title'),
                ('episode', 'title'), from_dict=data, delim=': '),
            **traverse_obj(data, {
```

Code after:
        def try_geo_bypass(url):
            return traverse_obj(url, ({parse_qs}, 'stream_url', 0, {url_or_none})) or url

        def try_upgrade_quality(url):
            mod_url = re.sub(r'_720(p?)\.m3u8', r'_1080\1.m3u8', url)
            return mod_url if mod_url != url and self._request_webpage(
                HEADRequest(mod_url), video_id, note='Checking for higher quality format',
                errnote='No higher quality format found', fatal=False) else url

        formats = []
        for m3u8_url in traverse_obj(data, (('sources', 'manifest'), ..., 'url', {url_or_none}, {try_geo_bypass})):
            formats.extend(self._extract_m3u8_formats(try_upgrade_quality(m3u8_url), video_id, fatal=False))

        subtitles = {}
        for track in traverse_obj(data, ('text_tracks', lambda _, v: url_or_none(v['url']))):
            subtitles.setdefault(track.get('language', 'und'), []).append({
                'url': track['url'],
                'ext': track.get('codec'),
                'name': track.get('label'),
            })

        def if_series(key=None):
            return lambda obj: obj[key] if key and obj['kind'] == 'series' else None

        return {
            'id': video_id,
            'title': join_nonempty(
                ('episode', 'program', 'title'),
                ('episode', 'title'), from_dict=data, delim=': '),
            **traverse_obj(data, {
                'thumbnail': ('episode', 'images', 'thumbnail', {url_or_none}),
                'release_date': ('episode', 'release_date', {lambda x: x.replace('-', '')}, {unified_strdate}),
                'duration': ('duration', {functools.partial(float_or_none, scale=1000)}),
                'age_limit': ('age_rating', 'name', {lambda x: x.replace('R', '')}, {parse_age_limit}),
                'series': ('episode', {if_series(key='program')}, 'title'),
                'series_id': ('episode', {if_series(key='program')}, 'id'),
                'episode': ('episode', {if_series(key='title')}),
                'episode_number': ('episode', {if_series(key='number')}, {int_or_none}),
            }, get_all=False),
            'formats': formats,
            'subtitles': subtitles,
        }


class OnDemandKoreaProgramIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?ondemandkorea\.com/(?:en/)?player/vod/(?P<id>[a-z0-9-]+)(?:$|#)'
    _GEO_COUNTRIES = ['US', 'CA']

    _TESTS = [{
        'url': 'https://www.ondemandkorea.com/player/vod/uskn-news',
        'info_dict': {