diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-21 08:50:26 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-24 22:43:08 +0200 |
commit | e4fb45b22d36595839e8f638a3f0a4669dba3e8d (patch) | |
tree | 549ba2a4f6e23a7178b8f91c79e0c037b36412ca /module/plugins/hooks/DeathByCaptcha.py | |
parent | Spare code cosmetics (3) (diff) | |
download | pyload-e4fb45b22d36595839e8f638a3f0a4669dba3e8d.tar.xz |
Spare code cosmetics (4)
Diffstat (limited to 'module/plugins/hooks/DeathByCaptcha.py')
-rw-r--r-- | module/plugins/hooks/DeathByCaptcha.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py index 50331d512..e0b319e12 100644 --- a/module/plugins/hooks/DeathByCaptcha.py +++ b/module/plugins/hooks/DeathByCaptcha.py @@ -53,9 +53,9 @@ class DeathByCaptcha(Hook): __type__ = "hook" __version__ = "0.07" - __config__ = [("username", "str", "Username", ""), - ("passkey", "password", "Password", ""), - ("force", "bool", "Force DBC even if client is connected", False)] + __config__ = [("username" , "str" , "Username" , "" ), + ("password" , "password", "Password" , "" ), + ("check_client", "bool" , "Don't use if client is connected", True)] __description__ = """Send captchas to DeathByCaptcha.com""" __license__ = "GPLv3" @@ -80,7 +80,7 @@ class DeathByCaptcha(Hook): if not isinstance(post, dict): post = {} post.update({"username": self.getConfig('username'), - "password": self.getConfig('passkey')}) + "password": self.getConfig('password')}) res = None try: @@ -135,7 +135,7 @@ class DeathByCaptcha(Hook): def submit(self, captcha, captchaType="file", match=None): #@NOTE: Workaround multipart-post bug in HTTPRequest.py - if re.match("^\w*$", self.getConfig('passkey')): + if re.match("^\w*$", self.getConfig('password')): multipart = True data = (pycurl.FORM_FILE, captcha) else: @@ -171,10 +171,10 @@ class DeathByCaptcha(Hook): if not task.isTextual(): return False - if not self.getConfig('username') or not self.getConfig('passkey'): + if not self.getConfig('username') or not self.getConfig('password'): return False - if self.core.isClientConnected() and not self.getConfig('force'): + if self.core.isClientConnected() and self.getConfig('check_client'): return False try: |