SVN: toys/rsget.pl/Link/YouTube

sparky sparky at pld-linux.org
Wed Feb 24 20:46:43 CET 2010


Author: sparky
Date: Wed Feb 24 20:46:43 2010
New Revision: 11175

Added:
   toys/rsget.pl/Link/YouTube   (contents, props changed)
Log:
- add video playlist support


Added: toys/rsget.pl/Link/YouTube
==============================================================================
--- (empty file)
+++ toys/rsget.pl/Link/YouTube	Wed Feb 24 20:46:43 2010
@@ -0,0 +1,31 @@
+# $Id$
+# Link::YouTube - Link decrypter plugin for rsget.pl
+#
+# 2010 (c) Przemysław Iskra <sparky at pld-linux.org>
+#		This program is free software,
+# you may distribute it under GPL v2 or newer.
+
+name: YouTube
+short: L:YouTube
+web: "http://www.youtube.com/"
+uri: qr{youtube\.com/view_play_list\?p=([A-F0-9]{16})}
+slots: max
+status: OK 2010-02-24
+
+unify:
+	return "http://www.youtube.com/view_play_list?p=$1"
+		if m{youtube\.com/view_play_list\?p=([A-F0-9]{16})};
+
+start:
+	GET( $-{_uri} );
+
+stage_morelinks:
+	push @{$-{list}}, $1 while s#<a class="video-thumb-120" href="(/watch\?v=.*?)\&feature=PlayList##;
+
+	if ( m{class="pagerCurrent".*<a href='(.*/view_play_list\?p=.{16}&page=\d+)' class="pagerNotCurrent" >}s ) {
+		GET_NEXT( stage_morelinks, $1 );
+	}
+
+	LINK( map "http://www.youtube.com$_", @{$-{list}} );
+
+# vim: filetype=perl:ts=4:sw=4


More information about the pld-cvs-commit mailing list