Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ThePlatform] [CWTV] - This format is DRM protected #9935

Open
10 of 11 tasks
krandor opened this issue May 16, 2024 · 2 comments
Open
10 of 11 tasks

[ThePlatform] [CWTV] - This format is DRM protected #9935

krandor opened this issue May 16, 2024 · 2 comments
Labels
DRM The referred content is DRM protected patch-available There is patch available that should fix this issue. Someone needs to make a PR with it site-bug Issue with a specific website

Comments

@krandor
Copy link

krandor commented May 16, 2024

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

United States

Provide a description that is worded well enough to be understood

Started getting this for Walker on CW today. Is there anything to be done to get around it or is CW just the latest in the string of streaming sites that are adopting DRM?

Using --check-formats rolls through all the available formats and fails for the same reason.

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', '--format', 'best', 'https://www.cwtv.com/shows/walker/hold-me-now/?play=fffc5964-0ca4-496f-9fcc-447f21c4087c']
[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@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (zip)
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-5.15.0-105-generic-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.07.22, mutagen-1.46.0, pyxattr-0.7.2, requests-2.25.1, secretstorage-3.3.1, sqlite3-3.37.2, urllib3-1.26.5, websockets-11.0.3
[debug] Proxy map: {}
[debug] Request Handlers: urllib
WARNING: "-f best" selects the best pre-merged format which is often not the best option.
         To let yt-dlp download and merge the best available formats, simply do not pass any format selection.
         If you know what you are doing and want only the best pre-merged format, use "-f b" instead to suppress this warning
[debug] Loaded 1803 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[CWTV] Extracting URL: https://www.cwtv.com/shows/walker/hold-me-now/?play=fffc5964-0ca4-496f-9fcc-447f21c4087c
[CWTV] fffc5964-0ca4-496f-9fcc-447f21c4087c: Downloading JSON metadata
[ThePlatform] Extracting URL: http://link.theplatform.com/s/cwtv/media/guid/2703454149/fffc5964-0ca4-496f-9fcc-447f21c4087c?format=SMIL&formats=M3U&tracking=true&mbr=false#__youtubedl_smuggle=%7B%22force_smil_url%22%3A+true%7D
[ThePlatform] fffc5964-0ca4-496f-9fcc-447f21c4087c: Downloading SMIL data
[ThePlatform] fffc5964-0ca4-496f-9fcc-447f21c4087c: Downloading m3u8 information
[ThePlatform] fffc5964-0ca4-496f-9fcc-447f21c4087c: Downloading JSON metadata
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[info] fffc5964-0ca4-496f-9fcc-447f21c4087c: Downloading 1 format(s): hls-8327
[debug] Invoking hlsnative downloader on "https://stream-hls.cwtv.com/nosec/The_CW/462/109/210936901640/Walker-407-HoldMeNow-P407-CW_210936389872_m3u8_video_1920x1080_8000000_primary_audio_eng_xb3d9c325944044f780ed92751a3a5331_8.m3u8"
[hlsnative] Downloading m3u8 manifest
ERROR: This format is DRM protected; Try selecting another format with --format or add --check-formats to automatically fallback to the next best format
@krandor krandor added site-bug Issue with a specific website triage Untriaged issue labels May 16, 2024
@bashonly
Copy link
Member

The only thing we can do is detect it earlier and raise before the download stage

diff --git a/yt_dlp/extractor/cwtv.py b/yt_dlp/extractor/cwtv.py
index 69d50daf6..ad0fa76a1 100644
--- a/yt_dlp/extractor/cwtv.py
+++ b/yt_dlp/extractor/cwtv.py
@@ -74,6 +74,8 @@ def _real_extract(self, url):
         if data.get('result') != 'ok':
             raise ExtractorError(data['msg'], expected=True)
         video_data = data['video']
+        if video_data.get('mpx_drm') == 1:
+            self.report_drm(video_id)
         title = video_data['title']
         mpx_url = video_data.get('mpx_url') or 'http://link.theplatform.com/s/cwtv/media/guid/2703454149/%s?formats=M3U' % video_id
 

@bashonly bashonly added DRM The referred content is DRM protected and removed triage Untriaged issue labels May 16, 2024
@krandor
Copy link
Author

krandor commented May 16, 2024

that's a shame, thanks for the research!

@pukkandan pukkandan added the patch-available There is patch available that should fix this issue. Someone needs to make a PR with it label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DRM The referred content is DRM protected patch-available There is patch available that should fix this issue. Someone needs to make a PR with it site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests

3 participants