X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=blobdiff_plain;f=src%2Fwebsites%2Ftnaflix.rb;h=cc6bfd0d1ff069c506a441168274bc919f40b7b7;hp=7fd5f9098990f20398e7be3bd05f052c6fe58cb6;hb=8e886df259246365023322b78f58e4037cb536a4;hpb=34e42ad8644d4f25b2dc3734abf7407055e9992c diff --git a/src/websites/tnaflix.rb b/src/websites/tnaflix.rb index 7fd5f90..cc6bfd0 100644 --- a/src/websites/tnaflix.rb +++ b/src/websites/tnaflix.rb @@ -29,11 +29,6 @@ class Tnaflix < Website def get_video_url() - # First, figure out the video id from the URL. - # Then we download the page, and parse the Flash - # variable that we need to construct the URL. - video_id = self.parse_video_id() - # The old player page has the video URL conveniently # stored in one variable. old_player_url = @url + '&player=old' @@ -53,7 +48,7 @@ class Tnaflix < Website def parse_video_id() video_id_regex = /([[:alnum:]]+)(&player=old)?$/ matches = video_id_regex.match(@url) - video_id = matches[1] if not (matches.nil? || matches.length < 2) + video_id = matches[1] if not matches.nil? || matches.length < 2 return video_id end @@ -64,7 +59,7 @@ class Tnaflix < Website def parse_video_url(page_data) video_url_regex = /addVariable\(\'videoUrl\',\'([^\']+)/ matches = video_url_regex.match(page_data) - video_url = matches[1] if not (matches.nil? || matches.length < 1) + video_url = matches[1] if not matches.nil? || matches.length < 1 return video_url end