]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/commitdiff
Fix the Vimeo class for their new scheme.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 2 Jun 2011 17:04:01 +0000 (13:04 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 2 Jun 2011 17:04:01 +0000 (13:04 -0400)
src/websites/vimeo.rb

index 72ed31301495386faa2606103a85e9752a4f36b8..c259b7c602e1cc5c8bf709a8444efbaa426d868f 100644 (file)
@@ -38,13 +38,20 @@ class Vimeo < Website
     details_url = "http://www.vimeo.com/moogaloop/load/clip:#{video_id}/local"
     details_data = get_page_data(details_url)
 
-    
     request_signature = parse_request_signature(details_data)
     request_signature_expires = parse_request_signature_expires(details_data)
     quality = parse_quality(details_data)
+
+    referer = "http://a.vimeocdn.com/p/flash/moogaloop/5.1.15/moogaloop.swf"
+    referer += "?v=1.0.0"
+    referer += "&time=#{request_signature_expires}"
+    self.headers['Referer'] = referer
     
-    # Being slightly explicit about what we're doing here...
-    video_url = "http://www.vimeo.com/moogaloop/play/clip:#{video_id}/#{request_signature}/#{request_signature_expires}/?q=#{quality}"
+    video_url = "http://player.vimeo.com/play_redirect?clip_id=#{video_id}"
+    video_url += "&sig=#{request_signature}"
+    video_url += "&time=#{request_signature_expires}"
+    video_url += "&quality=#{quality}"
+    video_url += "&codecs=H264,VP8,VP6"
     
     return video_url
   end