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

Code before:

class ARDAudiothekIE(ARDAudiothekBaseIE):
    _VALID_URL = r'''(?x)https:?//
        (?:www\.)?ardaudiothek\.de/
        episode/
        (?P<id>urn:ard:(?:episode|section|extra):[a-f0-9]{16})/$'''

    _TESTS = [
        {
            'url': 'https://www.ardaudiothek.de/episode/urn:ard:episode:eabead1add170e93/',
            'info_dict': {
                'id': 'urn:ard:episode:eabead1add170e93',
                'ext': 'mp3',
                'upload_date': '20240717',
                'duration': 3339,
                'title': 'CAIMAN CLUB (S04E04): Cash Out',
                'thumbnail': 'https://api.ardmediathek.de/image-service/images/urn:ard:image:ed64411a07a4b405',
                'description': 'md5:0e5d127a3832ae59e8bab40a91a5dadc',
                'display_id': 'urn:ard:episode:eabead1add170e93',
                'timestamp': 1721181641,
                'series': '1LIVE Caiman Club',
                'channel': 'WDR',
                'episode': 'Episode 4',
                'episode_number': 4,
                'abr': 256,
                'acodec': 'MP3',
            },
        },
        {
            'url': 'https://www.ardaudiothek.de/episode/urn:ard:section:855c7a53dac72e0a/',
            'info_dict': {
                'id': 'urn:ard:section:855c7a53dac72e0a',
                'ext': 'mp4',
                'upload_date': '20241231',
                'duration': 3304,
                'title': 'Illegaler DDR-Detektiv: Doberschütz und die letzte Staatsjagd (1/2) - Wendezeit',
                'thumbnail': 'https://api.ardmediathek.de/image-service/images/urn:ard:image:b9b4f1e8b93da4dd',
                'description': 'md5:3552d571e1959754cff66c1da6c0fdae',
                'display_id': 'urn:ard:section:855c7a53dac72e0a',
                'timestamp': 1735629900,
                'series': 'Auf der Spur – Die ARD Ermittlerkrimis',
                'channel': 'ARD',
                'episode': 'Episode 1',
                'episode_number': 1,
                'abr': 192,
                'acodec': 'AAC',
            },
        },
        {
            'url': 'https://www.ardaudiothek.de/episode/urn:ard:extra:d2fe7303d2dcbf5d/',
            'info_dict': {

Review comment (suggestion):
These are not tested for when returning multiple formats
```suggestion
```

Code after:

    _TESTS = [{
        'url': 'https://www.ardaudiothek.de/episode/urn:ard:episode:eabead1add170e93/',
        'info_dict': {
            'id': 'urn:ard:episode:eabead1add170e93',
            'ext': 'mp3',
            'upload_date': '20240717',
            'duration': 3339,
            'title': 'CAIMAN CLUB (S04E04): Cash Out',
            'thumbnail': 'https://api.ardmediathek.de/image-service/images/urn:ard:image:ed64411a07a4b405',
            'description': 'md5:0e5d127a3832ae59e8bab40a91a5dadc',
            'display_id': 'urn:ard:episode:eabead1add170e93',
            'timestamp': 1721181641,
            'series': '1LIVE Caiman Club',
            'channel': 'WDR',
            'episode': 'Episode 4',
            'episode_number': 4,
        },
    }, {
        'url': 'https://www.ardaudiothek.de/episode/urn:ard:section:855c7a53dac72e0a/',
        'info_dict': {
            'id': 'urn:ard:section:855c7a53dac72e0a',
            'ext': 'mp4',
            'upload_date': '20241231',
            'duration': 3304,
            'title': 'Illegaler DDR-Detektiv: Doberschütz und die letzte Staatsjagd (1/2) - Wendezeit',
            'thumbnail': 'https://api.ardmediathek.de/image-service/images/urn:ard:image:b9b4f1e8b93da4dd',
            'description': 'md5:3552d571e1959754cff66c1da6c0fdae',
            'display_id': 'urn:ard:section:855c7a53dac72e0a',
            'timestamp': 1735629900,
            'series': 'Auf der Spur – Die ARD Ermittlerkrimis',
            'channel': 'ARD',
            'episode': 'Episode 1',
            'episode_number': 1,
        },
    }, {
        'url': 'https://www.ardaudiothek.de/episode/urn:ard:extra:d2fe7303d2dcbf5d/',
        'info_dict': {
            'id': 'urn:ard:extra:d2fe7303d2dcbf5d',
            'ext': 'mp3',
            'title': 'Trailer: Fanta Vier Forever, Baby!?!',
            'description': 'md5:b64a586f2e976b8bb5ea0a79dbd8751c',
            'channel': 'SWR',
            'duration': 62,
            'thumbnail': 'https://api.ardmediathek.de/image-service/images/urn:ard:image:48d3c255969be803',
            'series': 'Fanta Vier Forever, Baby!?!',
            'timestamp': 1732108217,
            'upload_date': '20241120',
        },
    }]