From 3bd982b8d82e95f4e7311bf42636a6036c663767 Mon Sep 17 00:00:00 2001 From: girst Date: Sun, 23 Apr 2023 15:54:08 +0000 Subject: [PATCH] watch: show error when video urls are scrambled/cyphered previously, we didn't show any error, and just displayed the poster image without playback functionality. example video: dqRZDebPIGs --- app/common/common.py | 3 +++ app/youtube/__init__.py | 1 + 2 files changed, 4 insertions(+) diff --git a/app/common/common.py b/app/common/common.py index 42a53a1..2114d08 100644 --- a/app/common/common.py +++ b/app/common/common.py @@ -296,8 +296,11 @@ def get_video_info(video_id, *, metaOnly=False, _agegate_bypass=False): url = None is_geolocked = False + is_drm = formats and 'signatureCipher' in formats[0] + nonfatal = 'livestream' if is_live \ else 'geolocked' if is_geolocked \ + else 'scrambled' if is_drm \ else None return url, stream_map, metadata, nonfatal, None diff --git a/app/youtube/__init__.py b/app/youtube/__init__.py index 11ccb61..e26b55c 100644 --- a/app/youtube/__init__.py +++ b/app/youtube/__init__.py @@ -101,6 +101,7 @@ def watch(): 'geolocked': f"This video is geolocked. {proxy_msg}", 'livestream': f"Livestreams disabled. {proxy_msg}", 'agegated': "Unable to bypass age-restriction.", + 'scrambled': "VEVO style cyphering not supported.", 'no-url': "No muxed stream available.", 'exhausted': errdetails or "Couldn't extract video URLs.", 'player': errdetails, -- 2.39.3