{"record":{"id":"2230ddeed19a418b","repo":"ytdl-org/youtube-dl","slug":"the-video-is-not-available-facebook-said-s","errorCode":null,"errorMessage":"The video is not available, Facebook said: \"%s\"","messagePattern":"The video is not available, Facebook said: \"(.+?)\"","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/facebook.py","lineNumber":521,"sourceCode":"                    parse_attachment(edge, key='node')\n\n                video = data.get('video') or {}\n                if video:\n                    attachments = try_get(video, [\n                        lambda x: x['story']['attachments'],\n                        lambda x: x['creation_story']['attachments']\n                    ], list) or []\n                    for attachment in attachments:\n                        parse_attachment(attachment)\n                    if not entries:\n                        parse_graphql_video(video)\n\n                return self.playlist_result(entries, video_id)\n\n        if not video_data:\n            m_msg = re.search(r'class=\"[^\"]*uiInterstitialContent[^\"]*\"><div>(.*?)</div>', webpage)\n            if m_msg is not None:\n                raise ExtractorError(\n                    'The video is not available, Facebook said: \"%s\"' % m_msg.group(1),\n                    expected=True)\n            elif any(p in webpage for p in (\n                    '>You must log in to continue',\n                    'id=\"login_form\"',\n                    'id=\"loginbutton\"')):\n                self.raise_login_required()\n\n        if not video_data and '/watchparty/' in url:\n            post_data = {\n                'doc_id': 3731964053542869,\n                'variables': json.dumps({\n                    'livingRoomID': video_id,\n                }),\n            }\n\n            prefetched_data = extract_relay_prefetched_data(r'\"login_data\"\\s*:\\s*{')\n            if prefetched_data:","sourceCodeStart":503,"sourceCodeEnd":539,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/facebook.py#L503-L539","documentation":"Raised by the Facebook extractor when the video page contains a 'uiInterstitialContent' block instead of video data. Facebook renders this interstitial when the video is unavailable (deleted, private, region-blocked, or age-restricted), and the extractor surfaces Facebook's own message. It is marked expected=True, so youtube-dl treats it as a user-facing availability problem rather than an extractor bug.","triggerScenarios":"The matcher for class=\"uiInterstitialContent\"><div>(.*?)</div> succeeds on the downloaded webpage while video_data is empty. Concretely: opening a removed/privatized facebook.com/watch or fb.watch URL, a video whose privacy setting was changed to friends-only, or an age-gated video served without login cookies.","commonSituations":"Old bookmarked fb.watch links after the owner deleted the video; corporate pages taking videos offline; scraping pages while not logged in so Facebook serves the interstitial instead of the player.","solutions":["Open the same URL in a browser to confirm the video still exists and is public","Pass cookies from a logged-in session (--cookies from a cookies.txt dump) since Facebook hides many videos from anonymous requests","Update youtube-dl/youtube-dl to the latest version, since Facebook changes its page markup frequently and old extractors miss video data","If the video is genuinely gone, obtain a re-upload or mirror URL"],"exampleFix":"# before\nyoutube_dl 'https://www.facebook.com/watch/?v=1234567890'\n# raises: The video is not available, Facebook said: \"...\"\n\n# after\nyoutube_dl --cookies cookies.txt 'https://www.facebook.com/watch/?v=1234567890'","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from youtube_dl.utils import ExtractorError\ntry:\n    ydl.extract_info(url, download=True)\nexcept ExtractorError as e:\n    if 'The video is not available' in str(e):\n        mark_url_unavailable(url)  # skip permanently\n    else:\n        raise","preventionTips":["Pre-check Facebook URLs resolve to public videos via an unauthenticated HTTP HEAD before queueing","Keep a cookies.txt from a valid session and pass --cookies for all Facebook extraction","Treat this error as permanent: do not retry the same URL"],"tags":["facebook","extractor","video-unavailable","authentication"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}