From 2c3b64a41b48f52cc721679cb108dd378cfbaf2b Mon Sep 17 00:00:00 2001 From: fragonib Date: Sun, 5 Jun 2011 16:24:21 +0200 Subject: Use new logging functions --- module/plugins/crypter/LinkSaveIn.py | 36 ++++++++++++------------ module/plugins/crypter/NCryptIn.py | 40 +++++++++++++-------------- module/plugins/crypter/NetfolderIn.py | 14 +++++----- module/plugins/crypter/RelinkUs.py | 20 +++++++------- module/plugins/crypter/ShareLinksBiz.py | 46 +++++++++++++++---------------- module/plugins/hoster/BitshareCom.py | 25 ++++++++--------- module/plugins/hoster/OneFichierCom.py | 13 ++++----- module/plugins/hoster/UploadStationCom.py | 20 +++++++------- 8 files changed, 106 insertions(+), 108 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index 5a72b750a..ac64acf3e 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -64,24 +64,24 @@ class LinkSaveIn(Crypter): def isOnline(self): if "Error 404 - Folder not found!" 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 re.search(r'''Captcha:" in self.html: - self.log.debug("%s: Links are captcha protected" % self.__name__) + self.logDebug("Links are captcha protected") return True return False def unlockPasswordProtection(self): password = self.getPassword() - self.log.debug("%s: Submitting password [%s] for protected links" % (self.__name__, password)) + self.logDebug("Submitting password [%s] for protected links" % password) post = {"id": self.fileid, "besucherpasswort": password, 'login': 'submit'} self.html = self.load(self.pyfile.url, post=post) @@ -94,17 +94,17 @@ class LinkSaveIn(Crypter): def getPackageInfo(self): name = self.pyfile.package().name folder = self.pyfile.package().folder - self.log.debug("%s: Defaulting to pyfile name [%s] and folder [%s] for package" % (self.__name__, name, folder)) + self.logDebug("Defaulting to pyfile name [%s] and folder [%s] for package" % (name, folder)) return name, folder def handleErrors(self): if "The visitorpassword you have entered is wrong" in self.html: - self.log.debug("%s: Incorrect password, please set right password on 'Edit package' form and retry" % self.__name__) + self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") self.fail("Incorrect password, please set right password on 'Edit package' form and retry") if self.captcha: if "Wrong code. Please retry" in self.html: - self.log.debug("%s: Invalid captcha, retrying" % self.__name__) + self.logDebug("Invalid captcha, retrying") self.invalidCaptcha() self.retry() else: @@ -112,36 +112,36 @@ class LinkSaveIn(Crypter): def handleWebLinks(self): package_links = [] - self.log.debug("%s: Handling Web links" % self.__name__) + self.logDebug("Handling Web links") #@TODO: Gather paginated web links pattern = r'(.*)', response)[-1] jseval = self.js.eval("document = { write: function(e) { return e; } }; %s" % jscode) dlLink = re.search(r'http://linksave\.in/dl-\w+', jseval).group(0) - self.log.debug("%s: JsEngine returns value [%s] for redirection link" % (self.__name__, dlLink)) + self.logDebug("JsEngine returns value [%s] for redirection link" % dlLink) response = self.load(dlLink) link = unescape(re.search(r'