ytdl-org/youtube-dl · error · ExtractorError

Unable to login: %s asks you to accept new Privacy Policy. G

Error message

Unable to login: %s asks you to accept new Privacy Policy. Go to https://%s/ and accept.

What it means

Raised by TeachableBaseIE._login when the POST response to the site's login form contains '>I accept the new Privacy Policy<'. The site refuses to complete login until the account has accepted the new policy, so no credential retry can succeed. Marked expected=True and includes the site hostname so the user knows where to go.

Source

Thrown at youtube_dl/extractor/teachable.py:87

        })

        post_url = self._search_regex(
            r'<form[^>]+action=(["\'])(?P<url>(?:(?!\1).)+)\1', login_page,
            'post url', default=login_url, group='url')

        if not post_url.startswith('http'):
            post_url = urljoin(login_url, post_url)

        response = self._download_webpage(
            post_url, None, 'Logging in to %s' % site,
            data=urlencode_postdata(login_form),
            headers={
                'Content-Type': 'application/x-www-form-urlencoded',
                'Referer': login_url,
            })

        if '>I accept the new Privacy Policy<' in response:
            raise ExtractorError(
                'Unable to login: %s asks you to accept new Privacy Policy. '
                'Go to https://%s/ and accept.' % (site, site), expected=True)

        # Successful login
        if is_logged(response):
            self._logged_in = True
            return

        message = get_element_by_class('alert', response)
        if message is not None:
            raise ExtractorError(
                'Unable to login: %s' % clean_html(message), expected=True)

        raise ExtractorError('Unable to log in')


class TeachableIE(TeachableBaseIE):
    _VALID_URL = r'''(?x)

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Open https://<site>/ in a browser, log in once, click 'I accept the new Privacy Policy', then retry the CLI download.
  2. Keep credentials in .netrc for the Teachable school so re-login after acceptance is automatic.
  3. If managing many accounts, do the acceptance step as part of account provisioning.
Defensive patterns

Strategy: validation

Validate before calling

# Detect pending policy acceptance by fetching login page state first
# (practical equivalent: just do the one-time acceptance in a browser)

Try / catch

try:
    ydl.extract_info(url)
except ExtractorError as e:
    if e.expected and 'Privacy Policy' in str(e):
        prompt_user_to_accept(site)  # message contains the exact https://<site>/ URL
    else:
        raise

Prevention

When it happens

Trigger: Passing --username/--password (or netrc) for a Teachable school site whose account has a pending Privacy Policy acceptance; the login POST succeeds HTTP-wise but returns the policy-acceptance page.

Common situations: GDPR-era policy rollouts across all Teachable-hosted schools (sites like course sites on teachable.com or custom domains); accounts dormant since before the policy change.

Related errors


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