mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 07:28:19 +01:00
Simplify login error check
This commit is contained in:
parent
8e01382707
commit
8f0d32fa83
|
@ -445,7 +445,7 @@ def _perform_login(self, username, password):
|
|||
try:
|
||||
login_results = self._download_webpage(request, None,
|
||||
note='Logging in', errnote='unable to fetch login page')
|
||||
if self._html_search_regex(r'(Your Request Couldn\'t be Processed)', login_results, 'request error', default=None) is not None:
|
||||
if "Your Request Couldn" in login_results:
|
||||
raise ExtractorError('Failed to perform login request.')
|
||||
|
||||
if re.search(r'<form(.*)name="login"(.*)</form>', login_results) is not None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user