]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[youtube] Support watch_popup URLs (Fixes #1275)
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 19 Aug 2013 08:27:42 +0000 (10:27 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 19 Aug 2013 08:27:42 +0000 (10:27 +0200)
test/test_all_urls.py
youtube_dl/extractor/youtube.py

index c73d0e4679853b3e80bd9832a57b0d804265895a..c54faa380e44a57969563109d3a7baaf11e835c7 100644 (file)
@@ -50,6 +50,7 @@ class TestAllURLsMatching(unittest.TestCase):
         self.assertEqual(YoutubeIE()._extract_id('http://www.youtube.com/watch?&v=BaW_jenozKc'), 'BaW_jenozKc')
         self.assertEqual(YoutubeIE()._extract_id('https://www.youtube.com/watch?&v=BaW_jenozKc'), 'BaW_jenozKc')
         self.assertEqual(YoutubeIE()._extract_id('https://www.youtube.com/watch?feature=player_embedded&v=BaW_jenozKc'), 'BaW_jenozKc')
+        self.assertEqual(YoutubeIE()._extract_id('https://www.youtube.com/watch_popup?v=BaW_jenozKc'), 'BaW_jenozKc')
 
     def test_no_duplicates(self):
         ies = gen_extractors()
index f7471895052ed328465b888ba402eeebaa1351d6..843a973ca720d778ba1b2f6f41761e126237549d 100644 (file)
@@ -141,7 +141,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                          (?:                                                  # the various things that can precede the ID:
                              (?:(?:v|embed|e)/)                               # v/ or embed/ or e/
                              |(?:                                             # or the v= param in all its forms
-                                 (?:watch|movie(?:_popup)?(?:\.php)?)?              # preceding watch(_popup|.php) or nothing (like /?v=xxxx)
+                                 (?:(?:watch|movie)(?:_popup)?(?:\.php)?)?    # preceding watch(_popup|.php) or nothing (like /?v=xxxx)
                                  (?:\?|\#!?)                                  # the params delimiter ? or # or #!
                                  (?:.*?&)?                                    # any other preceding param (like /?s=tuff&v=xxxx)
                                  v=