From a38fc9a11f9dc519964ea710225ec1944c6444e0 Mon Sep 17 00:00:00 2001 From: ruben1PvP <73245443+ruben1PvP@users.noreply.github.com> Date: Sun, 22 Nov 2026 17:58:30 +0100 Subject: [PATCH] [ie/facebook] Improve error messages (#18083) Closes #18016 Authored by: ruben1PvP --- yt_dlp/extractor/facebook.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/facebook.py b/yt_dlp/extractor/facebook.py index 332dd83afe..9cbcb016bb 100644 --- a/yt_dlp/extractor/facebook.py +++ b/yt_dlp/extractor/facebook.py @@ -7,6 +7,7 @@ from ..compat import compat_etree_fromstring from ..networking.exceptions import HTTPError from ..utils import ( ExtractorError, + bug_reports_message, clean_html, determine_ext, float_or_none, @@ -840,7 +841,14 @@ class FacebookIE(FacebookBaseIE): ..., 'initialRouteInfo', 'route', 'rootView', 'props', 'is_age_gated', {bool}, )): self.raise_login_required('This video is age-restricted and requires authentication') - raise ExtractorError('Cannot parse data') + cookies = self._get_cookies('https://www.facebook.com/') + if cookies.get('c_user') and cookies.get('xs'): + raise ExtractorError('No video found') + raise ExtractorError( + 'No video found. Check if this post is accessible in your ' + f'browser without being logged-in. If it is not, then u{self._login_hint()[1:]}. ' + 'Otherwise, if the post is accessible in browser without being logged-in' + f'{bug_reports_message(before=",")}', expected=True) if len(video_data) > 1: entries = []