From 76f9fe76bb265136dc738a876b125b6448399a81 Mon Sep 17 00:00:00 2001 From: spoob Date: Sat, 7 Nov 2009 17:30:45 +0100 Subject: netload premium, second try, fixed #33 --- module/plugins/NetloadIn.py | 17 ++++++++++++++--- pluginconfig | 5 +++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/module/plugins/NetloadIn.py b/module/plugins/NetloadIn.py index e2fec0615..0b53f86b3 100644 --- a/module/plugins/NetloadIn.py +++ b/module/plugins/NetloadIn.py @@ -27,6 +27,11 @@ class NetloadIn(Plugin): self.want_reconnect = False self.multi_dl = False self.init_ocr() + self.read_config() + if self.config['premium']: + self.multi_dl = True + else: + self.multi_dl = False def prepare(self, thread): pyfile = self.parent @@ -46,7 +51,11 @@ 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() self.get_wait_time() @@ -66,6 +75,9 @@ class NetloadIn(Plugin): def download_html(self): + if self.config['premium']: + self.config['username'], self.config['password'] + self.req.load("http://netload.in/index.php", None, { "txtuser" : self.config['username'], "txtpass" : self.config['password'], "txtcheck" : "login", "txtlogin" : ""}) url = self.parent.url self.html[0] = self.req.load(url, cookies=True) @@ -105,8 +117,7 @@ class NetloadIn(Plugin): """ try: file_url_pattern = r"Click here" - search = re.search(file_url_pattern, self.html[2]) - return search.group(1) + return re.search(file_url_pattern, self.html[2]).group(1) except: return None diff --git a/pluginconfig b/pluginconfig index 65f9ed36b..856a1fddc 100644 --- a/pluginconfig +++ b/pluginconfig @@ -5,6 +5,11 @@ premium = False username = namehere password = passhere +[NetloadIn] +premium = False +username = namehere +password = passhere + [YoutubeCom] high_quality = True -- cgit v1.2.3