diff options
Diffstat (limited to 'module/plugins/hooks/CaptchaBrotherhood.py')
-rw-r--r-- | module/plugins/hooks/CaptchaBrotherhood.py | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py index 3c08f5e36..ba9d3eb8e 100644 --- a/module/plugins/hooks/CaptchaBrotherhood.py +++ b/module/plugins/hooks/CaptchaBrotherhood.py @@ -13,7 +13,7 @@ except ImportError: from time import sleep from urllib import urlencode -from module.network.RequestFactory import getURL, getRequest +from pyload.network.RequestFactory import getURL, getRequest from module.plugins.Hook import Hook, threaded @@ -35,14 +35,14 @@ class CaptchaBrotherhoodException(Exception): return "<CaptchaBrotherhoodException %s>" % self.err -class CaptchaBrotherhood(Hook): +class CaptchaBrotherhood(Addon): __name__ = "CaptchaBrotherhood" __type__ = "hook" __version__ = "0.08" __config__ = [("username", "str", "Username", ""), - ("force", "bool", "Force CT even if client is connected", False), - ("passkey", "password", "Password", "")] + ("force", "bool", "Force CT even if client is connected", False), + ("passkey", "password", "Password", "")] __description__ = """Send captchas to CaptchaBrotherhood.com""" __license__ = "GPLv3" @@ -53,15 +53,6 @@ class CaptchaBrotherhood(Hook): API_URL = "http://www.captchabrotherhood.com/" - #@TODO: Remove in 0.4.10 - def initPeriodical(self): - pass - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def getCredits(self): res = getURL(self.API_URL + "askCredits.aspx", get={"username": self.getConfig("username"), "password": self.getConfig("passkey")}) @@ -136,7 +127,7 @@ class CaptchaBrotherhood(Hook): return res - def newCaptchaTask(self, task): + def captchaTask(self, task): if "service" in task.data: return False |