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

Code before:
            })

        thumbnail = None
        tn_uri = season_info.get('image')
        # the-national was observed to use a "data:image/png;base64"
        # URI for their 'image' value. The image was 1x1, and is
        # probably just a placeholder, so it is ignored.
        if tn_uri is not None and not tn_uri.startswith('data:'):
            thumbnail = tn_uri

        return {
            '_type': 'playlist',
            'entries': episodes,
            'id': season_id,
            'title': season_info['title'],
            'description': season_info.get('description'),
            'thumbnail': thumbnail,
            'series': show_info.get('title'),
            'season_number': season_info.get('season'),
            'season': season_info['title'],
        }


class CBCGemLiveIE(InfoExtractor):
    IE_NAME = 'gem.cbc.ca:live'
    _VALID_URL = r'https?://gem\.cbc\.ca/live/(?P<id>[0-9]*)'
    _TEST = {
        'url': 'https://gem.cbc.ca/live/920604739687',
        'info_dict': {
            'title': 'Ottawa',
            'description': 'The live TV channel and local programming from Ottawa',
            'thumbnail': 'https://thumbnails.cbc.ca/maven_legacy/thumbnails/CBC_OTT_VMS/Live_Channel_Static_Images/Ottawa_2880x1620.jpg',
            'is_live': True,
            'id': 'AyqZwxRqh8EH',
            'ext': 'mp4',
            'timestamp': 1492106160,
            'upload_date': '20170413',
            'uploader': 'CBCC-NEW',
        },
        'skip': 'Live might have ended',
    }

    # It's unclear where the chars at the end come from, but they appear to be
    # constant. Might need updating in the future.
    # There are two URLs, some livestreams are in one, and some
    # in the other. The JSON schema is the same for both.
    _API_URLS = ['https://tpfeed.cbc.ca/f/ExhSPC/t_t3UKJR6MAT', 'https://tpfeed.cbc.ca/f/ExhSPC/FNiv9xQx_BnT']

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


Review comment (suggestion):
```suggestion
    _VALID_URL = r'https?://gem\.cbc\.ca/live/(?P<id>\d+)'
```

Also, add a test for where the old valid_url dont match

Code after:
            })

        thumbnail = None
        tn_uri = season_info.get('image')
        # the-national was observed to use a "data:image/png;base64"
        # URI for their 'image' value. The image was 1x1, and is
        # probably just a placeholder, so it is ignored.
        if tn_uri is not None and not tn_uri.startswith('data:'):
            thumbnail = tn_uri

        return {
            '_type': 'playlist',
            'entries': episodes,
            'id': season_id,
            'title': season_info['title'],
            'description': season_info.get('description'),
            'thumbnail': thumbnail,
            'series': show_info.get('title'),
            'season_number': season_info.get('season'),
            'season': season_info['title'],
        }


class CBCGemLiveIE(InfoExtractor):
    IE_NAME = 'gem.cbc.ca:live'
    _VALID_URL = r'https?://gem\.cbc\.ca/live/(?P<id>\d+)'
    _TEST = {
        'url': 'https://gem.cbc.ca/live/920604739687',
        'info_dict': {
            'title': 'Ottawa',
            'description': 'The live TV channel and local programming from Ottawa',
            'thumbnail': 'https://thumbnails.cbc.ca/maven_legacy/thumbnails/CBC_OTT_VMS/Live_Channel_Static_Images/Ottawa_2880x1620.jpg',
            'is_live': True,
            'id': 'AyqZwxRqh8EH',
            'ext': 'mp4',
            'timestamp': 1492106160,
            'upload_date': '20170413',
            'uploader': 'CBCC-NEW',
        },
        'skip': 'Live might have ended',
    }

    # It's unclear where the chars at the end come from, but they appear to be
    # constant. Might need updating in the future.
    # There are two URLs, some livestreams are in one, and some
    # in the other. The JSON schema is the same for both.
    _API_URLS = ['https://tpfeed.cbc.ca/f/ExhSPC/t_t3UKJR6MAT', 'https://tpfeed.cbc.ca/f/ExhSPC/FNiv9xQx_BnT']

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