ytdl-org/youtube-dl · error · ExtractorError

Video %s does not exist

Error message

Video %s does not exist

What it means

SharedBaseIE._real_extract downloads the target page and scans it for the subclass-defined _FILE_NOT_FOUND marker string. If the marker appears in the HTML, the file has been deleted and the extractor raises 'Video <id> does not exist' as an expected error. This is a cheap, generic existence check shared across the various shared-host sites (shared.sx, megacloud, etc.).

Source

Thrown at youtube_dl/extractor/shared.py:28

    ExtractorError,
    int_or_none,
    js_to_json,
    KNOWN_EXTENSIONS,
    parse_filesize,
    rot47,
    url_or_none,
    urlencode_postdata,
)


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

        webpage, urlh = self._download_webpage_handle(url, video_id)

        if self._FILE_NOT_FOUND in webpage:
            raise ExtractorError(
                'Video %s does not exist' % video_id, expected=True)

        video_url = self._extract_video_url(webpage, video_id, url)

        title = self._extract_title(webpage)
        filesize = int_or_none(self._extract_filesize(webpage))

        return {
            'id': video_id,
            'url': video_url,
            'ext': 'mp4',
            'filesize': filesize,
            'title': title,
        }

    def _extract_title(self, webpage):
        return compat_b64decode(self._html_search_meta(
            'full:title', webpage, 'title')).decode('utf-8')

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Open the URL in a browser to confirm the host shows its not-found page.
  2. Get a fresh link from the original uploader - nothing client-side can restore a deleted file.
  3. Double-check the video id in the URL for typos or truncation.
  4. If the page clearly exists but the error still fires, the host changed its marker text - update the extractor's _FILE_NOT_FOUND constant.
Defensive patterns

Strategy: validation

Validate before calling

resp = requests.get(url)
if resp.status_code == 200 and 'File not found' in resp.text:
    skip(video_id)  # do not invoke the extractor

Type guard

def file_exists(webpage: str, marker: str) -> bool:
    return marker not in webpage

Try / catch

try:
    extract(url)
except ExtractorError as e:
    if 'does not exist' in str(e):
        drop_from_queue(video_id)
    else:
        raise

Prevention

When it happens

Trigger: Requesting a shared-host page whose HTML contains the site's file-not-found text (e.g. 'File not found' on shared.sx). Happens when the file was removed for abuse/age, expired from inactivity, or the id portion of the URL is wrong.

Common situations: Old links to files that expired under the host's retention policy; DMRA/abuse takedowns; mistyped video id after the slash; the host changing its not-found wording so the marker no longer matches (then extraction fails differently instead).

Related errors


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