From: Yen Chi Hsuan Date: Sat, 2 Jul 2016 15:15:55 +0000 (+0800) Subject: [facebook] Make embed detection stricter to prevent false-positives X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=6a424391d9745f46c8451771ae4d62da389cc311;p=youtube-dl.git [facebook] Make embed detection stricter to prevent false-positives --- 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')