SVN: toys/rsget.pl/Get/Hostuje

pawelz pawelz at pld-linux.org
Sun Sep 26 18:36:51 CEST 2010


Author: pawelz
Date: Sun Sep 26 18:36:50 2010
New Revision: 11816

Added:
   toys/rsget.pl/Get/Hostuje   (contents, props changed)
Log:
- new plugin Get::Hostuje (RSGETPL-38)
- raw, needs more work (errors handling, etc)


Added: toys/rsget.pl/Get/Hostuje
==============================================================================
--- (empty file)
+++ toys/rsget.pl/Get/Hostuje	Sun Sep 26 18:36:50 2010
@@ -0,0 +1,29 @@
+# $Id$
+# Get::Hostuje - File getter plugin for rsget.pl
+#
+# 2010 (c) Paweł Zuzelski <pawelz at pld-linux.org>
+#		This program is free software,
+# you may distribute it under GPL v2 or newer.
+
+name: Hostuje
+short: HS
+web: "http://hostuje.net/"
+tos: "http://hostuje.net/regulamin.php"
+uri: qr{hostuje\.net/file\.php\?id=[a-f0-9]+}
+status: OK 2010-09-26
+
+start:
+	GET( $-{_uri} );
+
+	ERROR( "file not found: $1" ) if m#<span class="fail_info">\s*(.*?)\s*</span>#s;
+
+	! m#<b>Plik:</b> (.+?)<br><b>Rozmiar:</b> ($STDSIZE)<br><b>#;
+	my $fname = $1;
+	INFO( name => $fname, asize => $2 );
+
+	! m#so\.addVariable\("file", "(http://.*?)"\);#;
+	my $download_link = $1;
+
+	CLICK_DOWNLOAD( $download_link, fname => $fname );
+
+# vim: filetype=perl:ts=4:sw=4


More information about the pld-cvs-commit mailing list