From f1ed988c5f5f2043914b9a269f77310e9f35f1a8 Mon Sep 17 00:00:00 2001 From: ringus1 Date: Thu, 11 Jan 2024 17:01:20 +0100 Subject: [PATCH] One more exception handling --- yt_dlp/extractor/facebook.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/facebook.py b/yt_dlp/extractor/facebook.py index d9bbd314ce..fb04ddad08 100644 --- a/yt_dlp/extractor/facebook.py +++ b/yt_dlp/extractor/facebook.py @@ -449,8 +449,11 @@ def _extract_from_url(self, url, video_id): raise ExtractorError('Failed to login with provided data.', expected=True) if props := get_first(sjs_data, ('require', ..., ..., ..., '__bbox', 'require', ..., ..., ..., 'rootView', 'props'), expected_type=dict, default={}): - if props.get('title') == 'This content isn\'t available at the moment': - raise ExtractorError('Content removed. Facebook said: "%s"' % props.get('body', ''), expected=True) + if props.get('title') in ( + 'This content isn\'t available at the moment', + 'This content isn\'t available right now' + ): + raise ExtractorError('Content removed or not accessible. Facebook said: "%s"' % props.get('body', ''), expected=True) def extract_metadata(webpage): post_data = [self._parse_json(j, video_id, fatal=False) for j in re.findall(