summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-23 23:18:39 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-23 23:18:39 +0100
commit2b14c07bfe427f40288b2c73db1813c0dc11659a (patch)
treea372b99ae38f55d7852c1e294d23aa1ef129a0e9 /module/plugins
parent[BasePlugin] Fix filename recognition (diff)
downloadpyload-2b14c07bfe427f40288b2c73db1813c0dc11659a.tar.xz
[CaptchaService] More debug logging
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/internal/CaptchaService.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py
index 38775f519..7009e6986 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.14"
+ __version__ = "0.15"
__description__ = """Base captcha service plugin"""
__license__ = "GPLv3"
@@ -52,7 +52,7 @@ class CaptchaService:
class ReCaptcha(CaptchaService):
__name__ = "ReCaptcha"
- __version__ = "0.07"
+ __version__ = "0.08"
__description__ = """ReCaptcha captcha service plugin"""
__license__ = "GPLv3"
@@ -92,7 +92,6 @@ class ReCaptcha(CaptchaService):
raise TypeError(errmsg)
js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={'k': key})
-
try:
challenge = re.search("challenge : '(.+?)',", js).group(1)
server = re.search("server : '(.+?)',", js).group(1)
@@ -101,6 +100,8 @@ class ReCaptcha(CaptchaService):
result = self.result(server, challenge)
+ self.plugin.logDebug("ReCaptcha result: %s" % result, "challenge: %s" % challenge)
+
return challenge, result
@@ -111,7 +112,7 @@ class ReCaptcha(CaptchaService):
class AdsCaptcha(CaptchaService):
__name__ = "AdsCaptcha"
- __version__ = "0.04"
+ __version__ = "0.05"
__description__ = """AdsCaptcha captcha service plugin"""
__license__ = "GPLv3"
@@ -154,7 +155,6 @@ class AdsCaptcha(CaptchaService):
CaptchaId, PublicKey = key
js = self.plugin.req.load("http://api.adscaptcha.com/Get.aspx", get={'CaptchaId': CaptchaId, 'PublicKey': PublicKey})
-
try:
challenge = re.search("challenge: '(.+?)',", js).group(1)
server = re.search("server: '(.+?)',", js).group(1)
@@ -163,6 +163,8 @@ class AdsCaptcha(CaptchaService):
result = self.result(server, challenge)
+ self.plugin.logDebug("AdsCaptcha result: %s" % result, "challenge: %s" % challenge)
+
return challenge, result
@@ -173,7 +175,7 @@ class AdsCaptcha(CaptchaService):
class SolveMedia(CaptchaService):
__name__ = "SolveMedia"
- __version__ = "0.05"
+ __version__ = "0.06"
__description__ = """SolveMedia captcha service plugin"""
__license__ = "GPLv3"
@@ -202,6 +204,8 @@ class SolveMedia(CaptchaService):
result = self.result(server, challenge)
+ self.plugin.logDebug("SolveMedia result: %s" % result, "challenge: %s" % challenge)
+
return challenge, result