]> git.pld-linux.org Git - packages/clive.git/commitdiff
- drop obsolete files
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 5 Jul 2009 17:15:49 +0000 (17:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    clive-delfi.patch -> 1.24
    clive-reporter.patch -> 1.12

clive-delfi.patch [deleted file]
clive-reporter.patch [deleted file]

diff --git a/clive-delfi.patch b/clive-delfi.patch
deleted file mode 100644 (file)
index 6eea0d3..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
---- clive-2.1.14/clive~        2009-05-29 10:38:23.000000000 +0200
-+++ clive-2.1.14/clive 2009-05-29 10:38:19.000000000 +0200
-@@ -78,6 +78,7 @@
-     IsDmotion   => qr|dailymotion.com|i,
-     IsCctv      => qr|tv.cctv.com|i,
-     IsRedtube   => qr|redtube.com|i,
-+    IsDelfi     => qr|.delfi.|i,
- );
- my @re_hosts_arr = (
-@@ -91,6 +92,7 @@
-     [ $re_hosts{IsDmotion},   \&handle_dmotion ],
-     [ $re_hosts{IsCctv},      \&handle_cctv ],
-     [ $re_hosts{IsRedtube},   \&handle_redtube ],
-+    [ $re_hosts{IsDelfi},     \&handle_delfi],
- );
- # Parse config
-@@ -1016,6 +1018,64 @@
-     return ( $xurl, $video_id );
- }
-+sub handle_delfi {
-+    my ($response_ref, $response_fh) = @_;
-+ 
-+    my %re = (
-+    # videobox
-+    # http://www.delfi.ee/news/paevauudised/paevavideo/article.php?id=15218215
-+        GrabVideoboxURL => qr|flv_url:\s*'(.*?)'|,
-+    # videoproject embed
-+    # http://www.delfi.ee/news/paevauudised/paevavideo/article.php?id=18759038
-+        GrabVideoSalt   => qr|_delfiVideoSalt\s*=\s*"([^"]+)";|,
-+        GrabVideoSite   => qr|src="(\S+://[^/]+)/js/embed.js"|,
-+    # videoproject
-+    # http://video.delfi.ee/video/CzurzqNz/
-+        GrabVideoURL   => qr|\.addVariable\('file',\s*'([^']+)'|,
-+    );
-+
-+    my ($xurl, $id);
-+    my $videobox_url = $1 if $$response_ref =~ /$re{GrabVideoboxURL}/;
-+    my $video_salt   = $1 if $$response_ref =~ /$re{GrabVideoSalt}/;
-+    my $video_site   = $1 if $$response_ref =~ /$re{GrabVideoSite}/;
-+    my $video_url   = $1 if $$response_ref =~ /$re{GrabVideoURL}/;
-+
-+    if ($videobox_url) {
-+        $id = $1 if $videobox_url =~ m{/([^/]+)\.flv$};
-+        $xurl = $videobox_url;
-+
-+    } elsif ($video_url) {
-+        $xurl = URI::Escape::uri_unescape($video_url);
-+        $id = $1 if $xurl =~ m{^\S+://[^/]+/v/(.+?)\.flv};
-+
-+    } elsif ($video_salt and $video_site) {
-+        my $url = $video_site . '/video/' . $video_salt . '/';
-+        print "done.\nfetch page ..." unless $opts{quiet};
-+
-+        my $page = "";
-+        open my $fh, ">", \$page;
-+
-+        # Disable: header
-+        $curl->setopt(CURLOPT_HEADER, 0);
-+        $curl->setopt(CURLOPT_URL, $url);
-+        $curl->setopt(CURLOPT_WRITEDATA, $fh);
-+
-+        my $rc = $curl->perform;
-+        close $fh;
-+
-+        if ($rc == 0) {
-+            # recurse
-+            ($xurl, $id) = handle_delfi(\$page);
-+        } else {
-+            print STDERR "\nerror: " . $curl->strerror($rc) . " (http/$rc)\n";
-+        }
-+    } else {
-+        print STDERR "error: url not found\n";
-+    }
-+
-+    return ($xurl, $id);
-+}
-+
- # Subroutines: Progress
- # NOTE: the 'dot' progress copies much from wget.
diff --git a/clive-reporter.patch b/clive-reporter.patch
deleted file mode 100644 (file)
index 2b73d6a..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
---- clive-2.1.10/clive~ 2009-04-27 11:29:24.000000000 +0200
-+++ clive-2.1.10/clive  2009-04-27 11:30:52.000000000 +0200
-@@ -88,6 +88,7 @@
-                  IsDmotion   => qr|dailymotion.com|i,
-                  IsCctv      => qr|tv.cctv.com|i,
-                  IsDelfi     => qr|.delfi.|i,
-+                IsReporter  => qr|www.reporter.ee|i,
-                );
-
- my @re_hosts_arr = (
-@@ -101,6 +102,7 @@
-                     [$re_hosts{IsDmotion},   \&handle_dmotion],
-                     [$re_hosts{IsCctv},      \&handle_cctv],
-                     [$re_hosts{IsDelfi},     \&handle_delfi],
-+                   [$re_hosts{IsReporter},  \&handle_reporter],
-                    );
-
- # Parse config
-@@ -369,6 +372,14 @@
-                         $content_ok = 1;
-                     }
-                 }
-+            # Reporter returns "flv-application/octet-stream"
-+            } elsif ( $content_type =~ m!application/octet-stream! ) {
-+                if ( $entry{page_url} =~ /$re_hosts{IsReporter}/ ) {
-+                    if ( $opts{format} eq "flv" ) {
-+                        $entry{file_suffix} = 'flv';
-+                        $content_ok = 1;
-+                    }
-+                }
-             }
-             $errmsg = "expected different content-type, "
-                 . "received \"$content_type\"" unless $content_ok;
-@@ -1061,6 +1062,28 @@
-     return ($xurl, $id);
- }
-+sub handle_reporter {
-+    my ($response_ref, $response_fh) = @_;
-+
-+    my %re = (
-+    # http://www.reporter.ee/index.php/2008/04/21/soiduopetaja-vorpis-poiste-nupeldamisest-videoklippe/
-+        GrabVideoPrefix => qr|obj\s+=\s+{type:"video",file:"(\w+://[^"]+)|,
-+        GrabVideoID     => qr|attributes\s+=\s+{id:\s+"video([^"]+)"|,
-+    );
-+
-+    my $xurl;
-+    my $id     = $1 if $$response_ref =~ /$re{GrabVideoID}/;
-+    my $prefix = $1 if $$response_ref =~ /$re{GrabVideoPrefix}/;
-+
-+    if ($id and $prefix) {
-+        $xurl = $prefix . $id . '.flv';
-+    } else {
-+        print STDERR "error: url not found\n";
-+    }
-+
-+    return ($xurl, $id);
-+}
-+
- # Subroutines: Progress
- # NOTE: the 'dot' progress copies much from wget.
This page took 0.104873 seconds and 4 git commands to generate.