From 6a424391d9745f46c8451771ae4d62da389cc311 Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Sat, 2 Jul 2016 23:15:55 +0800 Subject: [PATCH] [facebook] Make embed detection stricter to prevent false-positives --- youtube_dl/extractor/facebook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index 6eaa22d89..bbdb14366 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -140,7 +140,7 @@ class FacebookIE(InfoExtractor): # see https://developers.facebook.com/docs/plugins/embedded-video-player mobj = re.search(r'''(?x)]+ class=(?P[\'"])[^\'"]*\bfb-video\b[^\'"]*(?P=q1)[^>]+ - data-href=(?P[\'"])(?P[^\'"]+)(?P=q2)''', webpage) + data-href=(?P[\'"])(?P(?:https?:)?//(?:www\.)?facebook.com/.+?)(?P=q2)''', webpage) if mobj is not None: return mobj.group('url') -- 2.22.2