mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-29 15:50:46 +00:00
[facebook] Extract login error
This commit is contained in:
parent
6c6b8bd5cc
commit
9f66931e16
1 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,11 @@ def _login(self):
|
||||||
login_results = self._download_webpage(request, None,
|
login_results = self._download_webpage(request, None,
|
||||||
note='Logging in', errnote='unable to fetch login page')
|
note='Logging in', errnote='unable to fetch login page')
|
||||||
if re.search(r'<form(.*)name="login"(.*)</form>', login_results) is not None:
|
if re.search(r'<form(.*)name="login"(.*)</form>', login_results) is not None:
|
||||||
|
error = self._html_search_regex(
|
||||||
|
r'(?s)<div[^>]+class=(["\']).*?login_error_box.*?\1[^>]*><div[^>]*>.*?</div><div[^>]*>(?P<error>.+?)</div>',
|
||||||
|
login_results, 'login error', default=None, group='error')
|
||||||
|
if error:
|
||||||
|
raise ExtractorError('Unable to login: %s' % error, expected=True)
|
||||||
self._downloader.report_warning('unable to log in: bad username/password, or exceded login rate limit (~3/min). Check credentials or wait.')
|
self._downloader.report_warning('unable to log in: bad username/password, or exceded login rate limit (~3/min). Check credentials or wait.')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue