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

Code before:
        'url': 'https://dmax.de/sendungen/feuerwache-3-alarm-in-muenchen/24-stunden-auf-der-feuerwache-3',
        'info_dict': {
            'id': '8873549',
            'ext': 'mp4',
            'title': '24 Stunden auf der Feuerwache 3',
            'description': 'md5:f3084ef6170bfb79f9a6e0c030e09330',
            'display_id': '8873549',
            'episode': 'Episode 1',
            'episode_number': 1,
            'season': 'Season 1',
            'season_number': 1,
            'series': 'Feuerwache 3 - Alarm in München',
            'duration': 2632.0,
            'upload_date': '20251016',
            'timestamp': 1760645100,
            'creators': ['DMAX'],
            'thumbnail': 'https://eu1-prod-images.disco-api.com/2025/10/14/0bdee68c-a8d8-33d9-9204-16eb61108552.jpeg',
            'tags': [],
        },
        'params': {'skip_download': 'm3u8'},
    }]

    def _real_extract(self, url):
        domain, programme, alternate_id = self._match_valid_url(url).groups()
        country = 'GB' if domain == 'dplay.co.uk' else 'DE'
        realm = 'questuk' if country == 'GB' else domain.replace('.', '')
        meta = self._download_json(
            f'https://de-api.loma-cms.com/feloma/videos/{alternate_id}/',
            alternate_id, query={
                'environment': 'dmax',
                'v': '2',
                'filter[show.slug]': programme,
            }, fatal=False)
        video_id = traverse_obj(meta, ('uid', {str}, {lambda s: s[-7:]})) or f'{programme}/{alternate_id}'

        return self._get_disco_api_info(
            url, video_id, 'eu1-prod.disco-api.com', realm, country)

    def _update_disco_api_headers(self, headers, disco_base, display_id, realm):
        headers.update({
            'x-disco-params': f'realm={realm}',
            'x-disco-client': 'Alps:HyogaPlayer:0.0.0',
            'Authorization': self._get_auth(disco_base, display_id, realm),
        })


class DiscoveryPlusShowBaseIE(DPlayBaseIE):

    def _entries(self, show_name):
        headers = {
            'x-disco-client': self._X_CLIENT,

Review comment (bug):
dplay.co.uk no longer exists (DNS error).
```suggestion
        realm = domain.replace('.', '')
```
and earlier
```diff
-    _VALID_URL = r'https?://(?:www\.)?(?P<domain>(?:tlc|dmax)\.de|dplay\.co\.uk)/(?:programme|show|sendungen)/(?P<programme>[^/]+)/(?:video/)?(?P<alternate_id>[^/]+)'
+    _VALID_URL = r'https?://(?:www\.)?(?P<domain>(?:tlc|dmax)\.de)/(?:programme|show|sendungen)/(?P<programme>[^/]+)/(?:video/)?(?P<alternate_id>[^/]+)'
```
This URL works with TLC so that should still match:
https://tlc.de/sendungen/evil-gesichter-des-boesen/der-perfide-prophet

It gives a warning because the new API call fails. Maybe that case should be discriminated with `default=None if domain.startswith('tlc') else NO_DEFAULT` ?

Code after:
            'id': '8873549',
            'ext': 'mp4',
            'title': '24 Stunden auf der Feuerwache 3',
            'description': 'md5:f3084ef6170bfb79f9a6e0c030e09330',
            'display_id': '24-stunden-auf-der-feuerwache-3',
            'episode': 'Episode 1',
            'episode_number': 1,
            'season': 'Season 1',
            'season_number': 1,
            'series': 'Feuerwache 3 - Alarm in München',
            'duration': 2632.0,
            'upload_date': '20251016',
            'timestamp': 1760645100,
            'creators': ['DMAX'],
            'thumbnail': 'https://eu1-prod-images.disco-api.com/2025/10/14/0bdee68c-a8d8-33d9-9204-16eb61108552.jpeg',
            'tags': [],
            'categories': ['DMAX Originals', 'Jobs', 'Blaulicht'],
        },
        'params': {'skip_download': 'm3u8'},
    }, {
        'url': 'https://tlc.de/sendungen/ghost-adventures/der-poltergeist-im-kostumladen',
        'info_dict': {
            'id': '4550602',
            'ext': 'mp4',
            'title': 'Der Poltergeist im Kostümladen',
            'description': 'md5:20b52b9736a0a3a7873d19a238fad7fc',
            'display_id': 'der-poltergeist-im-kostumladen',
            'episode': 'Episode 1',
            'episode_number': 1,
            'season': 'Season 25',
            'season_number': 25,
            'series': 'Ghost Adventures',
            'duration': 2493.0,
            'upload_date': '20241223',
            'timestamp': 1734948900,
            'creators': ['TLC'],
            'thumbnail': 'https://eu1-prod-images.disco-api.com/2023/04/05/59941d26-a81b-365f-829f-69d8cd81fd0f.jpeg',
            'tags': [],
            'categories': ['Paranormal', 'Gruselig!'],
        },
        'params': {'skip_download': 'm3u8'},
    }, {
        'url': 'https://tlc.de/sendungen/evil-gesichter-des-boesen/das-geheimnis-meines-bruders',
        'info_dict': {
            'id': '7792288',
            'ext': 'mp4',
            'title': 'Das Geheimnis meines Bruders',
            'description': 'md5:3167550bb582eb9c92875c86a0a20882',
            'display_id': 'das-geheimnis-meines-bruders',
            'episode': 'Episode 1',
            'episode_number': 1,