ytdl-org/youtube-dl · error · ExtractorError
The video is not available, Facebook said: "%s"
Error message
The video is not available, Facebook said: "%s"
What it means
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.
Source
Thrown at youtube_dl/extractor/facebook.py:521
parse_attachment(edge, key='node')
video = data.get('video') or {}
if video:
attachments = try_get(video, [
lambda x: x['story']['attachments'],
lambda x: x['creation_story']['attachments']
], list) or []
for attachment in attachments:
parse_attachment(attachment)
if not entries:
parse_graphql_video(video)
return self.playlist_result(entries, video_id)
if not video_data:
m_msg = re.search(r'class="[^"]*uiInterstitialContent[^"]*"><div>(.*?)</div>', webpage)
if m_msg is not None:
raise ExtractorError(
'The video is not available, Facebook said: "%s"' % m_msg.group(1),
expected=True)
elif any(p in webpage for p in (
'>You must log in to continue',
'id="login_form"',
'id="loginbutton"')):
self.raise_login_required()
if not video_data and '/watchparty/' in url:
post_data = {
'doc_id': 3731964053542869,
'variables': json.dumps({
'livingRoomID': video_id,
}),
}
prefetched_data = extract_relay_prefetched_data(r'"login_data"\s*:\s*{')
if prefetched_data:View on GitHub (pinned to 956b8c5855)
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
Example fix
# before youtube_dl 'https://www.facebook.com/watch/?v=1234567890' # raises: The video is not available, Facebook said: "..." # after youtube_dl --cookies cookies.txt 'https://www.facebook.com/watch/?v=1234567890'
Defensive patterns
Strategy: try-catch
Try / catch
from youtube_dl.utils import ExtractorError
try:
ydl.extract_info(url, download=True)
except ExtractorError as e:
if 'The video is not available' in str(e):
mark_url_unavailable(url) # skip permanently
else:
raise Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unable to log in
- Cannot parse data
- Cannot find video formats
- Cannot download file. Are you logged in?
- This video is only available via cable service provider subs
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/2230ddeed19a418b.
Report an issue: GitHub.