Browse Source

[pluralsight] Improve authentication (closes #17762)

master-ytdl-org
Sergey M․ 6 years ago
parent
commit
21c1a00dd7
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      youtube_dl/extractor/pluralsight.py

+ 5
- 1
youtube_dl/extractor/pluralsight.py View File

@ -4,6 +4,7 @@ import collections
import json
import os
import random
import re
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 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(


Loading…
Cancel
Save