X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=blobdiff_plain;f=src%2Fwebsites%2Fvimeo.rb;h=a6a4ea36b3e5ae793b4fadf7aa24972535304956;hp=f8e6ad3525f2d681597ccc931c3018452b7bfe95;hb=8e886df259246365023322b78f58e4037cb536a4;hpb=34e42ad8644d4f25b2dc3734abf7407055e9992c diff --git a/src/websites/vimeo.rb b/src/websites/vimeo.rb index f8e6ad3..a6a4ea3 100644 --- a/src/websites/vimeo.rb +++ b/src/websites/vimeo.rb @@ -77,9 +77,9 @@ class Vimeo < Website # If that didn't work, the URL must be of the clip_id= form. video_id_regex = /clip_id\=(\d+)/ matches = video_id_regex.match(@url) - video_id = matches[1] if not (matches.nil? || matches.length < 1) + video_id = matches[1] if not matches.nil? || matches.length < 1 else - video_id = matches[1] if not (matches.nil? || matches.length < 1) + video_id = matches[1] if not matches.nil? || matches.length < 1 end return video_id @@ -90,7 +90,7 @@ class Vimeo < Website # It's XML. rs_regex = /(.*?)<\/request_signature>/ matches = rs_regex.match(page_data) - request_signature = matches[1] if not (matches.nil? || matches.length < 1) + request_signature = matches[1] if not matches.nil? || matches.length < 1 return request_signature end @@ -99,16 +99,16 @@ class Vimeo < Website def parse_request_signature_expires(page_data) rse_regex = /(.*?)<\/request_signature_expires>/ matches = rse_regex.match(page_data) - request_signature_expires = matches[1] if not (matches.nil? || matches.length < 1) + rse = matches[1] if not matches.nil? || matches.length < 1 - return request_signature_expires + return rse end def parse_quality(page_data) - quality_regex = /([01])<\isHD>/ + quality_regex = /([01])<\/isHD>/ matches = quality_regex.match(page_data) - is_hd = matches[1] if not (matches.nil? || matches.length < 1) + is_hd = matches[1] if not matches.nil? || matches.length < 1 if is_hd == '1' then # High-definition