diff options
Diffstat (limited to 'pyload')
| -rw-r--r-- | pyload/network/HTTPDownload.py | 2 | ||||
| -rw-r--r-- | pyload/network/HTTPRequest.py | 4 | ||||
| -rw-r--r-- | pyload/network/XDCCRequest.py | 2 | ||||
| -rw-r--r-- | pyload/plugins/Plugin.py | 2 | ||||
| -rw-r--r-- | pyload/plugins/internal/Crypter.py | 8 | ||||
| -rw-r--r-- | pyload/utils/JsEngine.py | 2 | 
6 files changed, 10 insertions, 10 deletions
| diff --git a/pyload/network/HTTPDownload.py b/pyload/network/HTTPDownload.py index 3c804c21c..debd653ee 100644 --- a/pyload/network/HTTPDownload.py +++ b/pyload/network/HTTPDownload.py @@ -284,7 +284,7 @@ class HTTPDownload:                  self.updateProgress()              if self.abort: -                raise Abort() +                raise Abort              #sleep(0.003) #supress busy waiting - limits dl speed to (1 / x) * buffersize              self.m.select(1) diff --git a/pyload/network/HTTPRequest.py b/pyload/network/HTTPRequest.py index 0384da5ff..c1727c0c5 100644 --- a/pyload/network/HTTPRequest.py +++ b/pyload/network/HTTPRequest.py @@ -167,7 +167,7 @@ class HTTPRequest:                  self.c.setopt(pycurl.POSTFIELDS, post)              else: -                post = [(x, y.encode('utf8') if type(y) == unicode else y ) for x, y in post.iteritems()] +                post = [(x, y.encode('utf8') if type(y) == unicode else y) for x, y in post.iteritems()]                  self.c.setopt(pycurl.HTTPPOST, post)          else:              self.c.setopt(pycurl.POST, 0) @@ -285,7 +285,7 @@ class HTTPRequest:              rep = self.getResponse()              if self.abort: -                raise Abort() +                raise Abort              with open("response.dump", "wb") as f:                  f.write(rep) diff --git a/pyload/network/XDCCRequest.py b/pyload/network/XDCCRequest.py index 6011061b1..e4f880d4d 100644 --- a/pyload/network/XDCCRequest.py +++ b/pyload/network/XDCCRequest.py @@ -91,7 +91,7 @@ class XDCCRequest:                  dccsock.close()                  fh.close()                  remove(filename) -                raise Abort() +                raise Abort              self._keepAlive(irc, ircbuffer) diff --git a/pyload/plugins/Plugin.py b/pyload/plugins/Plugin.py index a3ef1d46b..c28b3cd87 100644 --- a/pyload/plugins/Plugin.py +++ b/pyload/plugins/Plugin.py @@ -685,7 +685,7 @@ class Plugin(Base):          #produces encoding errors, better log to other file in the future?          #self.logDebug("Content: %s" % content)          for name, rule in rules.iteritems(): -            if type(rule) in (str, unicode): +            if isinstance(rule, basestring):                  if rule in content:                      if delete:                          remove(lastDownload) diff --git a/pyload/plugins/internal/Crypter.py b/pyload/plugins/internal/Crypter.py index 4fae07ff1..2bd9328c0 100644 --- a/pyload/plugins/internal/Crypter.py +++ b/pyload/plugins/internal/Crypter.py @@ -1,7 +1,9 @@  # -*- coding: utf-8 -*- +from urlparse import urlparse +  from pyload.plugins.Plugin import Plugin -from pyload.utils import save_filename +from pyload.utils import html_unescape, save_filename  class Crypter(Plugin): @@ -96,9 +98,7 @@ class Crypter(Plugin):                  elif not folder_per_package or name != folder:                      if not folder: -                        folder = name.replace("http://", "").replace(":", "").replace("/", "_").replace("\\", "_") - -                    folder = save_filename(folder)  #@TODO: move to core code +                        folder = urlparse(html_unescape(name)).path.split("/")[-1]                      setFolder(folder)                      self.logDebug("Set package %(name)s folder to: %(folder)s" % {"name": name, "folder": folder}) diff --git a/pyload/utils/JsEngine.py b/pyload/utils/JsEngine.py index ef5bc9be9..ac3a7a7a9 100644 --- a/pyload/utils/JsEngine.py +++ b/pyload/utils/JsEngine.py @@ -214,7 +214,7 @@ class RhinoEngine(AbstractEngine):      def eval(self, script):          script = "print(eval(unescape('%s')))" % quote(script)          args = ["java", "-cp", self.path, "org.mozilla.javascript.tools.shell.Main", "-e", script] -        return self._eval(args).decode("utf8").encode("ISO-8859-1") +        return self._eval(args).decode("utf-8").encode("ISO-8859-1")  class JscEngine(AbstractEngine): | 
