mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-06 08:53:49 +00:00
Actually improve "sign in" error messages
Authored by: bashonly
This commit is contained in:
parent
a201e444b6
commit
b338b39244
@ -50,6 +50,7 @@ from ..utils import (
|
||||
parse_iso8601,
|
||||
parse_qs,
|
||||
qualities,
|
||||
remove_end,
|
||||
remove_start,
|
||||
smuggle_url,
|
||||
str_or_none,
|
||||
@ -4461,6 +4462,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
self.raise_geo_restricted(subreason, countries, metadata_available=True)
|
||||
reason += f'. {subreason}'
|
||||
if reason:
|
||||
if 'sign in' in reason.lower():
|
||||
reason = remove_end(reason, ' This helps protect our community. Learn more')
|
||||
reason = f'{remove_end(reason.strip(), ".")}. {self._youtube_login_hint}'
|
||||
self.raise_no_formats(reason, expected=True)
|
||||
|
||||
keywords = get_first(video_details, 'keywords', expected_type=list) or []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user