diff options
author | spoob <spoob@gmx.de> | 2009-12-15 23:37:20 +0100 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2009-12-15 23:37:20 +0100 |
commit | de5a37e0ffc97bc5893077f935429ba32a9b8f6c (patch) | |
tree | c88ebe6af9a5221e7d249b8f5a0ae7f72ed262a2 | |
parent | RS fixedhg (diff) | |
download | pyload-de5a37e0ffc97bc5893077f935429ba32a9b8f6c.tar.xz |
Incomplete: Rapidshare Folder
-rw-r--r-- | module/Plugin.py | 4 | ||||
-rw-r--r-- | module/download_thread.py | 10 | ||||
-rw-r--r-- | module/plugins/RapidshareCom.py | 9 |
3 files changed, 10 insertions, 13 deletions
diff --git a/module/Plugin.py b/module/Plugin.py index f343dc62f..14a480e3b 100644 --- a/module/Plugin.py +++ b/module/Plugin.py @@ -99,8 +99,8 @@ class Plugin(): self.download_html() return self.time_plus_wait - def proceed(self, url, location, folder=""): - self.req.download(url, location, folder) + def proceed(self, url, location): + self.req.download(url, location) def set_config(self): pass diff --git a/module/download_thread.py b/module/download_thread.py index be7896b5f..3ec49218d 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -19,6 +19,7 @@ ### import threading import traceback +from os.path import join from time import sleep, time from module.network.Request import AbortDownload @@ -122,17 +123,14 @@ class Download_Thread(threading.Thread): pyfile.plugin.prepare(self) pyfile.plugin.req.set_timeout(self.parent.parent.config['general']['max_download_time']) - if status.url == "": - status.url = pyfile.plugin.get_file_url() - status.type = "downloading" - local_file = pyfile.folder + "/" + status.filename - pyfile.plugin.proceed(status.url, local_file) + location = join(pyfile.folder, status.filename) + pyfile.plugin.proceed(status.url, location) status.type = "checking" - check, code = pyfile.plugin.check_file(local_file) + check, code = pyfile.plugin.check_file(location) """ return codes: 0 - checksum ok diff --git a/module/plugins/RapidshareCom.py b/module/plugins/RapidshareCom.py index 2fd65c706..714bbf825 100644 --- a/module/plugins/RapidshareCom.py +++ b/module/plugins/RapidshareCom.py @@ -141,13 +141,12 @@ class RapidshareCom(Plugin): def get_file_name(self): if self.api_data and self.api_data["filename"]: return self.api_data["filename"] - elif self.html: - file_name_pattern = "<p class=\"downloadlink\">.+/(.+) <font" - file_name_search = re.search(file_name_pattern, self.html): + elif self.html[0]: + file_name_pattern = r"<p class=\"downloadlink\">.+/(.+) <font" + file_name_search = re.search(file_name_pattern, self.html[0]) if file_name_search: return file_name_search.group(1) - else: - return self.url.split("/")[-1] + return self.url.split("/")[-1] def proceed(self, url, location): if self.config['premium']: |