From 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:25:41 +0200 Subject: Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics --- module/plugins/ReCaptcha.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/ReCaptcha.py') diff --git a/module/plugins/ReCaptcha.py b/module/plugins/ReCaptcha.py index 3e8b33fbd..143ecfb83 100644 --- a/module/plugins/ReCaptcha.py +++ b/module/plugins/ReCaptcha.py @@ -2,7 +2,9 @@ import re + class ReCaptcha(): + def __init__(self, plugin): self.plugin = plugin -- cgit v1.2.3 From 5c2da7d44de9c88a60f104ab853844fb02498a31 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Sep 2014 15:31:44 +0200 Subject: Remove ReCaptcha --- module/plugins/ReCaptcha.py | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 module/plugins/ReCaptcha.py (limited to 'module/plugins/ReCaptcha.py') diff --git a/module/plugins/ReCaptcha.py b/module/plugins/ReCaptcha.py deleted file mode 100644 index 143ecfb83..000000000 --- a/module/plugins/ReCaptcha.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - - -class ReCaptcha(): - - def __init__(self, plugin): - self.plugin = plugin - - def challenge(self, id): - js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={"k":id}, cookies=True) - - try: - challenge = re.search("challenge : '(.*?)',", js).group(1) - server = re.search("server : '(.*?)',", js).group(1) - except: - self.plugin.fail("recaptcha error") - result = self.result(server,challenge) - - return challenge, result - - def result(self, server, challenge): - return self.plugin.decryptCaptcha("%simage"%server, get={"c":challenge}, cookies=True, imgtype="jpg") -- cgit v1.2.3