summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Stefano Codari <l.stickell@yahoo.it> 2013-03-19 21:27:26 +0100
committerGravatar Stefano Codari <l.stickell@yahoo.it> 2013-03-19 21:27:26 +0100
commitf53e80f96773c2af95938f206d9949b4042500f9 (patch)
tree3d4e07dd9aec749073bcc4d7a6f0cb235fa2c6ea /module/plugins/internal
parentRyushareCom: Added ability to detect free download limit reached. (diff)
downloadpyload-f53e80f96773c2af95938f206d9949b4042500f9.tar.xz
Solvemedia Captcha: implemented in a better way trying to fix bug #21
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/CaptchaService.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py
index f2de00732..b912436a7 100644
--- a/module/plugins/internal/CaptchaService.py
+++ b/module/plugins/internal/CaptchaService.py
@@ -19,7 +19,7 @@
import re
class CaptchaService():
- __version__ = "0.01"
+ __version__ = "0.02"
def __init__(self, plugin):
self.plugin = plugin
@@ -64,11 +64,9 @@ class SolveMedia(CaptchaService):
self.plugin = plugin
def challenge(self, src):
- html = self.plugin.req.load("http://api.solvemedia.com/papi/challenge.script?k=%s" % src, cookies=True)
+ html = self.plugin.req.load("http://api.solvemedia.com/papi/challenge.noscript?k=%s" % src, cookies=True)
try:
- ckey = re.search("ckey:.*?'(.*?)',",html).group(1)
- html = self.plugin.req.load("http://api.solvemedia.com/papi/_challenge.js?k=%s" % ckey, cookies=True)
- challenge = re.search('"chid".*?: "(.*?)"',html).group(1)
+ challenge = re.search(r'<input type=hidden name="adcopy_challenge" id="adcopy_challenge" value="([^"]+)">', html).group(1)
except:
self.plugin.fail("solvmedia error")
result = self.result(challenge)