SVN: toys/rsget.pl/Premium/.template
sparky
sparky at pld-linux.org
Mon Dec 6 00:44:43 CET 2010
Author: sparky
Date: Mon Dec 6 00:44:43 2010
New Revision: 11952
Added:
toys/rsget.pl/Premium/.template (contents, props changed)
Log:
- simple template
Added: toys/rsget.pl/Premium/.template
==============================================================================
--- (empty file)
+++ toys/rsget.pl/Premium/.template Mon Dec 6 00:44:43 2010
@@ -0,0 +1,37 @@
+# $Id$
+# Premium::[NAME] - Premium file getter plugin for rsget.pl
+#
+# 2010 (c) ??? <???@???.??>
+# This program is free software,
+# you may distribute it under GPL v2 or newer.
+
+name: [NAME]
+short: *[NAME]
+web: "http://gsite.com/"
+uri: qr{gsite\.com/}
+slots: max
+status: OK [DATE]
+
+pre:
+ my ($user, $pass);
+
+ if ( my $s = setting("premium_" . lc "[NAME]" ) ) {
+ ($user, $pass) = ($s =~ /^(.+?):(.+)/) or die "Premium user:pass incorrect\n";
+ } else {
+ die "Premium user:pass not given\n";
+ }
+
+unify:
+ return $_;
+
+start:
+ GET( $-{_uri} );
+
+ ERROR( "file not found: $1" )
+ if /^ERROR: (File .*)/;
+
+ CLICK( "http://login", post => { user => $user, password => $pass } );
+
+ DOWNLOAD( "file" );
+
+# vim: filetype=perl:ts=4:sw=4
More information about the pld-cvs-commit
mailing list