diff options
author | fragonib <devnull@localhost> | 2011-06-05 16:24:21 +0200 |
---|---|---|
committer | fragonib <devnull@localhost> | 2011-06-05 16:24:21 +0200 |
commit | 2c3b64a41b48f52cc721679cb108dd378cfbaf2b (patch) | |
tree | 8b626eee93fa310dbccc1562225272eac476222e /module/plugins/crypter/RelinkUs.py | |
parent | closed #323 (diff) | |
download | pyload-2c3b64a41b48f52cc721679cb108dd378cfbaf2b.tar.xz |
Use new logging functions
Diffstat (limited to 'module/plugins/crypter/RelinkUs.py')
-rw-r--r-- | module/plugins/crypter/RelinkUs.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index 4376a8c8d..c2bc6c589 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -54,13 +54,13 @@ class RelinkUs(Crypter): def isOnline(self): if "sorry.png" in self.html: - self.log.debug("%s: File not found" % self.__name__) + self.logDebug("File not found") return False return True def isPasswordProtected(self): if "<h1>Container Protection</h1>" in self.html: - self.log.debug("%s: Links are password protected" % self.__name__) + self.logDebug("Links are password protected") return True return False @@ -72,7 +72,7 @@ class RelinkUs(Crypter): url = self.pyfile.url m = re.match(self.__pattern__, url) if m is None: - self.log.debug("%s: Unable to get package id from url [%s]" % (self.__name__, url)) + self.logDebug("Unable to get package id from url [%s]" % url) return id = m.group('id') password = self.getPassword() @@ -80,12 +80,12 @@ class RelinkUs(Crypter): # Submit package password url = "http://www.relink.us/container_password.php?id=" + id post = { '#' : '', 'password' : password, 'pw' : 'submit' } - self.log.debug("%s: Submitting password [%s] for protected links with id [%s]" % (self.__name__, password, id)) + self.logDebug("Submitting password [%s] for protected links with id [%s]" % (password, id)) html = self.load(url, {}, post) # Check for invalid password if "An error occurred!" in html: - self.log.debug("%s: Incorrect password, please set right password on Add package form and retry" % self.__name__) + self.logDebug("Incorrect password, please set right password on Add package form and retry") return None else: return html @@ -95,12 +95,12 @@ class RelinkUs(Crypter): m = re.search(title_re, self.html) if m is not None: name = folder = m.group('title') - self.log.debug("%s: Found name [%s] and folder [%s] in package info" % (self.__name__, name, folder)) + self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) return name, folder else: name = self.package.name folder = self.package.folder - self.log.debug("%s: Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (self.__name__, name, folder)) + self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) return name, folder def getCipherParams(self): @@ -119,14 +119,14 @@ class RelinkUs(Crypter): crypted = vars[RelinkUs._CRYPTED_KEY_] # Log and return - self.log.debug("%s: Javascript cipher key function [%s]" % (self.__name__, jk)) + self.logDebug("Javascript cipher key function [%s]" % jk) return crypted, jk def getLinks(self, crypted, jk): # Get key jreturn = self.js.eval("%s f()" % jk) - self.log.debug("%s: JsEngine returns value key=[%s]" % (self.__name__, jreturn)) + self.logDebug("JsEngine returns value key=[%s]" % jreturn) key = binascii.unhexlify(jreturn) # Decode crypted @@ -144,5 +144,5 @@ class RelinkUs(Crypter): links = filter(lambda x: x != "", links) # Log and return - self.log.debug("%s: Package has %d links" % (self.__name__, len(links))) + self.logDebug("Package has %d links" % len(links)) return links |