From 2ed8bf528418d3ad95ab8e63c72e21837ea47ef9 Mon Sep 17 00:00:00 2001 From: spoob Date: Thu, 3 Sep 2009 21:46:13 +0200 Subject: Netload Premium Test --- Plugins/NetloadIn.py | 8 ++++++++ Plugins/RapidshareCom.py | 18 +++++++----------- module/network/Request.py | 1 + pluginconfig | 11 +++++++++-- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/Plugins/NetloadIn.py b/Plugins/NetloadIn.py index 39ea9213e..8bff067de 100644 --- a/Plugins/NetloadIn.py +++ b/Plugins/NetloadIn.py @@ -46,6 +46,10 @@ class NetloadIn(Plugin): raise Exception, "The file was not found on the server." pyfile.status.filename = self.get_file_name() + + if self.config['premium']: + pyfile.status.url = self.parent.url + return True self.download_html2() @@ -135,4 +139,8 @@ class NetloadIn(Plugin): return True def proceed(self, url, location): + + if self.config['premium']: + self.req.add_auth(self.config['username'], self.config['password']) + self.req.download(url, location, cookies=True) diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py index a81affd90..731554f87 100644 --- a/Plugins/RapidshareCom.py +++ b/Plugins/RapidshareCom.py @@ -45,12 +45,16 @@ class RapidshareCom(Plugin): self.download_html() - pyfile.status.filename = self.get_file_name() - pyfile.status.exists = self.file_exists() - + if not pyfile.status.exists: raise Exception, "The file was not found on the server." + + pyfile.status.filename = self.get_file_name() + + if self.config['premium']: + pyfile.status.url = self.parent.url + return True self.download_serverhtml() pyfile.status.waituntil = self.time_plus_wait @@ -78,10 +82,6 @@ class RapidshareCom(Plugin): def download_serverhtml(self): """downloads html with the important informations """ - - if self.config['premium']: - return False - file_server_url = re.search(r"
\")?(.+)(?(quote)\")', headers) if file_name_search: file_name = file_name_search.group(2) diff --git a/pluginconfig b/pluginconfig index 4963d856b..856a1fddc 100644 --- a/pluginconfig +++ b/pluginconfig @@ -2,10 +2,17 @@ #select server, empty for automatic, else Cogent, Deutsche Telekom, Level(3), Level(3) #2, GlobalCrossing, Level(3) #3, Teleglobe, GlobalCrossing #2, TeliaSonera #2, Teleglobe #2, TeliaSonera #3, TeliaSonera server = "" premium = False -username = name -password = pw +username = namehere +password = passhere + +[NetloadIn] +premium = False +username = namehere +password = passhere + [YoutubeCom] high_quality = True + [YoutubeChannel] #type False for no limitation max_videos = False -- cgit v1.2.3