Skip to content

Commit

Permalink
[animeondemand] Relax login error regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey M․ committed Dec 19, 2017
1 parent 78466fc commit 17c3ace
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube_dl/extractor/animeondemand.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def _login(self):

if all(p not in response for p in ('>Logout<', 'href="/users/sign_out"')):
error = self._search_regex(
r'<p class="alert alert-danger">(.+?)</p>',
response, 'error', default=None)
r'<p[^>]+\bclass=(["\'])(?:(?!\1).)*\balert\s(?:(?!\1).)*\1[^>]*>(?P<error>.+?)</p>',
response, 'error', default=None, group='error')
if error:
raise ExtractorError('Unable to login: %s' % error, expected=True)
raise ExtractorError('Unable to log in')
Expand Down

0 comments on commit 17c3ace

Please sign in to comment.