diff options
-rw-r--r-- | module/FileDatabase.py | 2 | ||||
-rw-r--r-- | module/RequestFactory.py | 2 | ||||
-rwxr-xr-x | module/network/Request.py | 2 | ||||
-rw-r--r-- | module/plugins/Crypter.py | 3 | ||||
-rw-r--r-- | module/plugins/Plugin.py | 5 | ||||
-rw-r--r-- | module/plugins/accounts/DepositfilesCom.py | 1 | ||||
-rw-r--r-- | module/plugins/accounts/FileserveCom.py | 1 | ||||
-rw-r--r-- | module/plugins/accounts/HotfileCom.py | 1 | ||||
-rw-r--r-- | module/plugins/hoster/NetloadIn.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/StorageTo.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 1 |
12 files changed, 12 insertions, 16 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py index d7570486b..9e1e84e8c 100644 --- a/module/FileDatabase.py +++ b/module/FileDatabase.py @@ -531,7 +531,7 @@ class FileDatabaseBackend(Thread): if not async: self.res.put(None) def shutdown(self): - self.save() + self.syncSave() self.jobs.put(("quit", "", 0)) def _checkVersion(self): diff --git a/module/RequestFactory.py b/module/RequestFactory.py index 3885cae19..260a4a1d5 100644 --- a/module/RequestFactory.py +++ b/module/RequestFactory.py @@ -80,7 +80,7 @@ class CookieJar(): return self.cookies.values() def parseCookie(self, name): - if cookies.has_key(name): + if self.cookies.has_key(name): return self.cookies[name].split("\t")[6] else: return None diff --git a/module/network/Request.py b/module/network/Request.py index 75a490b9f..8638cc66a 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -22,7 +22,7 @@ import base64 import time -from os import sep, rename, stat +from os import stat from os.path import exists, join from shutil import move import urllib diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py index 1b6647f6b..97840e20c 100644 --- a/module/plugins/Crypter.py +++ b/module/plugins/Crypter.py @@ -47,6 +47,9 @@ class Crypter(Plugin): self.createPackages() + def decrypt(self, pyfile): + raise NotImplementedError + #---------------------------------------------------------------------- def createPackages(self): """ create new packages from self.packages """ diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 8049da33f..ed9ac8bca 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -18,7 +18,6 @@ """ import logging -from os.path import exists from os.path import join from time import time @@ -32,7 +31,6 @@ from os.path import exists from os import remove from os import makedirs -from tempfile import NamedTemporaryFile from mimetypes import guess_type from itertools import islice @@ -202,8 +200,7 @@ class Plugin(object): """ loads the catpcha and decrypt it or ask the user for input """ content = self.load(url, get=get, post=post, cookies=cookies) - - temp = NamedTemporaryFile() + temp = open(join("tmp","tmpCaptcha_%s" % self.__name__ ), "wb") temp.write(content) diff --git a/module/plugins/accounts/DepositfilesCom.py b/module/plugins/accounts/DepositfilesCom.py index 044f647be..809381217 100644 --- a/module/plugins/accounts/DepositfilesCom.py +++ b/module/plugins/accounts/DepositfilesCom.py @@ -20,7 +20,6 @@ from module.plugins.Account import Account import re from time import strptime, mktime -import hashlib class DepositfilesCom(Account): __name__ = "DepositfilesCom" diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py index 4e865b360..1fdb4c40b 100644 --- a/module/plugins/accounts/FileserveCom.py +++ b/module/plugins/accounts/FileserveCom.py @@ -20,7 +20,6 @@ from module.plugins.Account import Account import re from time import strptime, mktime -import hashlib class FileserveCom(Account): __name__ = "FileserveCom" diff --git a/module/plugins/accounts/HotfileCom.py b/module/plugins/accounts/HotfileCom.py index 0d3e6620f..6b92df514 100644 --- a/module/plugins/accounts/HotfileCom.py +++ b/module/plugins/accounts/HotfileCom.py @@ -18,7 +18,6 @@ """ from module.plugins.Account import Account -import re from time import strptime, mktime import hashlib diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index dc5d2a028..9735a430d 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -116,7 +116,7 @@ class NetloadIn(Hoster): self.api_data["exists"] = False else: self.api_data = False - self.html[0] = self.load(self.url, cookies=False) + self.html = [self.load(self.url, cookies=False)] def final_wait(self, page): wait_time = self.get_wait_time(page) diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 3dfc6d465..cc3101529 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -153,7 +153,7 @@ class RapidshareCom(Hoster): if re.search(r"(Currently a lot of users|no more download slots|servers are overloaded)", self.html[1], re.I) is not None: self.log.info(_("Rapidshare: No free slots!")) self.no_slots = True - return time() + 130 + return 130 self.no_slots = False wait_seconds = re.search(r"var c=(.*);.*", self.html[1]).group(1) return int(wait_seconds) + 5 @@ -164,7 +164,7 @@ class RapidshareCom(Hoster): if self.getConf('server') == "None": file_url_pattern = r".*name=\"dlf\" action=\"(.*)\" method=.*" else: - file_url_pattern = '(http://rs.*)\';" /> %s<br />' % getConf('server') + file_url_pattern = '(http://rs.*)\';" /> %s<br />' % self.getConf('server') return re.search(file_url_pattern, self.html[1]).group(1) diff --git a/module/plugins/hoster/StorageTo.py b/module/plugins/hoster/StorageTo.py index f0660b40d..49957ba89 100644 --- a/module/plugins/hoster/StorageTo.py +++ b/module/plugins/hoster/StorageTo.py @@ -50,11 +50,11 @@ class StorageTo(Hoster): return True def download_html(self): - url = self.parent.url + url = self.pyfile.url self.html = self.load(url, cookies=True) def download_api_data(self): - url = self.parent.url + url = self.pyfile.url info_url = url.replace("/get/", "/getlink/") src = self.load(info_url, cookies=True) pattern = re.compile(r"'(\w+)' : (.*?)[,|\}]") diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index f04e97531..70d71b493 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import re -from time import time from module.plugins.Hoster import Hoster from module.network.Request import getURL from module.plugins.Plugin import chunks |