summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/Captcha9kw.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-28 23:56:31 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-28 23:56:31 +0100
commitb71a408f118eb1117dad3c11da8bfd883e6bf28f (patch)
tree9f6769dc0be929fdd0c8bcb58a3fc2e524f044a7 /module/plugins/hooks/Captcha9kw.py
parent[UnRar] Fix version detection (diff)
downloadpyload-b71a408f118eb1117dad3c11da8bfd883e6bf28f.tar.xz
[Captcha9kw] Option "Captcha per minute" (thx stefanos)
Diffstat (limited to 'module/plugins/hooks/Captcha9kw.py')
-rwxr-xr-xmodule/plugins/hooks/Captcha9kw.py31
1 files changed, 17 insertions, 14 deletions
diff --git a/module/plugins/hooks/Captcha9kw.py b/module/plugins/hooks/Captcha9kw.py
index 77375fb8b..38b39b2af 100755
--- a/module/plugins/hooks/Captcha9kw.py
+++ b/module/plugins/hooks/Captcha9kw.py
@@ -17,19 +17,20 @@ from module.plugins.Hook import Hook
class Captcha9kw(Hook):
__name__ = "Captcha9kw"
__type__ = "hook"
- __version__ = "0.24"
-
- __config__ = [("activated", "bool", "Activated", True),
- ("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"),
- ("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")]
+ __version__ = "0.25"
+
+ __config__ = [("activated" , "bool" , "Activated" , True ),
+ ("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" )]
__description__ = """Send captchas to 9kw.eu"""
__license__ = "GPLv3"
@@ -85,7 +86,8 @@ class Captcha9kw(Hook):
'confirm' : self.getConfig("confirm"),
'timeout' : min(max(self.getConfig("timeout"), 300), 3999),
'selfsolve' : self.getConfig("selfsolve"),
- 'cph' : self.getConfig("captchaperhour")}
+ 'cph' : self.getConfig("captchaperhour"),
+ 'cpm' : self.getConfig("captchapermin")}
for opt in str(self.getConfig("hoster_options").split('|')):
@@ -112,6 +114,7 @@ class Captcha9kw(Hook):
'maxtimeout' : option['timeout'],
'selfsolve' : option['selfsolve'],
'captchaperhour': option['cph'],
+ 'captchapermin' : option['cpm'],
'case-sensitive': option['case_sensitive'],
'min_len' : option['min'],
'max_len' : option['max'],