]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/ceskatelevize.py
[extractor] Better error message for DRM (#729)
[yt-dlp.git] / yt_dlp / extractor / ceskatelevize.py
index b2ebfdadd7c7ccbc8d1e7fe856a211ab30252d1e..5e04d38a25ad27a58a24e9e9ba66831c8e480f08 100644 (file)
@@ -147,9 +147,6 @@ def _real_extract(self, url):
                 is_live = item.get('type') == 'LIVE'
                 formats = []
                 for format_id, stream_url in item.get('streamUrls', {}).items():
-                    if (not self.get_param('allow_unplayable_formats')
-                            and 'drmOnly=true' in stream_url):
-                        continue
                     if 'playerType=flash' in stream_url:
                         stream_formats = self._extract_m3u8_formats(
                             stream_url, playlist_id, 'mp4', 'm3u8_native',
@@ -158,6 +155,9 @@ def _real_extract(self, url):
                         stream_formats = self._extract_mpd_formats(
                             stream_url, playlist_id,
                             mpd_id='dash-%s' % format_id, fatal=False)
+                    if 'drmOnly=true' in stream_url:
+                        for f in stream_formats:
+                            f['has_drm'] = True
                     # See https://github.com/ytdl-org/youtube-dl/issues/12119#issuecomment-280037031
                     if format_id == 'audioDescription':
                         for f in stream_formats: