mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-10-31 22:55:26 +00:00
[pluralsight] Improve authentication (closes #17762)
This commit is contained in:
parent
0082f44a08
commit
21c1a00dd7
1 changed files with 5 additions and 1 deletions
|
@ -4,6 +4,7 @@ import collections
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import (
|
from ..compat import (
|
||||||
|
@ -196,7 +197,10 @@ query viewClip {
|
||||||
if error:
|
if error:
|
||||||
raise ExtractorError('Unable to login: %s' % error, expected=True)
|
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'
|
BLOCKED = 'Your account has been blocked due to suspicious activity'
|
||||||
if BLOCKED in response:
|
if BLOCKED in response:
|
||||||
raise ExtractorError(
|
raise ExtractorError(
|
||||||
|
|
Loading…
Reference in a new issue