]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[youtube] Match more truncated URLs (Closes #2402)
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 17 Feb 2014 13:56:21 +0000 (14:56 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 17 Feb 2014 13:56:21 +0000 (14:56 +0100)
test/test_all_urls.py
youtube_dl/extractor/youtube.py

index aa8e4e4bdc9d2e407ad122b6d15bd3e6e0ade143..7a78005a3a32f1e25609ac95e6004c39706e72a2 100644 (file)
@@ -68,6 +68,9 @@ class TestAllURLsMatching(unittest.TestCase):
     def test_youtube_show_matching(self):
         self.assertMatch('http://www.youtube.com/show/airdisasters', ['youtube:show'])
 
+    def test_youtube_truncated(self):
+        self.assertMatch('http://www.youtube.com/watch?', ['youtube:truncated_url'])
+
     def test_justin_tv_channelid_matching(self):
         self.assertTrue(JustinTVIE.suitable(u"justin.tv/vanillatv"))
         self.assertTrue(JustinTVIE.suitable(u"twitch.tv/vanillatv"))
index a8103684301eef0711fdb1f28bd15dcb40c6430b..059cf8cbd3a5ef86033cb40a26ce183347c3db46 100644 (file)
@@ -1815,7 +1815,7 @@ class YoutubeTruncatedURLIE(InfoExtractor):
     IE_NAME = 'youtube:truncated_url'
     IE_DESC = False  # Do not list
     _VALID_URL = r'''(?x)
-        (?:https?://)?[^/]+/watch\?feature=[a-z_]+$|
+        (?:https?://)?[^/]+/watch\?(?:feature=[a-z_]+)?$|
         (?:https?://)?(?:www\.)?youtube\.com/attribution_link\?a=[^&]+$
     '''