From d85fa5fb149df166ac50dbc9d71bda4ff1a6f27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 10 Dec 2025 19:39:53 +0100 Subject: [PATCH] [facebook] do not match '/permalink' URLs (#8679) --- gallery_dl/extractor/facebook.py | 2 +- test/results/facebook.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/facebook.py b/gallery_dl/extractor/facebook.py index 7198ff57..5d56a5fc 100644 --- a/gallery_dl/extractor/facebook.py +++ b/gallery_dl/extractor/facebook.py @@ -12,7 +12,7 @@ from ..cache import memcache BASE_PATTERN = r"(?:https?://)?(?:[\w-]+\.)?facebook\.com" USER_PATTERN = (rf"{BASE_PATTERN}/" - rf"(?!media/|photo/|photo.php|watch/)" + rf"(?!media/|photo/|photo.php|watch/|permalink.php)" rf"(?:profile\.php\?id=|people/[^/?#]+/)?([^/?&#]+)") diff --git a/test/results/facebook.py b/test/results/facebook.py index 64f49690..593f51d6 100644 --- a/test/results/facebook.py +++ b/test/results/facebook.py @@ -39,6 +39,14 @@ __tests__ = ( ], }, +{ + "#url" : "https://www.facebook.com/permalink.php?story_fbid=pfbid034C2PVBhr311C2jo91sBMNwfvcBeLmspzTXLikp37aEqKsdh47mW7ZX8hcS3Ba8Uul&id=61573780995993&rdid=eV7e4pTWFxWb6Evx", + "#comment" : "post URL (#8679)", + "#class" : facebook.FacebookUserExtractor, + "#fail" : True, +}, + + { "#url" : "https://www.facebook.com/facebook/photos", "#class" : facebook.FacebookPhotosExtractor,