ytdl-org/youtube-dl · error · ExtractorError

Video %s is for friends only

Error message

Video %s is for friends only

What it means

Raised by the MotherlessIE extractor when the downloaded video page contains the marker text 'The content you are trying to view is for friends only.' It means the uploader restricted the media to their friends list, so the page HTML carries no playable video URL for anonymous visitors. It is marked expected=True, so youtube-dl reports it as a normal skip rather than a crash.

Source

Thrown at youtube_dl/extractor/motherless.py:94

            'thumbnail': r're:https?://.*\.jpg',
            'age_limit': 18,
        },
        'params': {
            'skip_download': True,
        },
    }]

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

        if any(p in webpage for p in (
                '<title>404 - MOTHERLESS.COM<',
                ">The page you're looking for cannot be found.<")):
            raise ExtractorError('Video %s does not exist' % video_id, expected=True)

        if '>The content you are trying to view is for friends only.' in webpage:
            raise ExtractorError('Video %s is for friends only' % video_id, expected=True)

        title = self._html_search_regex(
            (r'(?s)<div[^>]+\bclass=["\']media-meta-title[^>]+>(.+?)</div>',
             r'id="view-upload-title">\s+([^<]+)<'), webpage, 'title')
        video_url = (self._html_search_regex(
            (r'setup\(\{\s*["\']file["\']\s*:\s*(["\'])(?P<url>(?:(?!\1).)+)\1',
             r'fileurl\s*=\s*(["\'])(?P<url>(?:(?!\1).)+)\1'),
            webpage, 'video URL', default=None, group='url')
            or 'http://cdn4.videos.motherlessmedia.com/videos/%s.mp4?fs=opencloud' % video_id)
        age_limit = self._rta_search(webpage)
        view_count = str_to_int(self._html_search_regex(
            (r'>([\d,.]+)\s+Views<', r'<strong>Views</strong>\s+([^<]+)<'),
            webpage, 'view count', fatal=False))
        like_count = str_to_int(self._html_search_regex(
            (r'>([\d,.]+)\s+Favorites<',
             r'<strong>Favorited</strong>\s+([^<]+)<'),
            webpage, 'like count', fatal=False))

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Accept the skip: the media is private to the uploader's friends and youtube-dl has no login support for this site, so there is no downloader-side fix.
  2. If you are the uploader's friend, view the page in a logged-in browser; the extractor cannot replicate that session.
  3. Filter these out in batch scripts by catching ExtractorError and checking expected=True / the message instead of treating them as failures.

Example fix

// before
subprocess.run(['youtube-dl', url], check=True)

// after (python caller)
try:
    subprocess.run(['youtube-dl', url], check=True)
except subprocess.CalledProcessError:
    print('skipped (possibly friends-only):', url)
Defensive patterns

Strategy: try-catch

Try / catch

from youtube_dl.utils import ExtractorError
try:
    ydl.extract_info(url)
except ExtractorError as e:
    if e.expected and 'friends only' in str(e):
        log.skip(url)  # permanent privacy restriction, do not retry
    else:
        raise

Prevention

When it happens

Trigger: Calling youtube-dl on a motherless.com video URL whose server-rendered HTML contains '>The content you are trying to view is for friends only.' after the 404 check passes.

Common situations: Following old/share links to media that was later set to friends-only; scripting batch downloads over a list where some items are private; no authentication mechanism exists in the extractor to bypass it.

Related errors


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