SVN: toys/rsget.pl/Get/NetLoad

sparky sparky at pld-linux.org
Wed May 5 02:37:38 CEST 2010


Author: sparky
Date: Wed May  5 02:37:38 2010
New Revision: 11373

Modified:
   toys/rsget.pl/Get/NetLoad
Log:
- catch generic errors as "file not found"
- unify


Modified: toys/rsget.pl/Get/NetLoad
==============================================================================
--- toys/rsget.pl/Get/NetLoad	(original)
+++ toys/rsget.pl/Get/NetLoad	Wed May  5 02:37:38 2010
@@ -9,9 +9,13 @@
 short: NL
 web: "http://netload.in/"
 tos: "http://netload.in/index.php?id=13"
-uri: qr{netload\.in/datei}
+uri: qr{netload\.in/datei[a-zA-Z0-9]+}
 cookie: nl
-status: OK 2010-04-08
+status: OK 2010-05-05
+
+unify:
+	return "http://netload.in/$1.htm"
+		if m#/(datei[a-zA-Z0-9]+)[\./]#;
 
 start:
 	GET( $-{_uri} );
@@ -19,6 +23,9 @@
 
 	ERROR( "file not found" )
 		if /(Sorry, we don't host the requested file|unknown_file_data)/;
+	ERROR( "file not found or something" )
+		if />Code: ER_NFF_/;
+
 	m#<div class="dl_first_filename">\s*(.+?)<span.*?>, ($STDSIZE)</span></div>#s;
 	INFO( name => $1, asize => $2 );
 


More information about the pld-cvs-commit mailing list