ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.3k stars 10.03k forks source link

Tele5 support doesn't work anymore. #31506

Open hjschmidt99 opened 1 year ago

hjschmidt99 commented 1 year ago

Checklist

Verbose log

youtube-dl.exe --verbose --ffmpeg-location "D:\Programme\ffmpeg\bin\ffmpeg.exe" -o "El Dorado - Der Tempel der Sonne" -f bestvideo+bestaudio "https://tele5.de/mediathek/el-dorado-der-tempel-der-sonne/"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--ffmpeg-location', 'D:\\Programme\\ffmpeg\\bin\\ffmpeg.exe', '-o', 'El Dorado - Der Tempel der Sonne', '-f', 'bestvideo+bestaudio', 'https://tele5.de/mediathek/el-dorado-der-tempel-der-sonne/']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.8.3 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 2022-04-25-git-f2724d2b69-full_build-www.gyan.dev, ffprobe 2022-04-25-git-f2724d2b69-full_build-www.gyan.dev
[debug] Proxy map: {}
[debug] Using fake IP 53.205.124.102 (DE) as X-Forwarded-For.
[Tele5] el-dorado-der-tempel-der-sonne: Downloading webpage
[Tele5] 4102908: Downloading token
[Tele5] 4102908: Downloading JSON metadata
[Tele5] 4102908: Downloading JSON metadata
[Tele5] 4102908: Downloading MPD manifest
WARNING: [Tele5] Unknown MIME type image/jpeg in DASH manifest
[Tele5] 4102908: Downloading m3u8 information
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "c:\users\hjs1\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 816, in wrapper
    return func(self, *args, **kwargs)
  File "c:\users\hjs1\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 837, in __extract_info
    ie_result = ie.extract(url)
  File "c:\users\hjs1\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "c:\users\hjs1\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\tele5.py", line 88, in _real_extract
    return self._get_disco_api_info(url, asset_id, endpoint, realm, country)
  File "c:\users\hjs1\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\dplay.py", line 244, in _get_disco_api_info
    self._sort_formats(formats)
  File "c:\users\hjs1\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\extractor\common.py", line 1374, in _sort_formats
    raise ExtractorError('No video formats found')
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

Tele5 (https://tele5.de/mediathek/) support doesn't work anymore. A file that I could download successfully 10 days ago now also shows this error. AFAIK ytdl handles Tele5 like other sites from the Discovery family. DRM related problems caused "ERROR: Missing deviceId in context" (and still do), so I guess it's something else...

dirkf commented 1 year ago

Unfortunately not. These are your manifests as returned by the Discovery API:

[{'type': 'dash',
  'url': 'https://dplaydk-prod-vod.akamaized.net/b71b98e1-34aa-4d37-9a3b-90af6e2a49f0/dash_widevinePlayready_fmp4/hdntl=exp=1675180191~acl=/b71b98e1-34aa-4d37-9a3b-90af6e2a49f0/dash_widevinePlayready_fmp4/*~data=hdntl~hmac=de473f28bfb3adbb06646783e40c3058399408bb69b60bcb93f918a636851b82/master.mpd'},
 {'type': 'hls',
  'url': 'https://dplaydk-prod-vod.akamaized.net/b71b98e1-34aa-4d37-9a3b-90af6e2a49f0/hls_fairPlay_ts/hdntl=exp=1675180191~acl=/b71b98e1-34aa-4d37-9a3b-90af6e2a49f0/hls_fairPlay_ts/*~data=hdntl~hmac=46ed2c3203ed5f988afafe1f78e2dc2bcda2e71aaddb5e42a103b2515281d1f9/master.m3u8'}]

The presence of widevine and fairPlay in the URLs indicates DRM.

After this patch:

--- old/youtube_dl/extractor/dplay.py
+++ new/youtube_dl/extractor/dplay.py
@@ -213,6 +213,7 @@
         info = video['data']['attributes']
         title = info['name'].strip()
         formats = []
+        drm = 0
         try:
             streaming = self._download_video_playback_info(
                 disco_base, video_id, headers)
@@ -226,6 +227,8 @@
             format_url = format_dict.get('url')
             if not format_url:
                 continue
+            if any(bastardy in format_url for bastardy in ('widevine', 'fairPlay')):
+                drm += 1
             format_id = format_dict.get('type')
             ext = determine_ext(format_url)
             if format_id == 'dash' or ext == 'mpd':
@@ -241,6 +244,8 @@
                     'url': format_url,
                     'format_id': format_id,
                 })
+        if drm > 0 and not formats:
+            raise ExtractorError('No formats without DRM were found', expected=True)
         self._sort_formats(formats)

         creator = series = None

Then

$ python -m youtube_dl -v -F 'https://tele5.de/mediathek/el-dorado-der-tempel-der-sonne/'
[debug] System config: [u'--prefer-ffmpeg']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://tele5.de/mediathek/el-dorado-der-tempel-der-sonne/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: 774b346f9
[debug] Python version 2.7.18 (CPython) - Linux-4.4.0-210-generic-i686-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[debug] Using fake IP 53.155.119.178 (DE) as X-Forwarded-For.
[Tele5] el-dorado-der-tempel-der-sonne: Downloading webpage
[Tele5] 4102908: Downloading token
[Tele5] 4102908: Downloading JSON metadata
[Tele5] 4102908: Downloading JSON metadata
[Tele5] 4102908: Downloading MPD manifest
WARNING: [Tele5] Unknown MIME type image/jpeg in DASH manifest
[Tele5] 4102908: Downloading m3u8 information
ERROR: No formats without DRM were found
Traceback (most recent call last):
  File "youtube_dl/YoutubeDL.py", line 832, in wrapper
    return func(self, *args, **kwargs)
  File "youtube_dl/YoutubeDL.py", line 853, in __extract_info
    ie_result = ie.extract(url)
  File "youtube_dl/extractor/common.py", line 539, in extract
    ie_result = self._real_extract(url)
  File "youtube_dl/extractor/tele5.py", line 88, in _real_extract
    return self._get_disco_api_info(url, asset_id, endpoint, realm, country)
  File "youtube_dl/extractor/dplay.py", line 248, in _get_disco_api_info
    raise ExtractorError('No formats without DRM were found', expected=True)
ExtractorError: No formats without DRM were found

$
dirkf commented 1 year ago

The site is now offering a JS single-page app that is completely unsupported by the existing extractor. Time to set _WORKING = False.