From 803ae199c53aad8b682b2d0a8e46af786589a1b0 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 9 Mar 2013 13:03:08 +0100 Subject: updated 9kw plugin (#27) --- module/plugins/hooks/Captcha9kw.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) mode change 100644 => 100755 module/plugins/hooks/Captcha9kw.py (limited to 'module/plugins/hooks') diff --git a/module/plugins/hooks/Captcha9kw.py b/module/plugins/hooks/Captcha9kw.py old mode 100644 new mode 100755 index dc223ae1e..b34ffeb05 --- a/module/plugins/hooks/Captcha9kw.py +++ b/module/plugins/hooks/Captcha9kw.py @@ -32,8 +32,8 @@ class Captcha9kw(Hook): __name__ = "Captcha9kw" __version__ = "0.03" __description__ = """send captchas to 9kw.eu""" - __config__ = [("activated", "bool", "Activated", False), - ("force", "bool", "Force CT even if client is connected", False), + __config__ = [("activated", "bool", "Activated", True), + ("force", "bool", "Force CT even if client is connected", True), ("passkey", "password", "API key", ""),] __author_name__ = ("RaNaN") __author_mail__ = ("RaNaN@pyload.org") @@ -61,12 +61,17 @@ class Captcha9kw(Hook): data = f.read() data = b64encode(data) self.logDebug("%s : %s" % (task.captchaFile, data)) + if task.isPositional(): + mouse = 1 + else: + 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" }) @@ -90,7 +95,7 @@ class Captcha9kw(Hook): return False def newCaptchaTask(self, task): - if not task.isTextual(): + if not task.isTextual() and not task.isPositional(): return False if not self.getConfig("passkey"): @@ -145,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) + self.logError("No CaptchaID for not correct request (task %s) found." % task) \ No newline at end of file -- cgit v1.2.3