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

Code before:
class JTBCProgramIE(InfoExtractor):
    IE_NAME = 'JTBC:program'
    _VALID_URL = r'https?://(?:vod\.jtbc\.co\.kr/program|tv\.jtbc\.co\.kr/replay)/(?P<id>pr[0-9]+)/(?:replay|pm[0-9]+)$'

    _TESTS = [{
        'url': 'https://tv.jtbc.co.kr/replay/pr10010392/pm10032710',
        'info_dict': {
            '_type': 'playlist',
            'id': 'pr10010392',
        },
        'playlist_count': 398,
    }, {
        'url': 'https://vod.jtbc.co.kr/program/pr10011491/replay',
        'info_dict': {
            '_type': 'playlist',
            'id': 'pr10011491',
        },
        'playlist_count': 59,
    }]

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

        vod_list = self._download_json(
            f'https://now-api.jtbc.co.kr/v1/vodClip/programHome/programReplayVodList?programId={program_id}&rowCount=10000',
            program_id, note='Downloading program replay list')

        entries = [self.url_result(
            'https://vod.jtbc.co.kr/player/program/' + video.get('episodeId'), JTBCIE.ie_key()
        ) for video in vod_list.get('programReplayVodList', [])]

        return self.playlist_result(entries, program_id)


Review comment (suggestion):
```suggestion
        vod_list = self._download_json(
            'https://now-api.jtbc.co.kr/v1/vodClip/programHome/programReplayVodList', program_id,
            note='Downloading program replay list', query={
                'programId': program_id,
                'rowCount': '10000',
            })
```

Code after:
                'title': 'vodTitleView',
                'series': 'programTitle',
                'age_limit': ('watchAge', {int_or_none}),
                'release_date': ('broadcastDate', {lambda x: re.match(r'\d{8}', x.replace('.', ''))}, 0),
                'description': 'episodeContents',
                'thumbnail': ('imgFileUrl', {url_or_none}),
            })),
            'duration': parse_duration(playback_data.get('playTime')),
            'formats': formats,
            'subtitles': subtitles,
        }


class JTBCProgramIE(InfoExtractor):
    IE_NAME = 'JTBC:program'
    _VALID_URL = r'https?://(?:vod\.jtbc\.co\.kr/program|tv\.jtbc\.co\.kr/replay)/(?P<id>pr\d+)/(?:replay|pm\d+)/?(?:$|[?#])'

    _TESTS = [{
        'url': 'https://tv.jtbc.co.kr/replay/pr10010392/pm10032710',
        'info_dict': {
            '_type': 'playlist',
            'id': 'pr10010392',
        },
        'playlist_count': 398,
    }, {
        'url': 'https://vod.jtbc.co.kr/program/pr10011491/replay',
        'info_dict': {
            '_type': 'playlist',
            'id': 'pr10011491',
        },
        'playlist_count': 59,
    }]

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

        vod_list = self._download_json(
            'https://now-api.jtbc.co.kr/v1/vodClip/programHome/programReplayVodList', program_id,
            note='Downloading program replay list', query={
                'programId': program_id,
                'rowCount': '10000',
            })

        entries = [self.url_result(f'https://vod.jtbc.co.kr/player/program/{video_id}', JTBCIE, video_id)
                   for video_id in traverse_obj(vod_list, ('programReplayVodList', ..., 'episodeId'))]
        return self.playlist_result(entries, program_id)