Allow proper subclassing of complete Getters/Grabbers
authorRalf Ertzinger <ralf@skytale.net>
Wed, 24 Apr 2013 11:42:37 +0000 (13:42 +0200)
committerRalf Ertzinger <ralf@skytale.net>
Wed, 24 Apr 2013 11:42:37 +0000 (13:42 +0200)
28 files changed:
videosite/AsyncFileGetter.pm
videosite/AsyncWgetFileGetter.pm
videosite/BlipTVGrabber.pm
videosite/BreakGrabber.pm
videosite/BroadcasterGrabber.pm
videosite/CollegeHumorGrabber.pm
videosite/DailyMotionGrabber.pm
videosite/DoubleVikingGrabber.pm
videosite/FileGetter.pm
videosite/GoogleGrabber.pm
videosite/HTTPJSONGetter.pm
videosite/HTTPRPCGetter.pm
videosite/LiveLeakGrabber.pm
videosite/MNCastGrabber.pm
videosite/MetaCafeGrabber.pm
videosite/MotherlessGrabber.pm
videosite/MyVideoGrabber.pm
videosite/NullGetter.pm
videosite/RedTubeGrabber.pm
videosite/SevenloadGrabber.pm
videosite/SnotrGrabber.pm
videosite/SpikedHumorGrabber.pm
videosite/VeohGrabber.pm
videosite/VimeoGrabber.pm
videosite/WimpGrabber.pm
videosite/YahooGrabber.pm
videosite/YouTubeGrabber.pm
videosite/ZeroPunctuationGrabber.pm

index 4250bf4..c47f9dd 100644 (file)
@@ -22,6 +22,7 @@ sub new {
     my $class = shift;
     my $self = $class->SUPER::new(
         NAME => 'asyncfilegetter',
+        @_,
     );
 
     return bless($self, $class);
index fd8c5f9..7a3642a 100644 (file)
@@ -22,6 +22,7 @@ sub new {
     my $class = shift;
     my $self = $class->SUPER::new(
         NAME => 'asyncwgetfilegetter',
+        @_,
     );
 
     return bless($self, $class);
index 20dc0d5..86084dd 100644 (file)
@@ -21,6 +21,7 @@ sub new {
         _SELFTESTURL => 'http://blip.tv/rebelliouspixelscom/buffy-vs-edward-twilight-remixed-2274024',
         _SELFTESTTITLE => 'Buffy vs Edward (Twilight Remixed)',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*blip.tv/\S+/\S+)'],
+        @_,
     );
 
     return bless($self, $class);
index 6e4d02f..6bd77e1 100644 (file)
@@ -18,6 +18,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'break',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*break.com/index/([-a-zA-Z0-9_]+?)\.html)'],
+        @_,
     );
 
     return bless($self, $class);
index 8e18e12..4c37101 100644 (file)
@@ -18,6 +18,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'broadcaster',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*broadcaster\.com/clip/(\d+))'],
+        @_,
     );
 
     return bless($self, $class);
index 1e20d69..c7851e3 100644 (file)
@@ -22,6 +22,7 @@ sub new {
         _SELFTESTTITLE => 'Pixar Intro Parody',
         PATTERNS => ['(http://www.collegehumor.com/video:(\d+))',
                      '(http://www.collegehumor.com/video/(\d+))'],
+        @_,
     );
 
     return bless($self, $class);
index aa7d279..3e1e77f 100644 (file)
@@ -19,6 +19,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'dailymotion',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*dailymotion.com/(?:[^/]+/)*video/([-a-zA-Z0-9_]+))'],
+        @_,
     );
 
     return bless($self, $class);
index 81ba370..027395e 100644 (file)
@@ -18,6 +18,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'doubleviking',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*doubleviking.com/videos/(?:[-a-zA-Z0-9_ %]+/)*page0\.html/(\d+)\.html$)'],
+        @_,
     );
 
     return bless($self, $class);
index 0d2b250..b2a0cea 100644 (file)
@@ -20,6 +20,7 @@ sub new {
             MINFREE => ['500000', 'The amount of space that needs to be available on the filesystem before the video is downloaded (in kilobytes)'],
             FILEPATTERN => ['/tmp/%s - %s - %s.flv', "The file name to save the file under. This is a string which is passed to a sprintf call later on. The parameters passed to that sprintf call, in order, are:\n- The site the video is from\n- The ID of the video\n- The title of the video\n- The URL of the video file itself\n- The URL of the site the video was taken from\nAll parameters are encoded (space and / replaced by _)"]
         },
+        @_,
     );
 
     return bless($self, $class);
index 665fc44..51d0e2e 100644 (file)
@@ -21,6 +21,7 @@ sub new {
         _PARAMS => {
             QUALITY => ['normal', 'Quality of the video to download. normal = standard resolution flash video, h264 = high resolution MPEG4 video']
         },
+        @_,
     );
 
     return bless($self, $class);
index 0c409a9..4db0ed8 100644 (file)
@@ -19,6 +19,7 @@ sub new {
         _PARAMS => {
             URL => ['http://www.example.com/getjson.pl', "The URL to call in order to trigger a download. The JSON encoded information will be POSTed to this URL."]
         },
+        @_,
     );
 
     return bless($self, $class);
