Support for youtube.com/embed/XXXXX URLs (closes #63)
authorLionel Elie Mamane <lionel@mamane.lu>
Tue, 25 Jan 2011 07:37:08 +0000 (08:37 +0100)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Tue, 25 Jan 2011 18:00:45 +0000 (19:00 +0100)
youtube-dl

index 99c9afe0a0421241cf353ed1d93230b4ffd1de3e..640c8777d81f766a9e26e10b48ad635a45a207eb 100755 (executable)
@@ -814,7 +814,7 @@ class InfoExtractor(object):
 class YoutubeIE(InfoExtractor):
        """Information extractor for youtube.com."""
 
-       _VALID_URL = r'^((?:https?://)?(?:youtu\.be/|(?:\w+\.)?youtube(?:-nocookie)?\.com/)(?:(?:v/)|(?:(?:watch(?:_popup)?(?:\.php)?)?(?:\?|#!?)(?:.+&)?v=)))?([0-9A-Za-z_-]+)(?(1).+)?$'
+       _VALID_URL = r'^((?:https?://)?(?:youtu\.be/|(?:\w+\.)?youtube(?:-nocookie)?\.com/)(?:(?:(?:v|embed)/)|(?:(?:watch(?:_popup)?(?:\.php)?)?(?:\?|#!?)(?:.+&)?v=)))?([0-9A-Za-z_-]+)(?(1).+)?$'
        _LANG_URL = r'http://www.youtube.com/?hl=en&persist_hl=1&gl=US&persist_gl=1&opt_out_ackd=1'
        _LOGIN_URL = 'https://www.youtube.com/signup?next=/&gl=US&hl=en'
        _AGE_URL = 'http://www.youtube.com/verify_age?next_url=/&gl=US&hl=en'