projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0082f44
)
[pluralsight] Improve authentication (closes #17762)
author
Sergey M․
<dstftw@gmail.com>
Thu, 4 Oct 2018 19:27:14 +0000
(
02:27
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 4 Oct 2018 19:27:14 +0000
(
02:27
+0700)
youtube_dl/extractor/pluralsight.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/pluralsight.py
b/youtube_dl/extractor/pluralsight.py
index daf1725702a3fe3002c35d8490226b6ad533a11b..eafe56897dde68c8dcb44d2c315d8c63dd2c805d 100644
(file)
--- a/
youtube_dl/extractor/pluralsight.py
+++ b/
youtube_dl/extractor/pluralsight.py
@@
-4,6
+4,7
@@
import collections
import json
import os
import random
import json
import os
import random
+import re
from .common import InfoExtractor
from ..compat import (
from .common import InfoExtractor
from ..compat import (
@@
-196,7
+197,10
@@
query viewClip {
if error:
raise ExtractorError('Unable to login: %s' % error, expected=True)
if error:
raise ExtractorError('Unable to login: %s' % error, expected=True)
- if all(p not in response for p in ('__INITIAL_STATE__', '"currentUser"')):
+ if all(not re.search(p, response) for p in (
+ r'__INITIAL_STATE__', r'["\']currentUser["\']',
+ # new layout?
+ r'>\s*Sign out\s*<')):
BLOCKED = 'Your account has been blocked due to suspicious activity'
if BLOCKED in response:
raise ExtractorError(
BLOCKED = 'Your account has been blocked due to suspicious activity'
if BLOCKED in response:
raise ExtractorError(