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

Code before:

    @classmethod
    def suitable(cls, url):
        return False if PolskieRadioLegacyIE.suitable(url) else super().suitable(url)

    def _entries(self, url, page, category_id):
        content = page
        is_billennium_tabs = 'onclick="TB_LoadTab(' in page
        is_post_back = 'onclick="__doPostBack(' in page
        pagination = page if is_billennium_tabs else None
        for page_num in itertools.count(2):
            for a_entry, entry_id in re.findall(
                    r'(?s)<article[^>]+>.*?(<a[^>]+href=["\'](?:(?:https?)?://[^/]+)?/\d+/\d+/Artykul/(\d+)[^>]+>).*?</article>',
                    content):
                entry = extract_attributes(a_entry)
                href = entry.get('href')
                if not href:
                    continue
                yield self.url_result(
                    compat_urlparse.urljoin(url, href), PolskieRadioLegacyIE,
                    entry_id, entry.get('title'))
            for a_entry in re.findall(r'<span data-media=({[^ ]+})', content):
                media = self._parse_json(a_entry, category_id)
                yield {
                    'url': media['file'],
                    'id': media.get('uid'),
                    'title': unquote(media.get('title')),
                    'description': unquote(media.get('desc')),
                    'duration': media.get('length'),
                }
            if is_billennium_tabs:
                mobj = re.search(
                    r'<div[^>]+class=["\']next["\'][^>]*>\s*<a[^>]+onclick=(["\'])TB_LoadTab\((?P<params>(?:(?!\1).)+)\);\1',
                    pagination)
                if not mobj:
                    break
                params = self._parse_json('[' + js_to_json(unescapeHTML(mobj.group('params'))) + ']', category_id)
                tab_content = self._download_json(
                    'https://www.polskieradio.pl/CMS/TemplateBoxesManagement/TemplateBoxTabContent.aspx/GetTabContent',
                    category_id, 'Downloading page %s' % page_num, data=json.dumps({
                        'tabId': params[1],
                        'boxInstanceId': params[0],
                        'sectionId': params[3],
                        'categoryId': params[4],
                        'categoryType': params[2],
                        'subjectIds': params[6],
                        'tagIndexId': params[7],
                        'queryString': params[8],
                        'name': params[9],
                        'pageNumber': page_num,
                        'pagerMode': params[5],

Review comment (suggestion):
```suggestion
                    'id': media['uid'],
```
id cant be None

Code after:
            'id': '214',
            'title': 'Muzyka',
        },
        'playlist_mincount': 61
    }, {
        # billennium tabs
        'url': 'https://www.polskieradio.pl/8/2385',
        'info_dict': {
            'id': '2385',
            'title': 'Droga przez mąkę',
        },
        'playlist_mincount': 111,
    }, {
        'url': 'https://www.polskieradio.pl/10/4930',
        'info_dict': {
            'id': '4930',
            'title': 'Teraz K-pop!',
        },
        'playlist_mincount': 392,
    }, {
        # post back pages, audio content directly without articles
        'url': 'https://www.polskieradio.pl/8,dwojka/7376,nowa-mowa',
        'info_dict': {
            'id': '7376',
            'title': 'Nowa mowa',
        },
        'playlist_mincount': 244,
    }, {
        'url': 'https://www.polskieradio.pl/Krzysztof-Dziuba/Tag175458',
        'info_dict': {
            'id': '175458',
            'title': 'Krzysztof Dziuba',
        },
        'playlist_mincount': 420,
    }, {
        'url': 'http://www.polskieradio.pl/8,Dwojka/196,Publicystyka',
        'only_matching': True,
    }]

    @classmethod
    def suitable(cls, url):
        return False if PolskieRadioLegacyIE.suitable(url) else super().suitable(url)

    def _entries(self, url, page, category_id):
        content = page
        is_billennium_tabs = 'onclick="TB_LoadTab(' in page
        is_post_back = 'onclick="__doPostBack(' in page
        pagination = page if is_billennium_tabs else None
        for page_num in itertools.count(2):
            for a_entry, entry_id in re.findall(
                    r'(?s)<article[^>]+>.*?(<a[^>]+href=["\'](?:(?:https?)?://[^/]+)?/\d+/\d+/Artykul/(\d+)[^>]+>).*?</article>',