[vimeo/generic] Add support for embedded SWF vimeo videos
authorPhilipp Hagemeister <phihag@phihag.de>
Sun, 22 Dec 2013 02:34:13 +0000 (03:34 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sun, 22 Dec 2013 02:34:13 +0000 (03:34 +0100)
youtube_dl/extractor/generic.py
youtube_dl/extractor/vimeo.py

index bdb4f58d6e607a4d6ea7f5e582c927678bcc39c7..7a14c98f9b6ef9d550606c72c330d0730ec1233e 100644 (file)
@@ -222,7 +222,7 @@ class GenericIE(InfoExtractor):
             self.to_screen(u'Brightcove video detected.')
             return self.url_result(bc_url, 'Brightcove')
 
-        # Look for embedded Vimeo player
+        # Look for embedded (iframe) Vimeo player
         mobj = re.search(
             r'<iframe[^>]+?src="(https?://player.vimeo.com/video/.+?)"', webpage)
         if mobj:
@@ -230,6 +230,12 @@ class GenericIE(InfoExtractor):
             surl = smuggle_url(player_url, {'Referer': url})
             return self.url_result(surl, 'Vimeo')
 
+        # Look for embedded (swf embed) Vimeo player
+        mobj = re.search(
+            r'<embed[^>]+?src="(https?://(?:www\.)?vimeo.com/moogaloop.swf.+?)"', webpage)
+        if mobj:
+            return self.url_result(mobj.group(1), 'Vimeo')
+
         # Look for embedded YouTube player
         matches = re.findall(r'''(?x)
             (?:<iframe[^>]+?src=|embedSWF\(\s*)
index 4e8fef1655cf553e602d0719a2e42f61e9d77ac2..c3623fcbe6b01493c5ec2115f4fe5f2d32737e59 100644 (file)
@@ -26,10 +26,10 @@ class VimeoIE(InfoExtractor):
         (?:(?:www|(?P<player>player))\.)?
         vimeo(?P<pro>pro)?\.com/
         (?:.*?/)?
-        (?P<direct_link>play_redirect_hls\?clip_id=)?
+        (?:(?:play_redirect_hls|moogaloop\.swf)\?clip_id=)?
         (?:videos?/)?
         (?P<id>[0-9]+)
-        /?(?:[?].*)?(?:[#].*)?$'''
+        /?(?:[?&].*)?(?:[#].*)?$'''
     _NETRC_MACHINE = 'vimeo'
     IE_NAME = u'vimeo'
     _TESTS = [