{"record":{"id":"dd490c4c67cbd3fc","repo":"ytdl-org/youtube-dl","slug":"unable-to-login-s-dd490c","errorCode":null,"errorMessage":"Unable to login: %s","messagePattern":"Unable to login: (.+?)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/lecturio.py","lineNumber":62,"sourceCode":"        login_form = {\n            'signin[email]': username,\n            'signin[password]': password,\n            'signin[remember]': 'on',\n        }\n\n        response, urlh = self._download_webpage_handle(\n            self._LOGIN_URL, None, 'Logging in',\n            data=urlencode_postdata(login_form))\n\n        # Logged in successfully\n        if is_logged(urlh):\n            return\n\n        errors = self._html_search_regex(\n            r'(?s)<ul[^>]+class=[\"\\']error_list[^>]+>(.+?)</ul>', response,\n            'errors', default=None)\n        if errors:\n            raise ExtractorError('Unable to login: %s' % errors, expected=True)\n        raise ExtractorError('Unable to log in')\n\n\nclass LecturioIE(LecturioBaseIE):\n    _VALID_URL = r'''(?x)\n                    https://\n                        (?:\n                            app\\.lecturio\\.com/([^/]+/(?P<nt>[^/?#&]+)\\.lecture|(?:\\#/)?lecture/c/\\d+/(?P<id>\\d+))|\n                            (?:www\\.)?lecturio\\.de/[^/]+/(?P<nt_de>[^/?#&]+)\\.vortrag\n                        )\n                    '''\n    _TESTS = [{\n        'url': 'https://app.lecturio.com/medical-courses/important-concepts-and-terms-introduction-to-microbiology.lecture#tab/videos',\n        'md5': '9a42cf1d8282a6311bf7211bbde26fde',\n        'info_dict': {\n            'id': '39634',\n            'ext': 'mp4',\n            'title': 'Important Concepts and Terms — Introduction to Microbiology',","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/lecturio.py#L44-L80","documentation":"Raised by the Lecturio login helper when the post-login page still reports not-logged-in and the response contains an error_list element (typically wrong credentials or account lock). It is expected=True and includes the scraped HTML error text. A bare 'Unable to log in' is raised if no error list is found.","triggerScenarios":"Using --username/--password with a lecturio.de/lecturio.com URL where the login POST succeeds HTTP-wise but is_logged(urlh) is False and the response HTML contains <ul class=\"error_list\"> — wrong password, unknown email, or the account cannot access lectures.","commonSituations":"Typos in credentials; expired accounts or cancelled subscriptions; Lecturio changing its login form/error markup so the error scrape matches a generic message; 2FA/captcha-protected logins that cannot complete headlessly.","solutions":["Verify the email/password by logging in manually in a browser","Pass credentials with -u/--username -p/--password (and --twofactor if enabled) rather than embedding them in the URL","Update youtube-dl/yt-dlp — Lecturio's auth flow changed between versions","If the account is valid but still failing, capture the login response and check for captcha/2FA requirements"],"exampleFix":"# before: inline credentials in URL (often mangled)\n# youtube-dl \"https://app.lecturio.com/...\" \"u:p\"\n\n# after: proper auth flags\n# youtube-dl -u you@example.com -p 'secret' \"https://app.lecturio.com/123/lecture\"","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.download([url])\nexcept ExtractorError as e:\n    if 'Unable to login' in str(e):\n        verify_credentials_manually()  # or switch to cookie-based auth\n    else:\n        raise","preventionTips":["Test credentials in a browser before scripted downloads","Prefer --cookies-from-browser over password auth for e-learning sites with captcha/2FA"],"tags":["lecturio","authentication","login","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}