diff options
author | spoob <spoob@gmx.de> | 2010-04-06 16:01:45 +0200 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2010-04-06 16:01:45 +0200 |
commit | 1a80a6dea59ef65565597ae2fde79761f44d3af3 (patch) | |
tree | 7004152ae6b975bb66a4845cc35acaada34f179b /module | |
parent | Hotfile Premium (diff) | |
download | pyload-1a80a6dea59ef65565597ae2fde79761f44d3af3.tar.xz |
Universal File Not Found
Diffstat (limited to 'module')
-rw-r--r-- | module/Plugin.py | 1 | ||||
-rw-r--r-- | module/download_thread.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/DuckloadCom.py | 1 | ||||
-rw-r--r-- | module/plugins/hoster/FilefactoryCom.py | 1 | ||||
-rw-r--r-- | module/plugins/hoster/FreakshareNet.py | 1 | ||||
-rw-r--r-- | module/plugins/hoster/HotfileCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/NetloadIn.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 1 | ||||
-rw-r--r-- | module/plugins/hoster/StorageTo.py | 1 | ||||
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 4 |
11 files changed, 11 insertions, 15 deletions
diff --git a/module/Plugin.py b/module/Plugin.py index 8ee882815..a9de48c3a 100644 --- a/module/Plugin.py +++ b/module/Plugin.py @@ -59,7 +59,6 @@ class Plugin(): pyfile.status.exists = self.file_exists() if not pyfile.status.exists: - raise Exception, "File not found" return False pyfile.status.filename = self.get_file_name() diff --git a/module/download_thread.py b/module/download_thread.py index 56f4e0d08..b56fc1b4c 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -136,7 +136,9 @@ class Download_Thread(threading.Thread): pyfile.init_download() - pyfile.plugin.prepare(self) + if not pyfile.plugin.prepare(self): + raise Exception, _("File not found") + pyfile.plugin.req.set_timeout(self.parent.parent.config['general']['max_download_time']) if pyfile.plugin.props["type"] == "container": diff --git a/module/plugins/hoster/DuckloadCom.py b/module/plugins/hoster/DuckloadCom.py index f9ef8ba8e..7482fe617 100644 --- a/module/plugins/hoster/DuckloadCom.py +++ b/module/plugins/hoster/DuckloadCom.py @@ -33,7 +33,6 @@ class DuckloadCom(Plugin): pyfile.status.exists = self.file_exists()
if not pyfile.status.exists:
- raise Exception, "The file was not found on the server."
return False
pyfile.status.filename = self.get_file_name()
diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 5b7db301d..84cdc8dca 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -34,7 +34,6 @@ class FilefactoryCom(Plugin): pyfile.status.exists = self.file_exists() if not pyfile.status.exists: - raise Exception, "The file was not found on the server." return False self.get_waiting_time() diff --git a/module/plugins/hoster/FreakshareNet.py b/module/plugins/hoster/FreakshareNet.py index 0768b5476..4d5d4d5b9 100644 --- a/module/plugins/hoster/FreakshareNet.py +++ b/module/plugins/hoster/FreakshareNet.py @@ -37,7 +37,6 @@ class FreakshareNet(Plugin): pyfile.status.exists = self.file_exists() if not pyfile.status.exists: - raise Exception, "The file was not found on the server." return False self.get_waiting_time() diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index 5fa05e7f6..38e7caca8 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -39,7 +39,6 @@ class HotfileCom(Plugin): pyfile.status.exists = self.file_exists() if not pyfile.status.exists: - raise Exception, "The file was not found on the server." return False pyfile.status.filename = self.get_file_name() @@ -60,7 +59,8 @@ class HotfileCom(Plugin): def download_html(self): if self.config['premium']: self.req.add_auth(self.config['username'], self.config['password']) - self.url = self.parent.url + self.url = self.parent.url + "?lang=en" + print self.url self.html[0] = self.req.load(self.url, cookies=True) def get_file_url(self): @@ -79,7 +79,7 @@ class HotfileCom(Plugin): return file_name def file_exists(self): - if re.search(r"Such file does not exist or it has been removed for infringement of copyrights.", self.html[0]) != None: + if re.search(r"404 - Not Found", self.html[0]) != None or self.html[0] == "": return False return True diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 278e9ce87..0b7bcd27f 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -59,7 +59,7 @@ class NetloadIn(Plugin): pyfile.status.url = self.get_file_url() else: - raise Exception, "The file was not found on the server." + return False def download_api_data(self): url = self.parent.url diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index be563ef07..856f06529 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -68,8 +68,8 @@ class RapidshareCom(Plugin): pyfile.status.url = self.parent.url return True else: - raise Exception, "The file was not found on the server." - + return False + def download_api_data(self): """ http://images.rapidshare.com/apidoc.txt diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 524f02930..ede810bbd 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -47,7 +47,6 @@ class ShareonlineBiz(Plugin): pyfile.status.url = self.get_file_url() pyfile.status.want_reconnect = self.want_reconnect else: - raise Exception, "File not found" return False def download_api_data(self): diff --git a/module/plugins/hoster/StorageTo.py b/module/plugins/hoster/StorageTo.py index a9b1ec4c2..86e04dfd0 100644 --- a/module/plugins/hoster/StorageTo.py +++ b/module/plugins/hoster/StorageTo.py @@ -39,7 +39,6 @@ class StorageTo(Plugin): pyfile.status.exists = self.file_exists() if not pyfile.status.exists: - raise Exception, "The file was not found on the server." return False pyfile.status.filename = self.get_file_name() diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 852e77cd4..05ac65f3a 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -45,8 +45,8 @@ class UploadedTo(Plugin): pyfile.status.exists = self.file_exists() if not pyfile.status.exists: - raise Exception, "The file was not found on the server." - + return False + self.download_api_data() pyfile.status.filename = self.get_file_name() |