]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/blobdiff - src/websites/redtube.rb
Made the output filename the responsibility of the website subclass.
[dead/whatever-dl.git] / src / websites / redtube.rb
index 9ecdceccd7d1575a0167d3d84738a048b10fba3a..4a34bbc2dc98ddb58f1f694f50adbb5b1e7ddd49 100644 (file)
@@ -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)