diff options
| author | 2015-07-31 06:35:21 +0200 | |
|---|---|---|
| committer | 2015-07-31 06:35:21 +0200 | |
| commit | e3799bcb0731e8cdf4d3f86ae6ee67e9cc5e4d80 (patch) | |
| tree | 6e468a0488cad6a957d8fb38a1c4d0ee27d73972 /module | |
| parent | [Captcha] Fix _decrypt method (diff) | |
| download | pyload-e3799bcb0731e8cdf4d3f86ae6ee67e9cc5e4d80.tar.xz | |
Fix https://github.com/pyload/pyload/issues/1601
Diffstat (limited to 'module')
| -rw-r--r-- | module/plugins/hooks/Captcha9Kw.py | 7 | ||||
| -rw-r--r-- | module/plugins/internal/Plugin.py | 6 | 
2 files changed, 8 insertions, 5 deletions
| diff --git a/module/plugins/hooks/Captcha9Kw.py b/module/plugins/hooks/Captcha9Kw.py index e9edbe7f9..10d29e2c6 100644 --- a/module/plugins/hooks/Captcha9Kw.py +++ b/module/plugins/hooks/Captcha9Kw.py @@ -110,9 +110,9 @@ class Captcha9Kw(Hook):                       'numeric'       : option['numeric'],                       'math'          : option['math'],                       'oldsource'     : pluginname, -                     'pyload'        : "1", +                     'pyload'        : 1,                       'source'        : "pyload", -                     'base64'        : "1", +                     'base64'        : 1,                       'mouse'         : 1 if task.isPositional() else 0,                       'file-upload-01': b64encode(data),                       'action'        : "usercaptchaupload"} @@ -120,11 +120,14 @@ class Captcha9Kw(Hook):          for _i in xrange(5):              try:                  res = self.load(self.API_URL, post=post_data) +              except BadHeader, e:                  time.sleep(3) +              else:                  if res and res.isdigit():                      break +          else:              self.log_error(_("Bad upload: %s") % res)              return diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index 70494561c..159668c28 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -138,7 +138,7 @@ def chunks(iterable, size):  class Plugin(object):      __name__    = "Plugin"      __type__    = "hoster" -    __version__ = "0.20" +    __version__ = "0.21"      __status__  = "testing"      __pattern__ = r'^unmatchable$' @@ -292,7 +292,7 @@ class Plugin(object):          raise Fail(encode(msg))  #@TODO: Remove `encode` in 0.4.10 -    def load(self, url, get={}, post={}, ref=True, cookies=True, just_header=False, decode=True, req=None): +    def load(self, url, get={}, post={}, ref=True, cookies=True, just_header=False, decode=True, multipart=False, req=None):          """          Load content at url and returns it @@ -323,7 +323,7 @@ class Plugin(object):              else:                  req = self.pyload.requestFactory.getRequest(self.__name__) -        res = req.load(url, get, post, ref, cookies, just_header, isinstance(post, dict), decode is True)  #@TODO: Fix network multipart in 0.4.10 +        res = req.load(url, get, post, ref, cookies, just_header, multipart, decode is True)  #@TODO: Fix network multipart in 0.4.10          if decode:   #@TODO: Move to network in 0.4.10              res = html_unescape(res) | 
