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

Code before:
        'info_dict': {
            'id': '8946969',
            'title': 'Karel Šiktanc: Černý jezdec, bílý kůň. Napínavá pohádka o tajemném přízraku',
        },
        'playlist_count': 1,
        'playlist': [{
            'info_dict': {
                'id': '10631121',
                'ext': 'm4a',
                'title': 'Karel Šiktanc: Černý jezdec, bílý kůň. Napínavá pohádka o tajemném přízraku',
                'description': 'Karel Šiktanc: Černý jezdec, bílý kůň',
                'duration': 2656,
                'artist': 'Tvůrčí skupina Drama a literatura',
                'channel_id': 'dvojka',
            },
        }],
        'params': {'skip_download': 'dash'},
    }]

    def _extract_video(self, entry):
        formats = []
        audio_id = entry['meta']['ga']['contentId']
        for audio in traverse_obj(entry, ('audioLinks', ..., {dict})):
            audio_url = audio.get('url')
            if not url_or_none(audio_url):
                continue
            ext = audio.get('variant')
            if ext == 'dash':
                formats.extend(self._extract_mpd_formats(
                    audio_url, audio_id, mpd_id=ext, fatal=False))
            elif ext == 'hls':
                formats.extend(self._extract_m3u8_formats(
                    audio_url, audio_id, 'm4a', m3u8_id=ext, fatal=False))
            else:
                formats.append({
                    'url': audio_url,
                    'ext': ext,
                    'format_id': ext,
                    'abr': int_or_none(audio.get('bitrate')),
                    'acodec': ext,
                    'vcodec': 'none',
                })

        chapter_number = traverse_obj(entry, ('meta', 'ga', 'contentSerialPart', {int_or_none}))

        return {
            'id': audio_id,
            'chapter': traverse_obj(entry, ('meta', 'ga', 'contentNameShort')) if chapter_number else None,
            'chapter_number': chapter_number,
            'formats': formats,
            **traverse_obj(entry, {

Review comment (suggestion):
```suggestion
        audio_id = entry['meta']['ga']['contentId']
        for audio in traverse_obj(entry, ('audioLinks', lambda _, v: url_or_none(v['url']))):
```

Code after:
        'info_dict': {
            'id': '8946969',
            'title': 'Karel Šiktanc: Černý jezdec, bílý kůň. Napínavá pohádka o tajemném přízraku',
        },
        'playlist_count': 1,
        'playlist': [{
            'info_dict': {
                'id': '10631121',
                'ext': 'm4a',
                'title': 'Karel Šiktanc: Černý jezdec, bílý kůň. Napínavá pohádka o tajemném přízraku',
                'description': 'Karel Šiktanc: Černý jezdec, bílý kůň',
                'duration': 2656,
                'artist': 'Tvůrčí skupina Drama a literatura',
                'channel_id': 'dvojka',
            },
        }],
        'params': {'skip_download': 'dash'},
    }]

    def _extract_video(self, entry):
        formats = []
        audio_id = entry['meta']['ga']['contentId']
        for audio in traverse_obj(entry, ('audioLinks', lambda _, v: url_or_none(v['url']))):
            ext = audio.get('variant')
            if ext == 'dash':
                formats.extend(self._extract_mpd_formats(
                    audio['url'], audio_id, mpd_id=ext, fatal=False))
            elif ext == 'hls':
                formats.extend(self._extract_m3u8_formats(
                    audio['url'], audio_id, 'm4a', m3u8_id=ext, fatal=False))
            else:
                formats.append({
                    'url': audio['url'],
                    'ext': ext,
                    'format_id': ext,
                    'abr': int_or_none(audio.get('bitrate')),
                    'acodec': ext,
                    'vcodec': 'none',
                })

        chapter_number = traverse_obj(entry, ('meta', 'ga', 'contentSerialPart', {int_or_none}))

        return {
            'id': audio_id,
            'chapter': traverse_obj(entry, ('meta', 'ga', 'contentNameShort')) if chapter_number else None,
            'chapter_number': chapter_number,
            'formats': formats,
            **traverse_obj(entry, {
                'title': ('meta', 'ga', 'contentName'),
                'description': 'title',
                'duration': ('duration', {int_or_none}),