aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-08-19 10:27:42 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-08-19 10:27:42 +0200
commitd741e55a423a09c40b3c5e19551f432a050353d7 (patch)
tree5ae78d1cc8de87eaf361aea5fd069b84d3154fd7
parent17d3aaaf16c0db70d94eea07777e1c03e8058c6b (diff)
[youtube] Support watch_popup URLs (Fixes #1275)
-rw-r--r--test/test_all_urls.py1
-rw-r--r--youtube_dl/extractor/youtube.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/test/test_all_urls.py b/test/test_all_urls.py
index c73d0e467..c54faa380 100644
--- a/test/test_all_urls.py
+++ b/test/test_all_urls.py
@@ -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()
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index f74718950..843a973ca 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -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=