ytdl-org/youtube-dl · error · ExtractorError

Unable to log in

Error message

Unable to log in

What it means

The final fallback of PluralsightIE._login: the POST returned 2xx, no validation error span, no blocked banner, no agreement UI, and none of the logged-in markers (__INITIAL_STATE__, currentUser, 'Sign out'). The extractor cannot tell whether login worked, so it raises 'Unable to log in' — notably WITHOUT expected=True, flagging a likely site change as much as a credential problem.

Source

Thrown at youtube_dl/extractor/pluralsight.py:215

        if error:
            raise ExtractorError('Unable to login: %s' % error, expected=True)

        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(
                    'Unable to login: %s' % BLOCKED, expected=True)
            MUST_AGREE = 'To continue using Pluralsight, you must agree to'
            if any(p in response for p in (MUST_AGREE, '>Disagree<', '>Agree<')):
                raise ExtractorError(
                    'Unable to login: %s some documents. Go to pluralsight.com, '
                    'log in and agree with what Pluralsight requires.'
                    % MUST_AGREE, expected=True)

            raise ExtractorError('Unable to log in')

    def _get_subtitles(self, author, clip_idx, clip_id, lang, name, duration, video_id):
        captions = None
        if clip_id:
            captions = self._download_json(
                '%s/transcript/api/v1/caption/json/%s/%s'
                % (self._API_BASE, clip_id, lang), video_id,
                'Downloading captions JSON', 'Unable to download captions JSON',
                fatal=False)
        if not captions:
            captions_post = {
                'a': author,
                'cn': int(clip_idx),
                'lc': lang,
                'm': name,
            }
            captions = self._download_json(
                '%s/player/retrieve-captions' % self._API_BASE, video_id,

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Log in manually in a browser to resolve any account-state prompt (verify email, reset password)
  2. Use --cookies from a real browser session instead of credential login
  3. Update to latest yt-dlp; if it persists there, the marker regexes need a fix — report upstream

Example fix

# before
youtube_dl --username me@example.com --password '...' 'https://app.pluralsight.com/player?...'
# after
youtube_dl --cookies cookies.txt 'https://app.pluralsight.com/player?...'
Defensive patterns

Strategy: fallback

Try / catch

try:
    ydl.extract_info(url, username=..., password=...)
except ExtractorError as e:
    if 'Unable to log in' in str(e):  # not expected → login page changed
        ydl2 = YoutubeDL({'cookiefile': 'cookies.txt'})
        info = ydl2.extract_info(url)  # browser-session fallback

Prevention

When it happens

Trigger: Pluralsight alters the post-login page (new layout, SPA shell, challenge page) so all three success-marker regexes miss while the failure-marker checks also miss. Or an unanticipated account state (email unverified, forced password reset) rendering a page with none of the searched strings.

Common situations: Frontend redesigns of app.pluralsight.com; Cloudflare/captcha interstitials on scripted POSTs; the regex list being maintained in yt-dlp but not this youtube_dl checkout.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/57069806a68b8722. Report an issue: GitHub.