[facebook] Allow '?' before '#!' (fixes #3477)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 10 Aug 2014 09:55:24 +0000 (11:55 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 10 Aug 2014 09:57:15 +0000 (11:57 +0200)
test/test_all_urls.py
youtube_dl/extractor/facebook.py

index 0ff47cf1ead4a2c89aa24a83023a1d29cde31717..b1ad30bf10ad08a19e14658a8299c006f54c03fa 100644 (file)
@@ -99,6 +99,7 @@ class TestAllURLsMatching(unittest.TestCase):
 
     def test_facebook_matching(self):
         self.assertTrue(FacebookIE.suitable('https://www.facebook.com/Shiniknoh#!/photo.php?v=10153317450565268'))
+        self.assertTrue(FacebookIE.suitable('https://www.facebook.com/cindyweather?fref=ts#!/photo.php?v=10152183998945793'))
 
     def test_no_duplicates(self):
         ies = gen_extractors()
index f0cd8f1565b7e7b1b5220ba0f68d0b9225d953e6..f7cf700b5df8ecbcd714fd23db3dc7ff477adb73 100644 (file)
@@ -20,7 +20,7 @@ from ..utils import (
 class FacebookIE(InfoExtractor):
     _VALID_URL = r'''(?x)
         https?://(?:\w+\.)?facebook\.com/
-        (?:[^#?]*\#!/)?
+        (?:[^#]*?\#!/)?
         (?:video/video\.php|photo\.php|video/embed)\?(?:.*?)
         (?:v|video_id)=(?P<id>[0-9]+)
         (?:.*)'''