diff options
author | spoob <spoob@gmx.de> | 2009-11-07 17:30:45 +0100 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2009-11-07 17:30:45 +0100 |
commit | 76f9fe76bb265136dc738a876b125b6448399a81 (patch) | |
tree | dede9387e3c3cd2a2dd8baffce6acb61e1bb0038 /module/plugins | |
parent | netload premium, second try, fixed #33 (diff) | |
download | pyload-76f9fe76bb265136dc738a876b125b6448399a81.tar.xz |
netload premium, second try, fixed #33
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/NetloadIn.py | 17 |
1 files changed, 14 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"<a class=\"Orange_Link\" href=\"(http://.+)\" >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 |