{"record":{"id":"4f00c4c91c0a0015","repo":"ytdl-org/youtube-dl","slug":"video-s-is-for-friends-only","errorCode":null,"errorMessage":"Video %s is for friends only","messagePattern":"Video (.+?) is for friends only","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/motherless.py","lineNumber":94,"sourceCode":"            'thumbnail': r're:https?://.*\\.jpg',\n            'age_limit': 18,\n        },\n        'params': {\n            'skip_download': True,\n        },\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n        webpage = self._download_webpage(url, video_id)\n\n        if any(p in webpage for p in (\n                '<title>404 - MOTHERLESS.COM<',\n                \">The page you're looking for cannot be found.<\")):\n            raise ExtractorError('Video %s does not exist' % video_id, expected=True)\n\n        if '>The content you are trying to view is for friends only.' in webpage:\n            raise ExtractorError('Video %s is for friends only' % video_id, expected=True)\n\n        title = self._html_search_regex(\n            (r'(?s)<div[^>]+\\bclass=[\"\\']media-meta-title[^>]+>(.+?)</div>',\n             r'id=\"view-upload-title\">\\s+([^<]+)<'), webpage, 'title')\n        video_url = (self._html_search_regex(\n            (r'setup\\(\\{\\s*[\"\\']file[\"\\']\\s*:\\s*([\"\\'])(?P<url>(?:(?!\\1).)+)\\1',\n             r'fileurl\\s*=\\s*([\"\\'])(?P<url>(?:(?!\\1).)+)\\1'),\n            webpage, 'video URL', default=None, group='url')\n            or 'http://cdn4.videos.motherlessmedia.com/videos/%s.mp4?fs=opencloud' % video_id)\n        age_limit = self._rta_search(webpage)\n        view_count = str_to_int(self._html_search_regex(\n            (r'>([\\d,.]+)\\s+Views<', r'<strong>Views</strong>\\s+([^<]+)<'),\n            webpage, 'view count', fatal=False))\n        like_count = str_to_int(self._html_search_regex(\n            (r'>([\\d,.]+)\\s+Favorites<',\n             r'<strong>Favorited</strong>\\s+([^<]+)<'),\n            webpage, 'like count', fatal=False))\n","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/motherless.py#L76-L112","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.","If you are the uploader's friend, view the page in a logged-in browser; the extractor cannot replicate that session.","Filter these out in batch scripts by catching ExtractorError and checking expected=True / the message instead of treating them as failures."],"exampleFix":"// before\nsubprocess.run(['youtube-dl', url], check=True)\n\n// after (python caller)\ntry:\n    subprocess.run(['youtube-dl', url], check=True)\nexcept subprocess.CalledProcessError:\n    print('skipped (possibly friends-only):', url)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from youtube_dl.utils import ExtractorError\ntry:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if e.expected and 'friends only' in str(e):\n        log.skip(url)  # permanent privacy restriction, do not retry\n    else:\n        raise","preventionTips":["Treat 'friends only' as permanent in batch jobs — never re-queue these URLs.","Pre-check is impossible without a browser session; rely on the expected flag instead.","Separate expected skips from unexpected failures in your error handling so alerts stay meaningful."],"tags":["site-restriction","access-denied","extractor","expected-error"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}