[facebook] Improve embed detection (#5701)
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 3 Jul 2016 06:11:29 +0000 (14:11 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 3 Jul 2016 06:11:29 +0000 (14:11 +0800)
youtube_dl/extractor/facebook.py

index bbdb14366589d65c87d9a96080e22059300a3d99..f5d4f966a84f597f657d968aaa801971aed88f3e 100644 (file)
@@ -139,7 +139,7 @@ class FacebookIE(InfoExtractor):
         # Facebook API embed
         # see https://developers.facebook.com/docs/plugins/embedded-video-player
         mobj = re.search(r'''(?x)<div[^>]+
-                class=(?P<q1>[\'"])[^\'"]*\bfb-video\b[^\'"]*(?P=q1)[^>]+
+                class=(?P<q1>[\'"])[^\'"]*\bfb-(?:video|post)\b[^\'"]*(?P=q1)[^>]+
                 data-href=(?P<q2>[\'"])(?P<url>(?:https?:)?//(?:www\.)?facebook.com/.+?)(?P=q2)''', webpage)
         if mobj is not None:
             return mobj.group('url')