diff options
author | Sahil Shekhawat <sahilshekhawat01@gmail.com> | 2015-01-05 19:31:35 +0100 |
---|---|---|
committer | Sahil Shekhawat <sahilshekhawat01@gmail.com> | 2015-01-05 19:31:35 +0100 |
commit | 7b8593899e3d37846fb3ed94d47d9daba13a02d7 (patch) | |
tree | 5427650c3dd14b0c2878a1081be3709458bf48db /module/plugins/hooks/ImageTyperz.py | |
parent | Created plugin for Nitroflare.com (diff) | |
parent | Spare code improvements (diff) | |
download | pyload-7b8593899e3d37846fb3ed94d47d9daba13a02d7.tar.xz |
Merge branch 'stable' of https://github.com/pyload/pyload into stable
Diffstat (limited to 'module/plugins/hooks/ImageTyperz.py')
-rw-r--r-- | module/plugins/hooks/ImageTyperz.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py index f89d64c37..d448d1be9 100644 --- a/module/plugins/hooks/ImageTyperz.py +++ b/module/plugins/hooks/ImageTyperz.py @@ -6,10 +6,9 @@ import re from base64 import b64encode from pycurl import FORM_FILE, LOW_SPEED_TIME -from thread import start_new_thread from module.network.RequestFactory import getURL, getRequest -from module.plugins.Hook import Hook +from module.plugins.Hook import Hook, threaded class ImageTyperzException(Exception): @@ -33,7 +32,7 @@ class ImageTyperzException(Exception): class ImageTyperz(Hook): __name__ = "ImageTyperz" __type__ = "hook" - __version__ = "0.05" + __version__ = "0.06" __config__ = [("username", "str", "Username", ""), ("passkey", "password", "Password", ""), @@ -130,7 +129,7 @@ class ImageTyperz(Hook): task.handler.append(self) task.data['service'] = self.__name__ task.setWaiting(100) - start_new_thread(self.processCaptcha, (task,)) + self._processCaptcha(task) else: self.logInfo(_("Your %s account has not enough credits") % self.__name__) @@ -150,7 +149,8 @@ class ImageTyperz(Hook): self.logError(_("Bad captcha solution received, refund request failed"), res) - def processCaptcha(self, task): + @threaded + def _processCaptcha(self, task): c = task.captchaFile try: ticket, result = self.submit(c) |