diff options
author | spoob <spoob@gmx.de> | 2010-03-11 14:57:29 +0100 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2010-03-11 14:57:29 +0100 |
commit | a7e2bd25a3fbdb35d0f75607f2fee35943d0ad20 (patch) | |
tree | 83d29c2df7f06e772e3fa46b8c49dd4b12beeb1a /module | |
parent | Added tag v0.3.2 for changeset 3ea104a0eccc (diff) | |
download | pyload-a7e2bd25a3fbdb35d0f75607f2fee35943d0ad20.tar.xz |
Fixed Hotfile
Diffstat (limited to 'module')
-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 |
4 files changed, 8 insertions, 7 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): |