From f53e80f96773c2af95938f206d9949b4042500f9 Mon Sep 17 00:00:00 2001 From: Stefano Codari Date: Tue, 19 Mar 2013 21:27:26 +0100 Subject: Solvemedia Captcha: implemented in a better way trying to fix bug #21 --- module/plugins/internal/CaptchaService.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'module/plugins/internal/CaptchaService.py') 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'', html).group(1) except: self.plugin.fail("solvmedia error") result = self.result(challenge) -- cgit v1.2.3