From 68965e0a962b050d901de10605af8238074c3101 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Sun, 23 Jun 2024 18:01:53 +0200 Subject: [PATCH] [youtube] ask for cookies only if status is LOGIN_REQUIRED --- src/you_get/extractors/youtube.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/you_get/extractors/youtube.py b/src/you_get/extractors/youtube.py index a76e0d2e..82d271f0 100644 --- a/src/you_get/extractors/youtube.py +++ b/src/you_get/extractors/youtube.py @@ -211,7 +211,8 @@ class YouTube(VideoExtractor): log.e('[Error] %s (%s)' % (playabilityStatus['reason'], subreason)) except: log.e('[Error] %s' % playabilityStatus['reason']) - log.e('View the video from a browser and export the cookies, then use --cookies to load cookies.') + if status == 'LOGIN_REQUIRED': + log.e('View the video from a browser and export the cookies, then use --cookies to load cookies.') exit(1) stream_list = ytInitialPlayerResponse['streamingData']['formats']