yt-dlp: tele5 - new video player "hyogaplayer.com" not supported - not DRM issue

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

Germany

Provide a description that is worded well enough to be understood

tele5 is using a new video player “hyogaplayer.com”, which is not recognized by yt-dlp extractor.

The videos are NOT DRM protected. Tested by switching off the DRM support in Firefox (Settings -> General -> Play DRM-controlled content -> off). Video is played without problems in browser.

Example video: https://tele5.de/mediathek/star-trek-enterprise/in-guter-hoffnung

Tested for the following series (doesn’t represent all available series):

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU', 'https://tele5.de/mediathek/star-trek-enterprise/aufbruch-ins-unbekannte-teil-1']
[debug] User config "/home/REDACTED/.config/yt-dlp/config": ['-o', '~/REDACTED/%(title)s.%(ext)s']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481]
[debug] Python 3.11.3 (CPython x86_64 64bit) - Linux-6.1.44-1-MANJARO-x86_64-with-glibc2.38 (OpenSSL 3.1.2 1 Aug 2023, glibc 2.38)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0, rtmpdump 2.4
[debug] Optional libraries: certifi-2023.07.22, mutagen-1.46.0, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.07.06, Current version: stable@2023.07.06
yt-dlp is up to date (stable@2023.07.06)
[debug] Using fake IP 53.151.23.150 (DE) as X-Forwarded-For
[Tele5] Extracting URL: https://tele5.de/mediathek/star-trek-enterprise/aufbruch-ins-unbekannte-teil-1
[Tele5] aufbruch-ins-unbekannte-teil-1: Downloading webpage
ERROR: [Tele5] aufbruch-ins-unbekannte-teil-1: Unable to extract video player; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "/usr/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 710, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/yt_dlp/extractor/tele5.py", line 76, in _real_extract
    player_element = self._search_regex(r'(<hyoga-player\b[^>]+?>)', webpage, 'video player')
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1258, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)

About this issue

  • Original URL
  • State: open
  • Created 10 months ago
  • Reactions: 1
  • Comments: 15 (4 by maintainers)

Most upvoted comments

The extractor needs a complete rewrite, and some DiscoveryPlusBaseIE changes are needed as well (as noted in #7530). I don’t have enough example URLs to properly PR this (all of the extractor tests are dead), but it would go something like this:

diff --git a/yt_dlp/extractor/dplay.py b/yt_dlp/extractor/dplay.py
index 363b4bec9..ec2f42f15 100644
--- a/yt_dlp/extractor/dplay.py
+++ b/yt_dlp/extractor/dplay.py
@@ -355,12 +355,10 @@ def _download_video_playback_info(self, disco_base, video_id, headers):
             video_id, headers=headers, data=json.dumps({
                 'deviceInfo': {
                     'adBlocker': False,
+                    'drmSupported': False,
                 },
                 'videoId': video_id,
-                'wisteriaProperties': {
-                    'platform': 'desktop',
-                    'product': self._PRODUCT,
-                },
+                'wisteriaProperties': {},
             }).encode('utf-8'))['data']['attributes']['streaming']
 
     def _real_extract(self, url):
