Bug#640422: clive: Please add support for videobash

Thomas Preud'homme robotux at celest.fr
Sun Sep 4 22:27:05 UTC 2011


Package: clive
Version: 2.2.26-1
Severity: wishlist
Tags: patch upstream

Please add support for videobash.com videos. Attached is a patch which
works for me (tested on 5 videos).

Best regards,

Thomas Preud'homme

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'stable-updates'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages clive depends on:
ii  libclass-singleton-perl         1.4-1    
ii  libconfig-tiny-perl             2.14-1   
ii  libexpect-perl                  1.21-1   
ii  libgetopt-argvfile-perl         1.11-1   
ii  libhtml-parser-perl             3.68-1+b1
ii  liburi-perl                     1.59-1   
ii  libwww-curl-perl                4.15-1+b1
ii  perl                            5.12.4-4 
ii  perl-modules [libversion-perl]  5.12.4-4 

Versions of packages clive recommends:
ii  clive-utils           2.1.6-1  
ii  libberkeleydb-perl    0.48-1   
ii  libterm-readkey-perl  2.30-4+b1

Versions of packages clive suggests:
ii  ffmpeg  4:0.7.1-4

-- no debconf information
-------------- next part --------------
Description: Add support for Videobash
Author: Thomas Preud'homme <robotux at celest.fr>
Origin: vendor
Forwarded: no
Last-Update: 2011-09-04
---
--- clive-2.2.26.orig/lib/clive/HostFactory.pm
+++ clive-2.2.26/lib/clive/HostFactory.pm
@@ -46,6 +46,7 @@ my @_hosts = (
     [ "Clipfish",  qr|clipfish.de|i,   "default" ],
     [ "Funnyhub",  qr|funnyhub.com|i,  "default" ],
     [ "Buzzhumor", qr|buzzhumor.com|i, "default" ],
+    [ "Videobash", qr|videobash.com|i, "default" ],
 );
 
 sub new {
--- /dev/null
+++ clive-2.2.26/lib/clive/Host/Videobash.pm
@@ -0,0 +1,50 @@
+# -*- coding: ascii -*-
+###########################################################################
+# clive, command line video extraction utility.
+#
+# Copyright 2011 Thomas Preud'homme.
+#
+# This file is part of clive.
+#
+# clive is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# clive is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+###########################################################################
+package clive::Host::Videobash;
+
+use warnings;
+use strict;
+
+sub new {
+    return bless( {}, shift );
+}
+
+sub parsePage {
+    my ( $self, $content, $props ) = @_;
+
+    $$props->video_host("videobash");
+
+    my %re = (
+        id  => qr|video_url=.*?_(.*?)\.|,
+        url => qr|video_url=(.*?)\?|,
+    );
+
+    my $tmp;
+    if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) {
+        $$props->video_id( $tmp->{id} );
+        $$props->video_link( $tmp->{url} );
+        return (0);
+    }
+    return (1);
+}
+
+1;


More information about the pkg-perl-maintainers mailing list