summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FileserveCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/FileserveCom.py')
-rw-r--r--module/plugins/hoster/FileserveCom.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 58db17381..d682134ee 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -157,13 +157,14 @@ class FileserveCom(Hoster):
def do_captcha(self):
captcha_key = re.search(self.CAPTCHA_KEY_PATTERN, self.data).group(1)
- recaptcha = ReCaptcha(self.pyfile)
-
- response, challenge = recaptcha.challenge(captcha_key)
- res = json.loads(self.load(self.URLS[2],
- post={'recaptcha_challenge_field' : challenge,
- 'recaptcha_response_field' : response,
- 'recaptcha_shortencode_field': self.file_id}))
+ self.captcha = ReCaptcha(self.pyfile)
+
+ response, challenge = self.captcha.challenge(captcha_key)
+ html = self.load(self.URLS[2],
+ post={'recaptcha_challenge_field' : challenge,
+ 'recaptcha_response_field' : response,
+ 'recaptcha_shortencode_field': self.file_id})
+ res = json.loads(html)
if res['success']:
self.captcha.correct()
else: