diff options
Diffstat (limited to 'module/plugins/hooks/Captcha9Kw.py')
-rw-r--r-- | module/plugins/hooks/Captcha9Kw.py | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/module/plugins/hooks/Captcha9Kw.py b/module/plugins/hooks/Captcha9Kw.py index 544965b0f..04caff345 100644 --- a/module/plugins/hooks/Captcha9Kw.py +++ b/module/plugins/hooks/Captcha9Kw.py @@ -7,28 +7,28 @@ import re from base64 import b64encode from time import sleep -from module.network.HTTPRequest import BadHeader -from module.network.RequestFactory import getURL +from pyload.network.HTTPRequest import BadHeader +from pyload.network.RequestFactory import getURL from module.plugins.Hook import Hook, threaded -class Captcha9Kw(Hook): +class Captcha9kw(Hook): __name__ = "Captcha9Kw" __type__ = "hook" __version__ = "0.28" __config__ = [("ssl" , "bool" , "Use HTTPS" , True ), - ("force" , "bool" , "Force captcha resolving even if client is connected" , True ), - ("confirm" , "bool" , "Confirm Captcha (cost +6 credits)" , False ), - ("captchaperhour", "int" , "Captcha per hour" , "9999" ), - ("captchapermin" , "int" , "Captcha per minute" , "9999" ), - ("prio" , "int" , "Priority (max 10)(cost +0 -> +10 credits)" , "0" ), - ("queue" , "int" , "Max. Queue (max 999)" , "50" ), - ("hoster_options", "string" , "Hoster options (format: pluginname:prio=1:selfsolfe=1:confirm=1:timeout=900|...)", "ShareonlineBiz:prio=0:timeout=999 | UploadedTo:prio=0:timeout=999"), - ("selfsolve" , "bool" , "Selfsolve (manually solve your captcha in your 9kw client if active)" , "0" ), - ("passkey" , "password", "API key" , "" ), - ("timeout" , "int" , "Timeout in seconds (min 60, max 3999)" , "900" )] + ("force" , "bool" , "Force captcha resolving even if client is connected" , True ), + ("confirm" , "bool" , "Confirm Captcha (cost +6 credits)" , False ), + ("captchaperhour", "int" , "Captcha per hour" , "9999" ), + ("captchapermin" , "int" , "Captcha per minute" , "9999" ), + ("prio" , "int" , "Priority (max 10)(cost +0 -> +10 credits)" , "0" ), + ("queue" , "int" , "Max. Queue (max 999)" , "50" ), + ("hoster_options", "string" , "Hoster options (format: pluginname:prio=1:selfsolfe=1:confirm=1:timeout=900|...)", "ShareonlineBiz:prio=0:timeout=999 | UploadedTo:prio=0:timeout=999"), + ("selfsolve" , "bool" , "Selfsolve (manually solve your captcha in your 9kw client if active)" , "0" ), + ("passkey" , "password", "API key" , "" ), + ("timeout" , "int" , "Timeout in seconds (min 60, max 3999)" , "900" )] __description__ = """Send captchas to 9kw.eu""" __license__ = "GPLv3" @@ -39,13 +39,7 @@ class Captcha9Kw(Hook): API_URL = "http://www.9kw.eu/index.cgi" - #@TODO: Remove in 0.4.10 - def initPeriodical(self): - pass - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 + def activate(self): if self.getConfig("ssl"): self.API_URL = self.API_URL.replace("http://", "https://") @@ -168,7 +162,7 @@ class Captcha9Kw(Hook): task.setResult(result) - def newCaptchaTask(self, task): + def captchaTask(self, task): if not task.isTextual() and not task.isPositional(): return |