ytdl-org/youtube-dl · error · ExtractorError

Unable to login: %s

Error message

Unable to login: %s

What it means

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.

Source

Thrown at youtube_dl/extractor/lecturio.py:62

        login_form = {
            'signin[email]': username,
            'signin[password]': password,
            'signin[remember]': 'on',
        }

        response, urlh = self._download_webpage_handle(
            self._LOGIN_URL, None, 'Logging in',
            data=urlencode_postdata(login_form))

        # Logged in successfully
        if is_logged(urlh):
            return

        errors = self._html_search_regex(
            r'(?s)<ul[^>]+class=["\']error_list[^>]+>(.+?)</ul>', response,
            'errors', default=None)
        if errors:
            raise ExtractorError('Unable to login: %s' % errors, expected=True)
        raise ExtractorError('Unable to log in')


class LecturioIE(LecturioBaseIE):
    _VALID_URL = r'''(?x)
                    https://
                        (?:
                            app\.lecturio\.com/([^/]+/(?P<nt>[^/?#&]+)\.lecture|(?:\#/)?lecture/c/\d+/(?P<id>\d+))|
                            (?:www\.)?lecturio\.de/[^/]+/(?P<nt_de>[^/?#&]+)\.vortrag
                        )
                    '''
    _TESTS = [{
        'url': 'https://app.lecturio.com/medical-courses/important-concepts-and-terms-introduction-to-microbiology.lecture#tab/videos',
        'md5': '9a42cf1d8282a6311bf7211bbde26fde',
        'info_dict': {
            'id': '39634',
            'ext': 'mp4',
            'title': 'Important Concepts and Terms — Introduction to Microbiology',

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Verify the email/password by logging in manually in a browser
  2. Pass credentials with -u/--username -p/--password (and --twofactor if enabled) rather than embedding them in the URL
  3. Update youtube-dl/yt-dlp — Lecturio's auth flow changed between versions
  4. If the account is valid but still failing, capture the login response and check for captcha/2FA requirements

Example fix

# before: inline credentials in URL (often mangled)
# youtube-dl "https://app.lecturio.com/..." "u:p"

# after: proper auth flags
# youtube-dl -u you@example.com -p 'secret' "https://app.lecturio.com/123/lecture"
Defensive patterns

Strategy: try-catch

Try / catch

try:
    ydl.download([url])
except ExtractorError as e:
    if 'Unable to login' in str(e):
        verify_credentials_manually()  # or switch to cookie-based auth
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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