ytdl-org/youtube-dl · error · ExtractorError

Unable to log in

Error message

Unable to log in

What it means

VLive login error: after fetching login cookies and POSTing email/pwd to LOGIN_URL, the extractor's is_logged_in() check still reports an anonymous session, so it raises 'Unable to log in' with expected=True. The credential POST apparently succeeded HTTP-wise but the session was not authenticated.

Source

Thrown at youtube_dl/extractor/vlive.py:106

                note='Downloading login info',
                headers={'Referer': 'https://www.vlive.tv/home'})
            return try_get(
                login_info, lambda x: x['message']['login'], bool) or False

        LOGIN_URL = 'https://www.vlive.tv/auth/email/login'
        self._request_webpage(
            LOGIN_URL, None, note='Downloading login cookies')

        self._download_webpage(
            LOGIN_URL, None, note='Logging in',
            data=urlencode_postdata({'email': email, 'pwd': password}),
            headers={
                'Referer': LOGIN_URL,
                'Content-Type': 'application/x-www-form-urlencoded'
            })

        if not is_logged_in():
            raise ExtractorError('Unable to log in', expected=True)

    def _call_api(self, path_template, video_id, fields=None):
        query = {'appId': self._APP_ID, 'gcc': 'KR', 'platformType': 'PC'}
        if fields:
            query['fields'] = fields
        try:
            return self._download_json(
                'https://www.vlive.tv/globalv-web/vam-web/' + path_template % video_id, video_id,
                'Downloading %s JSON metadata' % path_template.split('/')[-1].split('-')[0],
                headers={'Referer': 'https://www.vlive.tv/'}, query=query)
        except ExtractorError as e:
            if isinstance(e.cause, compat_HTTPError) and e.cause.code == 403:
                self.raise_login_required(json.loads(e.cause.read().decode('utf-8'))['message'])
            raise

    def _real_extract(self, url):
        video_id = self._match_id(url)

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Verify the email/password pair on the VLive site in a browser
  2. Skip -u/-p if the content is public
  3. Note VLive has migrated to Weverse; use the Weverse extractor or site for current content
Defensive patterns

Strategy: fallback

Try / catch

from youtube_dl.utils import ExtractorError
try:
    ydl.extract_info(url)
except ExtractorError as e:
    if 'Unable to log in' in str(e):
        youtube_dl.YoutubeDL({}).extract_info(url)  # anonymous fallback for public content

Prevention

When it happens

Trigger: Passing -u/-p for any VLive extractor where the login POST does not produce a logged-in session: wrong password, CAPTCHA/challenge, or an account that cannot use password login.

Common situations: Wrong credentials; VLive (now Weverse) changed or disabled classic email login; cookies/session invalidated server-side.

Related errors


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