ytdl-org/youtube-dl · error · ExtractorError

Unable to recognize tab page

Error message

Unable to recognize tab page

What it means

The terminal failure of YoutubeTabIE._real_extract: after all playlist/tab parsing attempts fail, and the fallback (currentVideoEndpoint.watchEndpoint.videoId from the data, or a 'v' query parameter) yields no video id and no fatal alerts were reported, the extractor raises 'Unable to recognize tab page'. It means the response was neither a recognizable playlist/channel page nor redirectable to a single video.

Source

Thrown at youtube_dl/extractor/youtube.py:4144

        if tabs:
            return self._extract_from_tabs(item_id, webpage, data, tabs)
        playlist = try_get(
            data, lambda x: x['contents']['twoColumnWatchNextResults']['playlist']['playlist'], dict)
        if playlist:
            return self._extract_from_playlist(item_id, url, data, playlist)
        # Fallback to video extraction if no playlist alike page is recognized.
        # First check for the current video then try the v attribute of URL query.
        video_id = try_get(
            data, lambda x: x['currentVideoEndpoint']['watchEndpoint']['videoId'],
            compat_str) or video_id
        if video_id:
            return self.url_result(video_id, ie=YoutubeIE.ie_key(), video_id=video_id)

        # Capture and output alerts
        self._extract_and_report_alerts(data)

        # Failed to recognize
        raise ExtractorError('Unable to recognize tab page')


class YoutubePlaylistIE(InfoExtractor):
    IE_DESC = 'YouTube.com playlists'
    _VALID_URL = r'''(?x)(?:
                        (?:https?://)?
                        (?:\w+\.)?
                        (?:
                            (?:
                                youtube(?:kids)?\.com|
                                invidio\.us
                            )
                            /.*?\?.*?\blist=
                        )?
                        (?P<id>%(playlist_id)s)
                     )''' % {'playlist_id': YoutubeBaseInfoExtractor._PLAYLIST_ID_RE}
    IE_NAME = 'youtube:playlist'
    _TESTS = [{

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Update youtube-dl (preferably yt-dlp) — tab-page recognition is under constant repair.
  2. Try a more specific URL form: the /videos tab, the canonical channel URL, or directly the watch?v= URL of a known video.
  3. If you know the target is a single video, pass its watch URL so YoutubeIE handles it instead of the tab extractor.
  4. Reproduce with --verbose to see which branch failed and what keys the response data actually contains.
Defensive patterns

Strategy: fallback

Validate before calling

video_id = try_get(data, lambda x: x['currentVideoEndpoint']['watchEndpoint']['videoId'], str) \
    or parse_qs(urlparse(url).query).get('v', [None])[0]
if video_id:
    target = 'https://www.youtube.com/watch?v=%s' % video_id  # use video URL instead

Try / catch

try:
    info = ydl.extract_info(tab_url)
except ExtractorError as e:
    if 'Unable to recognize tab page' in str(e):
        info = ydl.extract_info(canonical_watch_url)  # fall back to known video URL
    else:
        raise

Prevention

When it happens

Trigger: Extracting a youtube.com URL matched by the Tab IE where the underlying data lacks channel/playlist metadata and tabs: handle-only URLs, degenerate/error pages, or schema changes that break every parsing branch before the fallback check.

Common situations: YouTube changes the shape of browse/watch-next responses; URLs like /user/... or /c/... resolving to pages the old extractor cannot classify; embedded responses missing currentVideoEndpoint.

Related errors


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