X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fwebsites%2Fredtube.rb;h=4a34bbc2dc98ddb58f1f694f50adbb5b1e7ddd49;hb=83e06f83d8274cb32a406739839d56e759664b09;hp=9ecdceccd7d1575a0167d3d84738a048b10fba3a;hpb=2c835ed7a247ed5639277bc9674b848722ad998d;p=dead%2Fwhatever-dl.git diff --git a/src/websites/redtube.rb b/src/websites/redtube.rb index 9ecdcec..4a34bbc 100644 --- a/src/websites/redtube.rb +++ b/src/websites/redtube.rb @@ -45,9 +45,9 @@ class Redtube < Website # The only public method. This calls the other parts # of the algorithm and, with any luck, we wind up with # the URL to the video. - def get_video_url(url) + def get_video_url() # First, parse the video ID out of the URL. - video_id = /\d+/.match(url)[0] + video_id = parse_video_id() padded_id = video_id.to_s.pad_left('0', 7) @@ -64,6 +64,11 @@ class Redtube < Website protected VIDEO_FILE_EXTENSION = '.flv' + + def parse_video_id() + return /\d+/.match(@url)[0] + end + # Not sure what they're thinking with this one. def get_video_dir(video_id)