diff options
Diffstat (limited to 'pyload/plugin/hook/ExpertDecoders.py')
-rw-r--r-- | pyload/plugin/hook/ExpertDecoders.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pyload/plugin/hook/ExpertDecoders.py b/pyload/plugin/hook/ExpertDecoders.py index 8fbc88c80..f1096b8ed 100644 --- a/pyload/plugin/hook/ExpertDecoders.py +++ b/pyload/plugin/hook/ExpertDecoders.py @@ -21,15 +21,17 @@ class ExpertDecoders(Hook): __description__ = """Send captchas to expertdecoders.com""" __license__ = "GPLv3" - __authors__ = [("RaNaN", "RaNaN@pyload.org"), + __authors__ = [("RaNaN" , "RaNaN@pyload.org" ), ("zoidberg", "zoidberg@mujmail.cz")] + interval = 0 #@TODO: Remove in 0.4.10 + API_URL = "http://www.fasttypers.org/imagepost.ashx" def getCredits(self): - res = getURL(self.API_URL, post={"key": self.getConfig("passkey"), "action": "balance"}) + res = getURL(self.API_URL, post={"key": self.getConfig('passkey'), "action": "balance"}) if res.isdigit(): self.logInfo(_("%s credits left") % res) @@ -55,7 +57,7 @@ class ExpertDecoders(Hook): try: result = req.load(self.API_URL, post={'action' : "upload", - 'key' : self.getConfig("passkey"), + 'key' : self.getConfig('passkey'), 'file' : b64encode(data), 'gen_task_id': ticket}) finally: @@ -69,10 +71,10 @@ class ExpertDecoders(Hook): if not task.isTextual(): return False - if not self.getConfig("passkey"): + if not self.getConfig('passkey'): return False - if self.core.isClientConnected() and not self.getConfig("force"): + if self.core.isClientConnected() and not self.getConfig('force'): return False if self.getCredits() > 0: @@ -89,7 +91,7 @@ class ExpertDecoders(Hook): try: res = getURL(self.API_URL, - post={'action': "refund", 'key': self.getConfig("passkey"), 'gen_task_id': task.data['ticket']}) + post={'action': "refund", 'key': self.getConfig('passkey'), 'gen_task_id': task.data['ticket']}) self.logInfo(_("Request refund"), res) except BadHeader, e: |