SVN: toys/rsget.pl/Video: DailyMotion Google YouTube

sparky sparky at pld-linux.org
Sun Oct 4 21:00:52 CEST 2009


Author: sparky
Date: Sun Oct  4 21:00:52 2009
New Revision: 10686

Modified:
   toys/rsget.pl/Video/DailyMotion
   toys/rsget.pl/Video/Google
   toys/rsget.pl/Video/YouTube
Log:
- add quality information


Modified: toys/rsget.pl/Video/DailyMotion
==============================================================================
--- toys/rsget.pl/Video/DailyMotion	(original)
+++ toys/rsget.pl/Video/DailyMotion	Sun Oct  4 21:00:52 2009
@@ -2,7 +2,7 @@
 
 name: DailyMotion
 short: V:DailyMotion
-uri: qr{dailymotion\.com/(.*?/)?video/[a-z0-9]+}
+uri: qr{dailymotion\.(com|pl)/(.*?/)?video/[a-z0-9]+}
 slots: 8
 status: OK 2009-10-04
 
@@ -27,10 +27,12 @@
 		$best_size = $1;
 		$best_uri = $uri;
 	}
+
 	my $ext = "mp4";
-	$ext = "flv" if $best_uri =~ m{/cdn/FLV-};
+	! $best_uri =~ m{/cdn/((.*?)-\d+x\d+)};
+	$ext = "flv" if $2 eq "FLV";
 	my $fname = $name . "." . $ext;
-	INFO( name => $fname, size => -1 );
+	INFO( name => $fname, quality => $1 );
 
 	DOWNLOAD( $best_uri, fname => $fname );
 

Modified: toys/rsget.pl/Video/Google
==============================================================================
--- toys/rsget.pl/Video/Google	(original)
+++ toys/rsget.pl/Video/Google	Sun Oct  4 21:00:52 2009
@@ -15,15 +15,16 @@
 	! m{<title>(.*?)</title>};
 	my $name = de_ml( $1 );
 	$name =~ s{/}{_}g;
-	INFO( name => $name, size => -1 );
 
 	my @file_uri;
 	if ( /<a href=(http.*?ck1)>/ ) {
 		@file_uri = ( $1 );
+		INFO( ainame => $name, quality => "mp4" );
 	} else {
 		! m{videoUrl\\x3d(.*?)\\x26};
 		@file_uri = (uri_unescape( $1 ),
 			fname => "$name.flv" );
+		INFO( name => "$name.flv", quality => "flv" );
 	}
 
 	DOWNLOAD( @file_uri );

Modified: toys/rsget.pl/Video/YouTube
==============================================================================
--- toys/rsget.pl/Video/YouTube	(original)
+++ toys/rsget.pl/Video/YouTube	Sun Oct  4 21:00:52 2009
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 
 name: YouTube
-short: V:YT
+short: V:YouTube
 uri: qr{youtube\.com/watch\?v=.*}
 slots: 8
 status: OK 2009-10-03
@@ -33,7 +33,7 @@
 	my $t = $1;
 
 	my $fname = $name . "." . $ext;
-	INFO( name => $fname, size => -1 );
+	INFO( name => $fname, quality => "fmt$fmt" );
 
 	DOWNLOAD( "http://youtube.com/get_video?video_id=$-{v}&t=$t&fmt=$fmt",
 		fname => $fname );


More information about the pld-cvs-commit mailing list