diff --git a/yt_dlp/extractor/tele5.py b/yt_dlp/extractor/tele5.py
index 9260db2b4..29e9d7813 100644
--- a/yt_dlp/extractor/tele5.py
+++ b/yt_dlp/extractor/tele5.py
@@ -1,88 +1,39 @@
-from .dplay import DPlayIE
-from ..compat import compat_urlparse
-from ..utils import (
-    ExtractorError,
-    extract_attributes,
-)
+from .dplay import DiscoveryPlusBaseIE
+from ..utils import ExtractorError
+from ..utils.traversal import traverse_obj
 
 
-class Tele5IE(DPlayIE):  # XXX: Do not subclass from concrete IE
-    _VALID_URL = r'https?://(?:www\.)?tele5\.de/(?:[^/]+/)*(?P<id>[^/?#&]+)'
-    _GEO_COUNTRIES = ['DE']
-    _TESTS = [{
-        'url': 'https://www.tele5.de/mediathek/filme-online/videos?vid=1549416',
-        'info_dict': {
-            'id': '1549416',
-            'ext': 'mp4',
-            'upload_date': '20180814',
-            'timestamp': 1534290623,
-            'title': 'Pandorum',
-        },
-        'params': {
-            'skip_download': True,
-        },
-        'skip': 'No longer available: "404 Seite nicht gefunden"',
-    }, {
-        # jwplatform, nexx unavailable
-        'url': 'https://www.tele5.de/filme/ghoul-das-geheimnis-des-friedhofmonsters/',
-        'info_dict': {
-            'id': 'WJuiOlUp',
-            'ext': 'mp4',
-            'upload_date': '20200603',
-            'timestamp': 1591214400,
-            'title': 'Ghoul - Das Geheimnis des Friedhofmonsters',
-            'description': 'md5:42002af1d887ff3d5b2b3ca1f8137d97',
-        },
-        'params': {
-            'skip_download': True,
-        },
-        'skip': 'No longer available, redirects to Filme page',
-    }, {
-        'url': 'https://tele5.de/mediathek/angel-of-mine/',
-        'info_dict': {
-            'id': '1252360',
-            'ext': 'mp4',
-            'upload_date': '20220109',
-            'timestamp': 1641762000,
-            'title': 'Angel of Mine',
-            'description': 'md5:a72546a175e1286eb3251843a52d1ad7',
-        },
-        'params': {
-            'format': 'bestvideo',
-        },
-    }, {
-        'url': 'https://www.tele5.de/kalkofes-mattscheibe/video-clips/politik-und-gesellschaft?ve_id=1551191',
-        'only_matching': True,
-    }, {
-        'url': 'https://www.tele5.de/video-clip/?ve_id=1609440',
-        'only_matching': True,
-    }, {
-        'url': 'https://www.tele5.de/filme/schlefaz-dragon-crusaders/',
-        'only_matching': True,
-    }, {
-        'url': 'https://www.tele5.de/filme/making-of/avengers-endgame/',
-        'only_matching': True,
-    }, {
-        'url': 'https://www.tele5.de/star-trek/raumschiff-voyager/ganze-folge/das-vinculum/',
-        'only_matching': True,
-    }, {
-        'url': 'https://www.tele5.de/anders-ist-sevda/',
-        'only_matching': True,
-    }]
+class Tele5IE(DiscoveryPlusBaseIE):
+    _VALID_URL = r'https?://(?:www\.)?tele5\.de/(?P<parent_slug>[\w-]+)/(?P<slug_a>[\w-]+)(?:/(?P<slug_b>[\w-]+))?'
 
     def _real_extract(self, url):
-        video_id = self._match_id(url)
-        webpage = self._download_webpage(url, video_id)
-        player_element = self._search_regex(r'(<hyoga-player\b[^>]+?>)', webpage, 'video player')
-        player_info = extract_attributes(player_element)
-        asset_id, country, realm = (player_info[x] for x in ('assetid', 'locale', 'realm', ))
-        endpoint = compat_urlparse.urlparse(player_info['endpoint']).hostname
-        source_type = player_info.get('sourcetype')
-        if source_type:
-            endpoint = '%s-%s' % (source_type, endpoint)
-        try:
-            return self._get_disco_api_info(url, asset_id, endpoint, realm, country)
-        except ExtractorError as e:
-            if getattr(e, 'message', '') == 'Missing deviceId in context':
-                self.report_drm(video_id)
-            raise
+        parent_slug, slug_a, slug_b = self._match_valid_url(url).group('parent_slug', 'slug_a', 'slug_b')
+
+        if not slug_b:
+            cms_data = self._download_json(
+                f'https://de-api.loma-cms.com/feloma/page/{slug_a}/', slug_a, query={
+                    'environment': 'tele5',
+                    'parent_slug': parent_slug,
+                    'v': '2',
+                })
+        else:
+            cms_data = self._download_json(
+                f'https://de-api.loma-cms.com/feloma/videos/{slug_b}/', slug_b, query={
+                    'filter[show.slug]': slug_a,
+                    'environment': 'tele5',
+                    'v': '2',
+                })
+
+        video_id = traverse_obj(cms_data, ('blocks', ..., 'videoId'), get_all=False)
+        if not video_id:
+            raise ExtractorError('Unable to extract video id')
+
+        return self._get_disco_api_info(
+            url, video_id, 'eu1-prod.disco-api.com', 'dmaxde', 'DE')
+
+    def _update_disco_api_headers(self, headers, disco_base, display_id, realm):
+        headers.update({
+            'x-disco-params': 'realm=%s' % realm,
+            'x-disco-client': 'Alps:HyogaPlayer:0.0.0',
+            'Authorization': self._get_auth(disco_base, display_id, realm),
+        })

@bashonly, an additional hint : “https://dmax.de/sendungen/goldrausch-in-alaska/vom-kind-zum-konkurrenten

DMAX does also work again with the given patched build !

As example : “https://tele5.de/mediathek/star-trek-enterprise/im-schatten-von-pjem”, patched build did work “https://tele5.de/mediathek/pakt-der-rache”, patched build did work

@bashonly , well done !