1 --- clive-2.1.2/clive~ 2009-01-01 13:27:50.000000000 +0000
2 +++ clive-2.1.2/clive 2009-01-01 13:33:20.000000000 +0000
4 IsLastfm => qr|\Qlast.fm\E|i,
5 IsLiveleak => qr|\Qliveleak.com\E|i,
6 IsDelfi => qr|\Q.delfi.\E|i,
7 + IsReporter => qr|\Qwww.reporter.ee\E|i,
8 IsEvisor => qr|\Qevisor.tv\E|i,
9 #IsMetacafe => qr|\Qmetacafe.com\E|i,
12 ($xurl, $id) = handle_liveleak($response_ref, $response_fh);
13 } elsif ( $url =~ /$re_hosts{IsDelfi}/ ) {
14 ($xurl, $id) = handle_delfi($response_ref, $response_fh);
15 + } elsif ( $url =~ /$re_hosts{IsReporter}/ ) {
16 + ($xurl, $id) = handle_reporter($response_ref, $response_fh);
17 } elsif ( $url =~ /$re_hosts{IsEvisor}/ ) {
18 ($xurl, $id) = handle_evisor($response_ref);
24 + # Reporter returns "flv-application/octet-stream"
25 + } elsif ( $content_type =~ m!application/octet-stream! ) {
26 + if ( $entry{page_url} =~ /$re_hosts{IsReporter}/ ) {
27 + if ( $opts{format} eq "flv" ) {
28 + $entry{file_suffix} = 'flv';
33 $errmsg = "expected different content-type, "
34 . "received \"$content_type\""
36 GrabVideoSite => qr|src="(\S+://[^/]+)/js/embed.js"|,
38 # http://video.delfi.ee/video/CzurzqNz/
39 + # http://video.delfi.ee/video/Uu4gF58g/
40 GrabVideoURL => qr|\.addVariable\('file',\s*'([^']+)'|,
47 +sub handle_reporter {
48 + my ($response_ref, $response_fh) = @_;
51 + # http://www.reporter.ee/index.php/2008/04/21/soiduopetaja-vorpis-poiste-nupeldamisest-videoklippe/
52 + GrabVideoPrefix => qr|obj\s
53 + GrabVideoID => qr|attributes\s
57 + my $id = $1 if $$response_ref =~ /$re{GrabVideoID}/;
58 + my $prefix = $1 if $$response_ref =~ /$re{GrabVideoPrefix}/;
60 + if ($id and $prefix) {
61 + $xurl = $prefix . $id . '.flv';
63 + print STDERR "error: url not found\n";
66 + return ($xurl, $id);
69 # Subroutines: Progress
70 # NOTE: the 'dot' progress copies much from wget.