{"record":{"id":"af6e674ddd6d5eaa","repo":"ytdl-org/youtube-dl","slug":"unable-to-login-s-af6e67","errorCode":null,"errorMessage":"Unable to login: %s","messagePattern":"Unable to login: (.+?)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/pluralsight.py","lineNumber":198,"sourceCode":"        })\n\n        post_url = self._search_regex(\n            r'<form[^>]+action=([\"\\'])(?P<url>.+?)\\1', login_page,\n            'post url', default=self._LOGIN_URL, group='url')\n\n        if not post_url.startswith('http'):\n            post_url = compat_urlparse.urljoin(self._LOGIN_URL, post_url)\n\n        response = self._download_webpage(\n            post_url, None, 'Logging in',\n            data=urlencode_postdata(login_form),\n            headers={'Content-Type': 'application/x-www-form-urlencoded'})\n\n        error = self._search_regex(\n            r'<span[^>]+class=\"field-validation-error\"[^>]*>([^<]+)</span>',\n            response, 'error message', default=None)\n        if error:\n            raise ExtractorError('Unable to login: %s' % error, expected=True)\n\n        if all(not re.search(p, response) for p in (\n                r'__INITIAL_STATE__', r'[\"\\']currentUser[\"\\']',\n                # new layout?\n                r'>\\s*Sign out\\s*<')):\n            BLOCKED = 'Your account has been blocked due to suspicious activity'\n            if BLOCKED in response:\n                raise ExtractorError(\n                    'Unable to login: %s' % BLOCKED, expected=True)\n            MUST_AGREE = 'To continue using Pluralsight, you must agree to'\n            if any(p in response for p in (MUST_AGREE, '>Disagree<', '>Agree<')):\n                raise ExtractorError(\n                    'Unable to login: %s some documents. Go to pluralsight.com, '\n                    'log in and agree with what Pluralsight requires.'\n                    % MUST_AGREE, expected=True)\n\n            raise ExtractorError('Unable to log in')\n","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/pluralsight.py#L180-L216","documentation":"Raised by PluralsightIE._login when the login POST response contains a '<span class=\"field-validation-error\">' element. The span's text (ASP.NET-style validation message, e.g. 'The Email field is required' or 'Invalid login attempt') is interpolated: 'Unable to login: <error>'. Expected=True.","triggerScenarios":"Submitting the login form and Pluralsight's server-side validation fails: wrong email/password, empty fields, or anti-forgery token mismatch (stale form scrape). Detected by regex over the response HTML.","commonSituations":"Typo'd credentials in .netrc; password changed since stored; login form requiring reCAPTCHA so plain POST is rejected; account locked after repeated failures.","solutions":["Verify credentials at app.pluralsight.com/id/ in a browser; reset password if needed","Use --cookies with an exported logged-in session instead of password login","Wait and retry if repeated attempts locked the account"],"exampleFix":"# before\nyoutube_dl --username me@example.com --password 'typo' PS_URL\n# after\nyoutube_dl --cookies cookies.txt PS_URL  # session exported from logged-in browser","handlingStrategy":"validation","validationCode":"# Prove credentials work in a browser first; then smoke-test:\nyt-dlp --username \"$PS_USER\" --password \"$PS_PASS\" --simulate ONE_URL \\\n  || echo 'Login rejected — fix credentials before batch'","typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if e.expected and str(e).startswith('Unable to login:'):\n        sys.exit('Pluralsight: ' + str(e))  # message is the validation text","preventionTips":["Reset stale passwords; keep .netrc current","Use --cookies to bypass form-login fragility","Read the interpolated validation message — it states the exact field problem"],"tags":["pluralsight","authentication","login","validation","extractor-error","expected"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}