From 8342aad089589479650703de915a356d634b202b Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 23 Mar 2013 22:32:28 +0100 Subject: Plugins: fixed inconsistent indentation --- module/plugins/hooks/Captcha9kw.py | 52 +++++++++++++++++----------------- module/plugins/hooks/ExtractArchive.py | 2 -- 2 files changed, 26 insertions(+), 28 deletions(-) (limited to 'module/plugins/hooks') diff --git a/module/plugins/hooks/Captcha9kw.py b/module/plugins/hooks/Captcha9kw.py index b34ffeb05..a01ce9576 100755 --- a/module/plugins/hooks/Captcha9kw.py +++ b/module/plugins/hooks/Captcha9kw.py @@ -62,40 +62,40 @@ class Captcha9kw(Hook): data = b64encode(data) self.logDebug("%s : %s" % (task.captchaFile, data)) if task.isPositional(): - mouse = 1 + mouse = 1 else: - mouse = 0 + mouse = 0 response = getURL(self.API_URL, post = { - "apikey": self.getConfig("passkey"), - "pyload": "1", - "source": "pyload", - "base64": "1", - "mouse": mouse, - "file-upload-01": data, - "action": "usercaptchaupload" }) + "apikey": self.getConfig("passkey"), + "pyload": "1", + "source": "pyload", + "base64": "1", + "mouse": mouse, + "file-upload-01": data, + "action": "usercaptchaupload" }) - if response.isdigit(): - self.logInfo(_("NewCaptchaID from upload: %s : %s" % (response,task.captchaFile))) + if response.isdigit(): + self.logInfo(_("NewCaptchaID from upload: %s : %s" % (response,task.captchaFile))) - for i in range(1, 200, 2): - response2 = getURL(self.API_URL, get = { "apikey": self.getConfig("passkey"), "id": response,"pyload": "1","source": "pyload", "action": "usercaptchacorrectdata" }) + for i in range(1, 200, 2): + response2 = getURL(self.API_URL, get = { "apikey": self.getConfig("passkey"), "id": response,"pyload": "1","source": "pyload", "action": "usercaptchacorrectdata" }) - if(response2 != ""): - break; + if(response2 != ""): + break; - time.sleep(1) + time.sleep(1) - result = response2 - task.data["ticket"] = response - self.logInfo("result %s : %s" % (response, result)) - task.setResult(result) - else: - self.logError("Bad upload: %s" % response) - return False + result = response2 + task.data["ticket"] = response + self.logInfo("result %s : %s" % (response, result)) + task.setResult(result) + else: + self.logError("Bad upload: %s" % response) + return False def newCaptchaTask(self, task): - if not task.isTextual() and not task.isPositional(): + if not task.isTextual() and not task.isPositional(): return False if not self.getConfig("passkey"): @@ -130,7 +130,7 @@ class Captcha9kw(Hook): except BadHeader, e: self.logError("Could not send correct request.", str(e)) else: - self.logError("No CaptchaID for correct request (task %s) found." % task) + self.logError("No CaptchaID for correct request (task %s) found." % task) def captchaInvalid(self, task): if "ticket" in task.data: @@ -150,4 +150,4 @@ class Captcha9kw(Hook): except BadHeader, e: self.logError("Could not send refund request.", str(e)) else: - self.logError("No CaptchaID for not correct request (task %s) found." % task) \ No newline at end of file + self.logError("No CaptchaID for not correct request (task %s) found." % task) diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index c789495ca..a5a973b7f 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -196,8 +196,6 @@ class ExtractArchive(Hook): files_ids = new_files_ids # also check extracted files if not matched: self.logInfo(_("No files found to extract")) - - def startExtracting(self, plugin, fid, passwords, thread): pyfile = self.core.files.getFile(fid) -- cgit v1.2.3