diff options
Diffstat (limited to 'module/plugins/hooks/DeathByCaptcha.py')
-rw-r--r-- | module/plugins/hooks/DeathByCaptcha.py | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py index d513c446d..8786df12f 100644 --- a/module/plugins/hooks/DeathByCaptcha.py +++ b/module/plugins/hooks/DeathByCaptcha.py @@ -8,9 +8,9 @@ from base64 import b64encode from pycurl import FORM_FILE, HTTPHEADER from time import sleep -from module.common.json_layer import json_loads -from module.network.HTTPRequest import BadHeader -from module.network.RequestFactory import getRequest +from pyload.utils import json_loads +from pyload.network.HTTPRequest import BadHeader +from pyload.network.RequestFactory import getRequest from module.plugins.Hook import Hook, threaded @@ -48,14 +48,14 @@ class DeathByCaptchaException(Exception): return "<DeathByCaptchaException %s>" % self.err -class DeathByCaptcha(Hook): +class DeathByCaptcha(Addon): __name__ = "DeathByCaptcha" __type__ = "hook" __version__ = "0.06" __config__ = [("username", "str", "Username", ""), - ("passkey", "password", "Password", ""), - ("force", "bool", "Force DBC even if client is connected", False)] + ("passkey", "password", "Password", ""), + ("force", "bool", "Force DBC even if client is connected", False)] __description__ = """Send captchas to DeathByCaptcha.com""" __license__ = "GPLv3" @@ -66,15 +66,6 @@ class DeathByCaptcha(Hook): API_URL = "http://api.dbcapi.me/api/" - #@TODO: Remove in 0.4.10 - def initPeriodical(self): - pass - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def api_response(self, api="captcha", post=False, multipart=False): req = getRequest() req.c.setopt(HTTPHEADER, ["Accept: application/json", "User-Agent: pyLoad %s" % self.core.version]) @@ -165,7 +156,7 @@ class DeathByCaptcha(Hook): return ticket, result - def newCaptchaTask(self, task): + def captchaTask(self, task): if "service" in task.data: return False |