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

Code before:

        def ninecninemedia_url_result(clip_id):
            return {
                '_type': 'url_transparent',
                'id': clip_id,
                'url': f'9c9media:ctvnews_web:{clip_id}',
                'ie_key': 'NineCNineMedia',
            }

        if page_id.isdigit():
            return ninecninemedia_url_result(page_id)
        else:
            webpage = self._download_webpage(f'http://www.ctvnews.ca/{page_id}', page_id, query={
                'ot': 'example.AjaxPageLayout.ot',
                'maxItemsPerPage': 1000000,
            })
            entries = [ninecninemedia_url_result(clip_id) for clip_id in orderedSet(
                re.findall(r'clip\.id\s*=\s*(\d+);', webpage))]
            if not entries:
                webpage = self._download_webpage(url, page_id)
                if 'getAuthStates("' in webpage:
                    entries = [ninecninemedia_url_result(clip_id) for clip_id in
                               self._search_regex(r'getAuthStates\("([\d+,]+)"', webpage, 'clip ids').split(',')]
                else:
                    entries = [ninecninemedia_url_result(clip_id) for clip_id in orderedSet(
                        re.findall(r'axisId&#34;:&#34;(\d+)', webpage))]
            return self.playlist_result(entries, page_id)


Review comment (suggestion):
```suggestion
                    entries = [ninecninemedia_url_result(clip_id)
                               for clip_id in orderedSet(re.findall(r'axisId&#34;:&#34;(\d+)', webpage))]
```

Code after:
        'info_dict':
        {
            'id': '1.2966224',
        },
        'playlist_mincount': 19,
    }, {
        'url': 'http://www.ctvnews.ca/video?binId=1.2876780',
        'info_dict':
        {
            'id': '1.2876780',
        },
        'playlist_mincount': 100,
    }, {
        'url': 'https://www.ctvnews.ca/it-s-been-23-years-since-toronto-called-in-the-army-after-a-major-snowstorm-1.5736957',
        'info_dict':
        {
            'id': '1.5736957',
        },
        'playlist_mincount': 6,
    }, {
        'url': 'https://www.ctvnews.ca/business/respondents-to-bank-of-canada-questionnaire-largely-oppose-creating-a-digital-loonie-1.6665797',
        'md5': '24bc4b88cdc17d8c3fc01dfc228ab72c',
        'info_dict': {
            'id': '2695026',
            'ext': 'flv',
            'season_id': '89852',
            'series': 'From CTV News Channel',
            'description': 'md5:796a985a23cacc7e1e2fafefd94afd0a',
            'season': '2023',
            'title': 'Bank of Canada asks public about digital currency',
            'categories': [],
            'tags': [],
            'upload_date': '20230526',
            'season_number': 2023,
            'thumbnail': 'http://images2.9c9media.com/image_asset/2019_3_28_35f5afc3-10f6-4d92-b194-8b9a86f55c6a_png_1920x1080.jpg',
            'timestamp': 1685105157,
            'duration': 253.553,
        },
    }, {
        'url': 'https://stox.ctvnews.ca/video-gallery?clipId=582589',
        'md5': '135cc592df607d29dddc931f1b756ae2',
        'info_dict': {
            'id': '582589',
            'ext': 'flv',
            'categories': [],
            'timestamp': 1427906183,
            'season_number': 0,
            'duration': 125.559,
            'thumbnail': 'http://images2.9c9media.com/image_asset/2019_3_28_35f5afc3-10f6-4d92-b194-8b9a86f55c6a_png_1920x1080.jpg',
            'series': 'CTV News Stox',
            'description': 'CTV original footage of the rise and fall of the Berlin Wall.',