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/hoster/BitshareCom.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'module/plugins/hoster/BitshareCom.py') diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index 9d2a23625..fe2ff0be6 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -113,14 +113,10 @@ class BitshareCom(SimpleHoster): if captcha == 1: self.logDebug("File is captcha protected") recaptcha = ReCaptcha(self) - captcha_key = recaptcha.detect_key() - if captcha_key is None: - self.error("ReCaptcha captcha key not found") # Try up to 3 times for i in xrange(3): - self.logDebug("Resolving ReCaptcha with key [%s], round %d" % (captcha_key, i + 1)) - challenge, code = recaptcha.challenge(captcha_key) + challenge, code = recaptcha.challenge() response = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html", post={"request": "validateCaptcha", "ajaxid": self.ajaxid, "recaptcha_challenge_field": challenge, "recaptcha_response_field": code}) -- cgit v1.2.3