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

Code before:
        # Try turning it to 'program - title' naming scheme if possible
        alt_title = info.get('program', {}).get('title')
        if alt_title:
            info['title'] = alt_title + ' - ' + re.sub(r'^' + alt_title + r'[\s\-:]+', '', info['title'])

        description = info.get('description') or info.get(
            'program', {}).get('description') or description

        return {
            'id': video_id,
            'display_id': display_id,
            'title': info['title'],
            'description': description,
            'thumbnail': info.get('image_url'),
            'duration': int_or_none(info.get('duration')),
            'age_limit': age_limit,
            'upload_date': upload_date,
            'formats': formats,
            'subtitles': subtitles,
            'chapters': chapters,
        }


class PBSKidsIE(InfoExtractor):
    # https://pbskids.org/video/molly-of-denali/3030407927
    _VALID_URL = r'https?://(?:www\.)?pbskids\.org/video/(?P<channel>[a-zA-Z\-]+)/(?P<id>[0-9]+)'
    _TESTS = [
        {
            'url': 'https://pbskids.org/video/molly-of-denali/3030407927',
            'md5': '1ded20a017cc6b53446238f1804ce4c7',
            'info_dict': {
                'id': '3030407927',
                'title': 'Bird in the Hand/Bye-Bye Birdie',
                'channel': 'molly-of-denali',
                'duration': 1540,
                'ext': 'mp4',
                'series': 'Molly of Denali',
                'description': 'md5:d006b2211633685d8ebc8d03b6d5611e',
                'categories': ['Episode'],
                'upload_date': '20190718',
            }
        },
        {
            'url': 'https://pbskids.org/video/plum-landing/2365205059',
            'md5': '92e5d189851a64ae1d0237a965be71f5',
            'info_dict': {
                'id': '2365205059',
                'title': 'Cooper\'s Favorite Place in Nature',
                'channel': 'plum-landing',
                'duration': 67,
                'ext': 'mp4',

Review comment (suggestion):
```suggestion
    _VALID_URL = r'https?://(?:www\.)?pbskids\.org/video/(?P<channel>[\w-]+)/(?P<id>\d+)'
```

Code after:
        alt_title = info.get('program', {}).get('title')
        if alt_title:
            info['title'] = alt_title + ' - ' + re.sub(r'^' + alt_title + r'[\s\-:]+', '', info['title'])

        description = info.get('description') or info.get(
            'program', {}).get('description') or description

        return {
            'id': video_id,
            'display_id': display_id,
            'title': info['title'],
            'description': description,
            'thumbnail': info.get('image_url'),
            'duration': int_or_none(info.get('duration')),
            'age_limit': age_limit,
            'upload_date': upload_date,
            'formats': formats,
            'subtitles': subtitles,
            'chapters': chapters,
        }


class PBSKidsIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?pbskids\.org/video/[\w-]+/(?P<id>\d+)'
    _TESTS = [
        {
            'url': 'https://pbskids.org/video/molly-of-denali/3030407927',
            'md5': '1ded20a017cc6b53446238f1804ce4c7',
            'info_dict': {
                'id': '3030407927',
                'title': 'Bird in the Hand/Bye-Bye Birdie',
                'channel': 'molly-of-denali',
                'duration': 1540,
                'ext': 'mp4',
                'series': 'Molly of Denali',
                'description': 'md5:d006b2211633685d8ebc8d03b6d5611e',
                'categories': ['Episode'],
                'upload_date': '20190718',
            }
        },
        {
            'url': 'https://pbskids.org/video/plum-landing/2365205059',
            'md5': '92e5d189851a64ae1d0237a965be71f5',
            'info_dict': {
                'id': '2365205059',
                'title': 'Cooper\'s Favorite Place in Nature',
                'channel': 'plum-landing',
                'duration': 67,
                'ext': 'mp4',
                'series': 'Plum Landing',
                'description': 'md5:657e5fc4356a84ead1c061eb280ff05d',