diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-31 20:36:19 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-31 20:36:19 +0200 |
commit | dcb1894e0c708df0677187355c6743c08ac44c26 (patch) | |
tree | 9edd4c4eccde099a95edc8d7436dce8b92e3aba0 /module/CaptchaManager.py | |
parent | ShareLinksBiz decrypter (diff) | |
download | pyload-dcb1894e0c708df0677187355c6743c08ac44c26.tar.xz |
fixed positional captchas + availbillity over thrift
Diffstat (limited to 'module/CaptchaManager.py')
-rw-r--r-- | module/CaptchaManager.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/module/CaptchaManager.py b/module/CaptchaManager.py index 539e80744..02cd10a11 100644 --- a/module/CaptchaManager.py +++ b/module/CaptchaManager.py @@ -99,9 +99,9 @@ class CaptchaTask(): return self.captchaImg, self.captchaFormat, self.captchaResultType def setResult(self, text): - if self.captchaResultType == 'textual': + if self.isTextual(): self.result = text - if self.captchaResultType == 'positional': + if self.isPositional(): try: parts = text.split(',') self.result = (int(parts[0]), int(parts[1])) @@ -130,6 +130,14 @@ class CaptchaTask(): return True + def isTextual(self): + """ returns if text is written on the captcha """ + return self.captchaResultType == 'textual' + + def isPositional(self): + """ returns if user have to click a specific region on the captcha """ + return self.captchaResultType == 'positional' + def setWatingForUser(self, exclusive): if exclusive: self.status = "user" |