index fb0fd95..e82e218 100644 (file)
@@ -19,6 +19,7 @@ sub new {
         _PARAMS => {
             URL => ['http://www.example.com/get.pl?type=%s&vid=%s&title=%s&url=%s', "The URL to call in order to trigger a download. This is a string which is passed to a sprintf call later on. The parameters passed to that sprintf call, in order, are:\n- The site the video is from\n- The ID of the video\n- The title of the video\n- The URL of the video file itself\n- The URL of the site the video was taken from\nAll parameters are hexencoded"]
         },
+        @_,
     );
 
     return bless($self, $class);
index b0d6fee..4521f37 100644 (file)
@@ -18,6 +18,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'liveleak',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*liveleak.com/view\?i=([^\&]+))'],
+        @_,
     );
 
     return bless($self, $class);
index 7b12e03..45954f9 100644 (file)
@@ -19,6 +19,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'mncast',
         PATTERNS => ['(http://www\.mncast\.com/\?(\d+))'],
+        @_,
     );
 
     return bless($self, $class);
index e7f51d5..ccab7a9 100644 (file)
@@ -18,6 +18,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'metacafe',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*metacafe.com/watch/(\d+)(?:\S+)?)'],
+        @_,
     );
 
     return bless($self, $class);
index 0b24870..681b733 100644 (file)
@@ -22,6 +22,7 @@ sub new {
         _SELFTESTURL => 'http://motherless.com/4976432',
         _SELFTESTTITLE => 'Teen masturbation in shower',
         _PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*motherless.com/([a-zA-Z0-9]+))'],
+        @_,
     );
 
     return bless($self, $class);
index e908ebd..7be3806 100644 (file)
@@ -18,6 +18,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'myvideo',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*myvideo.de/watch/(\d+))'],
+        @_,
     );
 
     return bless($self, $class);
index 27aa76e..3a16c0c 100644 (file)
@@ -16,6 +16,7 @@ sub new {
     my $class = shift;
     my $self = $class->SUPER::new(
         NAME => 'nullgetter',
+        @_,
     );
 
     return bless($self, $class);
index 0966ca9..72036b8 100644 (file)
@@ -23,6 +23,7 @@ sub new {
         _SELFTESTURL => 'http://www.redtube.com/8269',
         _SELFTESTTITLE => 'Porn bloopers with pretty girl',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*redtube.com/(\d+))'],
+        @_,
     );
 
     return bless($self, $class);
index 897b24b..f58c00e 100644 (file)
@@ -20,6 +20,7 @@ sub new {
         _SELFTESTURL => 'http://de.sevenload.com/videos/uqDvKzh-vilogo-TV-Spot',
         _SELFTESTTITLE => 'vilogo TV-Spot',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*sevenload.com/videos/(\w+?)-.*)'],
+        @_,
     );
 
     return bless($self, $class);
index 9f4e857..87b7a10 100644 (file)
@@ -20,6 +20,7 @@ sub new {
         _SELFTESTURL => 'http://www.snotr.com/video/1836',
         _SELFTESTTITLE => 'Brilliant thief',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*snotr\.com/video/(\d+))'],
+        @_,
     );
 
     return bless($self, $class);
index b903ad8..880263f 100644 (file)
@@ -18,6 +18,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'spikedhumor',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*spikedhumor.com/articles/(\d+)(?:/.*)*)'],
+        @_,
     );
 
     return bless($self, $class);
index 1b118d1..c33f1d8 100644 (file)
@@ -19,6 +19,7 @@ sub new {
         _SELFTESTURL => 'http://www.veoh.com/watch/v18348952fyn2twbe',
         _SELFTESTTITLE => '518_2 kureyon shinchan',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*veoh.com/+watch/(\w+)\??)'],
+        @_,
     );
 
     return bless($self, $class);
index e39c494..19dfe94 100644 (file)
@@ -21,6 +21,7 @@ sub new {
         _SELFTESTURL => 'http://vimeo.com/35055590',
         _SELFTESTTITLE => 'Hello',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*vimeo.com/(?:m/)?(\d+))'],
+        @_,
     );
 
     return bless($self, $class);
index a09a39e..cffc02c 100644 (file)
@@ -21,6 +21,7 @@ sub new {
         _SELFTESTURL => 'http://www.wimp.com/insanebuilding/',
         _SELFTESTTITLE => 'Insane building.',
         PATTERNS => ['(http://(?:[-a-zA-Z0-9_.]+\.)*wimp.com/([^/]+)/?)'],
+        @_,
     );
 
     return bless($self, $class);
index 44715f9..4c88842 100644 (file)
@@ -19,6 +19,7 @@ sub new {
     my $self = $class->SUPER::new(
         NAME => 'yahoo',
         PATTERNS => ['(http://video\.yahoo\.com/watch/\d+/(\d+))'],
+        @_,
     );
 
     return bless($self, $class);
index 59d748b..28f5007 100644 (file)
@@ -76,6 +76,7 @@ sub new {
             PASSWORD => ['', 'Password to use for YouTube login'],
             HTTPS => [1, 'Whether to use HTTPS (if available) to connect to YouTube']
         },
+        @_,
     );
 
     return bless($self, $class);
index 241f4b6..f40da05 100644 (file)
@@ -21,6 +21,7 @@ sub new {
         _SELFTESTURL => 'http://www.escapistmagazine.com/videos/view/zero-punctuation/5346-Amy',
         _SELFTESTTITLE =>'Amy',
         PATTERNS => ['(http://www.escapistmagazine.com/videos/view/zero-punctuation/([-A-Za-z0-9]+))'],
+        @_,
     );
 
     return bless($self, $class);