diff options
-rw-r--r-- | module/download_thread.py | 4 | ||||
-rwxr-xr-x | module/network/Request.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/HotfileCom.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/NetloadIn.py | 7 | ||||
-rw-r--r--[-rwxr-xr-x] | pyLoadCore.py | 8 |
5 files changed, 15 insertions, 8 deletions
diff --git a/module/download_thread.py b/module/download_thread.py index 1cc509bca..56f4e0d08 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -144,7 +144,9 @@ class Download_Thread(threading.Thread): else: status.type = "downloading" self.parent.parent.pullManager.addEvent(UpdateEvent("file", pyfile.id, "queue")) - + + + #~ free_file_name = self.get_free_name(status.filename) location = join(pyfile.folder, status.filename) pyfile.plugin.proceed(status.url, location) diff --git a/module/network/Request.py b/module/network/Request.py index 7cb68dd4a..b47ef4206 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -225,8 +225,6 @@ class Request: for cookie in self.cookies: cookie_head += cookie.name + "=" + cookie.value + "; " req.add_header("Cookie", cookie_head) - #def download(url, filename, reporthook = None, data = None): #default von urlretrieve auch None? - # return self.downloader.urlretrieve(url, filename, reporthook, data) def clear_cookies(self): if self.curl: diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index a9853100c..748571840 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -60,7 +60,7 @@ class HotfileCom(Plugin): return file_url def get_file_name(self): - file_name = re.search('Downloading\s<b>(.*?)</b>', self.html[0]).group(1) + file_name = re.search(':</strong> (.+) <span>|</span>', self.html[0]).group(1) return file_name def file_exists(self): diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 3c959d0d5..67753a7b7 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -17,7 +17,7 @@ class NetloadIn(Plugin): props = {} props['name'] = "NetloadIn" props['type'] = "hoster" - props['pattern'] = r"http://.*netload\.in/" + props['pattern'] = r"http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)" props['version'] = "0.1" props['description'] = """Netload.in Download Plugin""" props['author_name'] = ("spoob", "RaNaN") @@ -45,7 +45,6 @@ class NetloadIn(Plugin): pyfile.status.filename = self.get_file_name() if self.config['premium']: - self.req.load("http://netload.in/index.php", None, { "txtuser" : self.config['username'], "txtpass" : self.config['password'], "txtcheck" : "login", "txtlogin" : ""}, cookies=True) self.logger.info("Netload: Use Premium Account") pyfile.status.url = self.parent.url return True @@ -64,7 +63,7 @@ class NetloadIn(Plugin): def download_api_data(self): url = self.parent.url - id_regex = re.compile("http://.*netload.in/datei(.*?)(?:\.htm|/)") + id_regex = re.compile("http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)") match = id_regex.search(url) if match: apiurl = "http://netload.in/share/fileinfos2.php" @@ -142,6 +141,8 @@ class NetloadIn(Plugin): return False def proceed(self, url, location): + if self.config['premium']: + self.req.load("http://netload.in/index.php", None, { "txtuser" : self.config['username'], "txtpass" : self.config['password'], "txtcheck" : "login", "txtlogin" : ""}, cookies=True) self.req.download(url, location, cookies=True) def check_file(self, local_file): diff --git a/pyLoadCore.py b/pyLoadCore.py index a9283872f..bcc88814b 100755..100644 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -67,11 +67,13 @@ from module.web.ServerThread import WebServer class Core(object): """ pyLoad Core """ + def __init__(self): + self.doDebug = False self.arg_links = [] if len(argv) > 1: try: - options, arguments = getopt(argv[1:], 'vcl:') + options, arguments = getopt(argv[1:], 'vcl:d') for option, argument in options: if option == "-v": print "pyLoad", CURRENT_VERSION @@ -82,6 +84,8 @@ class Core(object): elif option == "-l": self.arg_links.append(argument) print "Added %s" % argument + elif option == "-d": + self.doDebug = True except: print 'Unknown Argument(s) "%s"' % " ".join(argv[1:]) @@ -105,6 +109,8 @@ class Core(object): self.xmlconfig = XMLConfigParser(self.make_path("module", "config", "core.xml")) self.config = self.xmlconfig.getConfig() + if self.doDebug == True: + self.config['general']['debug_mode'] = True self.parser_plugins = XMLConfigParser(self.make_path("module", "config", "plugin.xml")) #~ self.config_plugins = self.parser_plugins.getConfig() |