From 9f0aa0925569eb37efd17ae0a59fccd0daba2ed4 Mon Sep 17 00:00:00 2001 From: grqx_wsl <173253225+grqx@users.noreply.github.com> Date: Mon, 18 Nov 2024 22:32:32 +1300 Subject: [PATCH 1/2] [ie/facebook] fix _VALID_URL and add tests --- yt_dlp/extractor/facebook.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/facebook.py b/yt_dlp/extractor/facebook.py index c07efcd581..1d1e76ec30 100644 --- a/yt_dlp/extractor/facebook.py +++ b/yt_dlp/extractor/facebook.py @@ -50,7 +50,7 @@ class FacebookIE(InfoExtractor): [^/]+/videos/(?:[^/]+/)?| [^/]+/posts/| events/(?:[^/]+/)?| - groups/[^/]+/(?:permalink|posts)/| + groups/[^/]+/(?:permalink|posts)/(?:[0-9a-f]*/)?| watchparty/ )| facebook: @@ -410,6 +410,9 @@ class FacebookIE(InfoExtractor): 'uploader': 'Comitato Liberi Pensatori', 'uploader_id': '100065709540881', }, + }, { + 'url': 'https://www.facebook.com/groups/1513990329015294/posts/d41d8cd9/2013209885760000/?app=fbl', + 'only_matching': True, }] _SUPPORTED_PAGLETS_REGEX = r'(?:pagelet_group_mall|permalink_video_pagelet|hyperfeed_story_id_[0-9a-f]+)' _api_config = { From 97ab96dae8463d7f0a12eb1a4aebc44691287955 Mon Sep 17 00:00:00 2001 From: N/Ame <173015200+grqz@users.noreply.github.com> Date: Tue, 19 Nov 2024 08:19:10 +1300 Subject: [PATCH 2/2] use + instead of * in `_VALID_URL` Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com> --- yt_dlp/extractor/facebook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/extractor/facebook.py b/yt_dlp/extractor/facebook.py index 1d1e76ec30..75340d88d7 100644 --- a/yt_dlp/extractor/facebook.py +++ b/yt_dlp/extractor/facebook.py @@ -50,7 +50,7 @@ class FacebookIE(InfoExtractor): [^/]+/videos/(?:[^/]+/)?| [^/]+/posts/| events/(?:[^/]+/)?| - groups/[^/]+/(?:permalink|posts)/(?:[0-9a-f]*/)?| + groups/[^/]+/(?:permalink|posts)/(?:[0-9a-f]+/)?| watchparty/ )| facebook: