projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78466fc
)
[animeondemand] Relax login error regex
author
Sergey M․
<dstftw@gmail.com>
Tue, 19 Dec 2017 15:53:04 +0000
(22:53 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 19 Dec 2017 15:53:04 +0000
(22:53 +0700)
youtube_dl/extractor/animeondemand.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/animeondemand.py
b/youtube_dl/extractor/animeondemand.py
index 34c2b363ea3fbb69765be83b57244913e48c85c5..be032d5b42a22d18c2e0fa2d2c43c258f4e18fd6 100644
(file)
--- a/
youtube_dl/extractor/animeondemand.py
+++ b/
youtube_dl/extractor/animeondemand.py
@@
-85,8
+85,8
@@
class AnimeOnDemandIE(InfoExtractor):
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')