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

Code before:
        },
        'playlist_count': 18,
    }, {
        'url': 'https://allvod.sbs.co.kr/allvod/vodProgramDetail.do?pgmId=P460810577',
        'info_dict': {
            '_type': 'playlist',
            'id': 'P460810577',
        },
        'playlist_count': 13,
    }]

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

        details = self._download_json(
            'https://allvod.sbs.co.kr/allvod/vodProgramDetail/vodProgramDetailAjax.do',
            program_id, note='Downloading program details',
            query={
                'pgmId': program_id,
                'currentCount': '10000',
            })

        return self.playlist_result(
            [self.url_result(
                'https://allvod.sbs.co.kr/allvod/vodEndPage.do?mdaId=' + video_id, SBSCoKrIE
            ) for video_id in traverse_obj(details, ('list', ..., 'mdaId'), default=[])], program_id)


class SBSCoKrProgramsVodIE(InfoExtractor):
    IE_NAME = 'sbs.co.kr:programs_vod'
    _VALID_URL = r'https?://programs\.sbs\.co\.kr/(?:enter|drama|culture|sports|plus|mtv)/(?P<id>[a-z0-9]+)/vods'

    _TESTS = [{
        'url': 'https://programs.sbs.co.kr/culture/morningwide/vods/65007',
        'info_dict': {
            '_type': 'playlist',
            'id': '00000210215',
        },
        'playlist_mincount': 9782,
    }, {
        'url': 'https://programs.sbs.co.kr/enter/dongsang2/vods/52006',
        'info_dict': {
            '_type': 'playlist',
            'id': '22000010476',
        },
        'playlist_mincount': 312,
    }]

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


Review comment (suggestion):
traversal always returns a list if it branches and you don't pass `get_all=False`
```suggestion
            [self.url_result(f'https://allvod.sbs.co.kr/allvod/vodEndPage.do?mdaId={video_id}', SBSCoKrIE),
             for video_id in traverse_obj(details, ('list', ..., 'mdaId'))], program_id)
```

Code after:
            '_type': 'playlist',
            'id': '22000010159',
        },
        'playlist_count': 18,
    }, {
        'url': 'https://allvod.sbs.co.kr/allvod/vodProgramDetail.do?pgmId=P460810577',
        'info_dict': {
            '_type': 'playlist',
            'id': 'P460810577',
        },
        'playlist_count': 13,
    }]

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

        details = self._download_json(
            'https://allvod.sbs.co.kr/allvod/vodProgramDetail/vodProgramDetailAjax.do',
            program_id, note='Downloading program details',
            query={
                'pgmId': program_id,
                'currentCount': '10000',
            })

        return self.playlist_result(
            [self.url_result(f'https://allvod.sbs.co.kr/allvod/vodEndPage.do?mdaId={video_id}', SBSCoKrIE)
             for video_id in traverse_obj(details, ('list', ..., 'mdaId'))], program_id)


class SBSCoKrProgramsVodIE(InfoExtractor):
    IE_NAME = 'sbs.co.kr:programs_vod'
    _VALID_URL = r'https?://programs\.sbs\.co\.kr/(?:enter|drama|culture|sports|plus|mtv)/(?P<id>[a-z0-9]+)/vods'

    _TESTS = [{
        'url': 'https://programs.sbs.co.kr/culture/morningwide/vods/65007',
        'info_dict': {
            '_type': 'playlist',
            'id': '00000210215',
        },
        'playlist_mincount': 9782,
    }, {
        'url': 'https://programs.sbs.co.kr/enter/dongsang2/vods/52006',
        'info_dict': {
            '_type': 'playlist',
            'id': '22000010476',
        },
        'playlist_mincount': 312,
    }]

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