From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/internal/CaptchaService.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index dad537bec..187170660 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -10,6 +10,7 @@ class CaptchaService: __version__ = "0.09" __description__ = """Base captcha service plugin""" + __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] @@ -54,6 +55,7 @@ class ReCaptcha(CaptchaService): __version__ = "0.02" __description__ = """ReCaptcha captcha service plugin""" + __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] @@ -114,6 +116,7 @@ class AdsCaptcha(CaptchaService): __version__ = "0.02" __description__ = """AdsCaptcha captcha service plugin""" + __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] @@ -175,6 +178,7 @@ class SolveMedia(CaptchaService): __version__ = "0.02" __description__ = """SolveMedia captcha service plugin""" + __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] -- cgit v1.2.3 From 343e246e94548cf2cc713aed92212e12d28ce658 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 10 Oct 2014 16:00:34 +0200 Subject: [CaptchaService] Fix ReCaptcha KEY pattern --- module/plugins/internal/CaptchaService.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index 187170660..9d8fd85f2 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -7,7 +7,7 @@ from random import random class CaptchaService: __name__ = "CaptchaService" - __version__ = "0.09" + __version__ = "0.10" __description__ = """Base captcha service plugin""" __license__ = "GPLv3" @@ -52,15 +52,15 @@ class CaptchaService: class ReCaptcha(CaptchaService): __name__ = "ReCaptcha" - __version__ = "0.02" + __version__ = "0.03" __description__ = """ReCaptcha captcha service plugin""" __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] - KEY_PATTERN = r"https?://(?:www\.)?google\.com/recaptcha/api/challenge\?k=(?P\w+?)" - KEY_AJAX_PATTERN = r"Recaptcha\.create\s*\(\s*[\"'](?P\w+)[\"']\s*," + KEY_PATTERN = r"https?://(?:www\.)?google\.com/recaptcha/api/challenge\?k=(?P\w+)" + KEY_AJAX_PATTERN = r"Recaptcha\.create\s*\(\s*[\"'](?P\w+)" def detect_key(self, html=None): -- cgit v1.2.3 From 8939f015a688a07ec7d0bd14b6a3704f6a2cb4a0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:12:40 +0200 Subject: Pattern update 3 --- module/plugins/internal/CaptchaService.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index 9d8fd85f2..db4ed41a4 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -59,8 +59,8 @@ class ReCaptcha(CaptchaService): __authors__ = [("pyLoad Team", "admin@pyload.org")] - KEY_PATTERN = r"https?://(?:www\.)?google\.com/recaptcha/api/challenge\?k=(?P\w+)" - KEY_AJAX_PATTERN = r"Recaptcha\.create\s*\(\s*[\"'](?P\w+)" + KEY_PATTERN = r'https?://(?:www\.)?google\.com/recaptcha/api/challenge\?k=(?P\w+)' + KEY_AJAX_PATTERN = r'Recaptcha\.create\s*\(\s*["\'](?P\w+)' def detect_key(self, html=None): -- cgit v1.2.3 From 0adc51cf4c58aa3e0f1073c28b9a8781a298fe89 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 22:59:24 +0200 Subject: [CaptchaService] Fix KEY pattern --- module/plugins/internal/CaptchaService.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index db4ed41a4..b2b549617 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -7,7 +7,7 @@ from random import random class CaptchaService: __name__ = "CaptchaService" - __version__ = "0.10" + __version__ = "0.11" __description__ = """Base captcha service plugin""" __license__ = "GPLv3" @@ -52,15 +52,15 @@ class CaptchaService: class ReCaptcha(CaptchaService): __name__ = "ReCaptcha" - __version__ = "0.03" + __version__ = "0.04" __description__ = """ReCaptcha captcha service plugin""" __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] - KEY_PATTERN = r'https?://(?:www\.)?google\.com/recaptcha/api/challenge\?k=(?P\w+)' - KEY_AJAX_PATTERN = r'Recaptcha\.create\s*\(\s*["\'](?P\w+)' + KEY_PATTERN = r'https?://(?:www\.)?google\.com/recaptcha/api/challenge\?k=(?P[\w-]+)' + KEY_AJAX_PATTERN = r'Recaptcha\.create\s*\(\s*["\'](?P[\w-]+)' def detect_key(self, html=None): @@ -175,14 +175,14 @@ class AdsCaptcha(CaptchaService): class SolveMedia(CaptchaService): __name__ = "SolveMedia" - __version__ = "0.02" + __version__ = "0.03" __description__ = """SolveMedia captcha service plugin""" __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] - KEY_PATTERN = r'http://api\.solvemedia\.com/papi/challenge\.(no)?script\?k=(?P.+?)"' + KEY_PATTERN = r'http://api\.solvemedia\.com/papi/challenge\.(no)?script\?k=(?P.+?)["\']' def challenge(self, key=None): -- cgit v1.2.3 From 1f48f481740863c7697064bde286a78e977e4a1b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Oct 2014 15:12:06 +0200 Subject: Update other plugins to support self.error --- module/plugins/internal/CaptchaService.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index b2b549617..203dda82e 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -7,7 +7,7 @@ from random import random class CaptchaService: __name__ = "CaptchaService" - __version__ = "0.11" + __version__ = "0.12" __description__ = """Base captcha service plugin""" __license__ = "GPLv3" @@ -52,7 +52,7 @@ class CaptchaService: class ReCaptcha(CaptchaService): __name__ = "ReCaptcha" - __version__ = "0.04" + __version__ = "0.05" __description__ = """ReCaptcha captcha service plugin""" __license__ = "GPLv3" @@ -99,7 +99,7 @@ class ReCaptcha(CaptchaService): challenge = re.search("challenge : '(.+?)',", js).group(1) server = re.search("server : '(.+?)',", js).group(1) except: - self.plugin.parseError("ReCaptcha challenge pattern not found") + self.plugin.error("ReCaptcha challenge pattern not found") result = self.result(server, challenge) @@ -113,7 +113,7 @@ class ReCaptcha(CaptchaService): class AdsCaptcha(CaptchaService): __name__ = "AdsCaptcha" - __version__ = "0.02" + __version__ = "0.03" __description__ = """AdsCaptcha captcha service plugin""" __license__ = "GPLv3" @@ -161,7 +161,7 @@ class AdsCaptcha(CaptchaService): challenge = re.search("challenge: '(.+?)',", js).group(1) server = re.search("server: '(.+?)',", js).group(1) except: - self.plugin.parseError("AdsCaptcha challenge pattern not found") + self.plugin.error("AdsCaptcha challenge pattern not found") result = self.result(server, challenge) @@ -175,7 +175,7 @@ class AdsCaptcha(CaptchaService): class SolveMedia(CaptchaService): __name__ = "SolveMedia" - __version__ = "0.03" + __version__ = "0.04" __description__ = """SolveMedia captcha service plugin""" __license__ = "GPLv3" @@ -200,7 +200,7 @@ class SolveMedia(CaptchaService): html).group(1) server = "http://api.solvemedia.com/papi/media" except: - self.plugin.parseError("SolveMedia challenge pattern not found") + self.plugin.error("SolveMedia challenge pattern not found") result = self.result(server, challenge) -- cgit v1.2.3 From fe5c86946dfc2c539b4e2a59128275c1fe506493 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 14:31:45 +0200 Subject: [CaptchaService] Fix KEY_PATTERN --- module/plugins/internal/CaptchaService.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index 203dda82e..28374899d 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -7,7 +7,7 @@ from random import random class CaptchaService: __name__ = "CaptchaService" - __version__ = "0.12" + __version__ = "0.13" __description__ = """Base captcha service plugin""" __license__ = "GPLv3" @@ -52,14 +52,14 @@ class CaptchaService: class ReCaptcha(CaptchaService): __name__ = "ReCaptcha" - __version__ = "0.05" + __version__ = "0.06" __description__ = """ReCaptcha captcha service plugin""" __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] - KEY_PATTERN = r'https?://(?:www\.)?google\.com/recaptcha/api/challenge\?k=(?P[\w-]+)' + KEY_PATTERN = r'recaptcha/api/challenge\?k=(?P[\w-]+)' KEY_AJAX_PATTERN = r'Recaptcha\.create\s*\(\s*["\'](?P[\w-]+)' @@ -113,15 +113,15 @@ class ReCaptcha(CaptchaService): class AdsCaptcha(CaptchaService): __name__ = "AdsCaptcha" - __version__ = "0.03" + __version__ = "0.04" __description__ = """AdsCaptcha captcha service plugin""" __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] - ID_PATTERN = r'http://api\.adscaptcha\.com/Get\.aspx\?[^"\']*CaptchaId=(?P\d+)' - KEY_PATTERN = r'http://api\.adscaptcha\.com/Get\.aspx\?[^"\']*PublicKey=(?P[\w-]+)' + ID_PATTERN = r'api\.adscaptcha\.com/Get\.aspx\?[^"\']*CaptchaId=(?P\d+)' + KEY_PATTERN = r'api\.adscaptcha\.com/Get\.aspx\?[^"\']*PublicKey=(?P[\w-]+)' def detect_key(self, html=None): @@ -175,14 +175,14 @@ class AdsCaptcha(CaptchaService): class SolveMedia(CaptchaService): __name__ = "SolveMedia" - __version__ = "0.04" + __version__ = "0.05" __description__ = """SolveMedia captcha service plugin""" __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] - KEY_PATTERN = r'http://api\.solvemedia\.com/papi/challenge\.(no)?script\?k=(?P.+?)["\']' + KEY_PATTERN = r'api\.solvemedia\.com/papi/challenge\.(no)?script\?k=(?P.+?)["\']' def challenge(self, key=None): -- cgit v1.2.3 From 1b096b2eb2634e8dea80b06ab9ecde206b198b35 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:47:00 +0200 Subject: Spare code cosmetics --- module/plugins/internal/CaptchaService.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index 28374899d..6d3fc0feb 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -16,7 +16,7 @@ class CaptchaService: KEY_PATTERN = None - key = None + key = None #: last key detected def __init__(self, plugin): @@ -28,7 +28,7 @@ class CaptchaService: if hasattr(self.plugin, "html") and self.plugin.html: html = self.plugin.html else: - errmsg = "%s html missing" % self.__name__ + errmsg = "%s html not found" % self.__name__ self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -68,7 +68,7 @@ class ReCaptcha(CaptchaService): if hasattr(self.plugin, "html") and self.plugin.html: html = self.plugin.html else: - errmsg = "ReCaptcha html missing" + errmsg = "ReCaptcha not found" self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -86,10 +86,10 @@ class ReCaptcha(CaptchaService): def challenge(self, key=None): if not key: - if self.key: + if self.detect_key(): key = self.key else: - errmsg = "ReCaptcha key missing" + errmsg = "ReCaptcha key not found" self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -129,7 +129,7 @@ class AdsCaptcha(CaptchaService): if hasattr(self.plugin, "html") and self.plugin.html: html = self.plugin.html else: - errmsg = "AdsCaptcha html missing" + errmsg = "AdsCaptcha html not found" self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -144,12 +144,12 @@ class AdsCaptcha(CaptchaService): return None - def challenge(self, key=None): #: key is tuple(CaptchaId, PublicKey) + def challenge(self, key=None): #: key is a tuple(CaptchaId, PublicKey) if not key: - if self.key: + if self.detect_key(): key = self.key else: - errmsg = "AdsCaptcha key missing" + errmsg = "AdsCaptcha key not found" self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -187,10 +187,10 @@ class SolveMedia(CaptchaService): def challenge(self, key=None): if not key: - if self.key: + if self.detect_key(): key = self.key else: - errmsg = "SolveMedia key missing" + errmsg = "SolveMedia key not found" self.plugin.fail(errmsg) raise TypeError(errmsg) -- cgit v1.2.3 From 85ba09f7bd27461ab5900487fd9da705cc7ff3a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 21:14:50 +0200 Subject: [CaptchaService] Update ReCaptcha KEY_PATTERN --- module/plugins/internal/CaptchaService.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index 6d3fc0feb..11b34755b 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -7,7 +7,7 @@ from random import random class CaptchaService: __name__ = "CaptchaService" - __version__ = "0.13" + __version__ = "0.14" __description__ = """Base captcha service plugin""" __license__ = "GPLv3" @@ -52,14 +52,14 @@ class CaptchaService: class ReCaptcha(CaptchaService): __name__ = "ReCaptcha" - __version__ = "0.06" + __version__ = "0.07" __description__ = """ReCaptcha captcha service plugin""" __license__ = "GPLv3" __authors__ = [("pyLoad Team", "admin@pyload.org")] - KEY_PATTERN = r'recaptcha/api/challenge\?k=(?P[\w-]+)' + KEY_PATTERN = r'recaptcha(/api|\.net)/(challenge|noscript)\?k=(?P[\w-]+)' KEY_AJAX_PATTERN = r'Recaptcha\.create\s*\(\s*["\'](?P[\w-]+)' -- cgit v1.2.3 From 7b67f68c1636014fe02286da71bdc6c13dc3eeee Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 23 Oct 2014 00:50:23 +0200 Subject: Simplify captcha challenge calls --- module/plugins/internal/CaptchaService.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index 11b34755b..a1ec633e8 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -29,7 +29,7 @@ class CaptchaService: html = self.plugin.html else: errmsg = "%s html not found" % self.__name__ - self.plugin.fail(errmsg) + self.plugin.fail(errmsg) #@TODO: replace all plugin.fail(errmsg) with plugin.error(errmsg) in 0.4.10 raise TypeError(errmsg) m = re.search(self.KEY_PATTERN, html) @@ -72,9 +72,7 @@ class ReCaptcha(CaptchaService): self.plugin.fail(errmsg) raise TypeError(errmsg) - m = re.search(self.KEY_PATTERN, html) - if m is None: - m = re.search(self.KEY_AJAX_PATTERN, html) + m = re.search(self.KEY_PATTERN, html) or re.search(self.KEY_AJAX_PATTERN, html) if m: self.key = m.group("KEY") self.plugin.logDebug("ReCaptcha key: %s" % self.key) -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/internal/CaptchaService.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index a1ec633e8..aa8758344 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -28,7 +28,7 @@ class CaptchaService: if hasattr(self.plugin, "html") and self.plugin.html: html = self.plugin.html else: - errmsg = "%s html not found" % self.__name__ + errmsg = _("%s html not found") % self.__name__ self.plugin.fail(errmsg) #@TODO: replace all plugin.fail(errmsg) with plugin.error(errmsg) in 0.4.10 raise TypeError(errmsg) @@ -68,7 +68,7 @@ class ReCaptcha(CaptchaService): if hasattr(self.plugin, "html") and self.plugin.html: html = self.plugin.html else: - errmsg = "ReCaptcha not found" + errmsg = _("ReCaptcha html not found") self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -87,7 +87,7 @@ class ReCaptcha(CaptchaService): if self.detect_key(): key = self.key else: - errmsg = "ReCaptcha key not found" + errmsg = _("ReCaptcha key not found") self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -127,7 +127,7 @@ class AdsCaptcha(CaptchaService): if hasattr(self.plugin, "html") and self.plugin.html: html = self.plugin.html else: - errmsg = "AdsCaptcha html not found" + errmsg = _("AdsCaptcha html not found") self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -147,7 +147,7 @@ class AdsCaptcha(CaptchaService): if self.detect_key(): key = self.key else: - errmsg = "AdsCaptcha key not found" + errmsg = _("AdsCaptcha key not found") self.plugin.fail(errmsg) raise TypeError(errmsg) @@ -188,7 +188,7 @@ class SolveMedia(CaptchaService): if self.detect_key(): key = self.key else: - errmsg = "SolveMedia key not found" + errmsg = _("SolveMedia key not found") self.plugin.fail(errmsg) raise TypeError(errmsg) -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/internal/CaptchaService.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index aa8758344..2143e23df 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -6,12 +6,12 @@ from random import random class CaptchaService: - __name__ = "CaptchaService" + __name__ = "CaptchaService" __version__ = "0.14" __description__ = """Base captcha service plugin""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team", "admin@pyload.org")] + __license__ = "GPLv3" + __authors__ = [("pyLoad Team", "admin@pyload.org")] KEY_PATTERN = None @@ -51,12 +51,12 @@ class CaptchaService: class ReCaptcha(CaptchaService): - __name__ = "ReCaptcha" + __name__ = "ReCaptcha" __version__ = "0.07" __description__ = """ReCaptcha captcha service plugin""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team", "admin@pyload.org")] + __license__ = "GPLv3" + __authors__ = [("pyLoad Team", "admin@pyload.org")] KEY_PATTERN = r'recaptcha(/api|\.net)/(challenge|noscript)\?k=(?P[\w-]+)' @@ -110,12 +110,12 @@ class ReCaptcha(CaptchaService): class AdsCaptcha(CaptchaService): - __name__ = "AdsCaptcha" + __name__ = "AdsCaptcha" __version__ = "0.04" __description__ = """AdsCaptcha captcha service plugin""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team", "admin@pyload.org")] + __license__ = "GPLv3" + __authors__ = [("pyLoad Team", "admin@pyload.org")] ID_PATTERN = r'api\.adscaptcha\.com/Get\.aspx\?[^"\']*CaptchaId=(?P\d+)' @@ -172,12 +172,12 @@ class AdsCaptcha(CaptchaService): class SolveMedia(CaptchaService): - __name__ = "SolveMedia" + __name__ = "SolveMedia" __version__ = "0.05" __description__ = """SolveMedia captcha service plugin""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team", "admin@pyload.org")] + __license__ = "GPLv3" + __authors__ = [("pyLoad Team", "admin@pyload.org")] KEY_PATTERN = r'api\.solvemedia\.com/papi/challenge\.(no)?script\?k=(?P.+?)["\']' -- cgit v1.2.3 From 59f72bfc5ed721c80c821bd0ca1bc8daf0d49880 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 9 Nov 2014 03:12:41 +0100 Subject: Code cosmetics --- module/plugins/internal/CaptchaService.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index 2143e23df..38775f519 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -91,7 +91,7 @@ class ReCaptcha(CaptchaService): self.plugin.fail(errmsg) raise TypeError(errmsg) - js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={'k': key}, cookies=True) + js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={'k': key}) try: challenge = re.search("challenge : '(.+?)',", js).group(1) @@ -153,7 +153,7 @@ class AdsCaptcha(CaptchaService): CaptchaId, PublicKey = key - js = self.plugin.req.load("http://api.adscaptcha.com/Get.aspx", get={'CaptchaId': CaptchaId, 'PublicKey': PublicKey}, cookies=True) + js = self.plugin.req.load("http://api.adscaptcha.com/Get.aspx", get={'CaptchaId': CaptchaId, 'PublicKey': PublicKey}) try: challenge = re.search("challenge: '(.+?)',", js).group(1) @@ -192,7 +192,7 @@ class SolveMedia(CaptchaService): self.plugin.fail(errmsg) raise TypeError(errmsg) - html = self.plugin.req.load("http://api.solvemedia.com/papi/challenge.noscript", get={'k': key}, cookies=True) + html = self.plugin.req.load("http://api.solvemedia.com/papi/challenge.noscript", get={'k': key}) try: challenge = re.search(r'', html).group(1) -- cgit v1.2.3