mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-28 03:25:52 +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_iso8601,
|
||||||
parse_qs,
|
parse_qs,
|
||||||
qualities,
|
qualities,
|
||||||
|
remove_end,
|
||||||
remove_start,
|
remove_start,
|
||||||
smuggle_url,
|
smuggle_url,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
@ -4461,6 +4462,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
self.raise_geo_restricted(subreason, countries, metadata_available=True)
|
self.raise_geo_restricted(subreason, countries, metadata_available=True)
|
||||||
reason += f'. {subreason}'
|
reason += f'. {subreason}'
|
||||||
if reason:
|
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)
|
self.raise_no_formats(reason, expected=True)
|
||||||
|
|
||||||
keywords = get_first(video_details, 'keywords', expected_type=list) or []
|
keywords = get_first(video_details, 'keywords', expected_type=list) or []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user