diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-22 02:04:46 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-22 02:04:46 +0200 |
commit | 99f1eff391ca832740d1d519e8d6724a00fba952 (patch) | |
tree | b3518e67dff767b85ea15115bd1c5e27eda169c1 /module/plugins/internal/SimpleCrypter.py | |
parent | Remove needless self.html (diff) | |
download | pyload-99f1eff391ca832740d1d519e8d6724a00fba952.tar.xz |
[SimpleCrypter] Fix missing TEXT_ENCODING routine
Diffstat (limited to 'module/plugins/internal/SimpleCrypter.py')
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index b09ee6ac2..e2e08bb1b 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -12,7 +12,7 @@ from module.utils import fixup, html_unescape class SimpleCrypter(Crypter): __name__ = "SimpleCrypter" __type__ = "crypter" - __version__ = "0.17" + __version__ = "0.18" __pattern__ = None @@ -88,7 +88,7 @@ class SimpleCrypter(Crypter): set_cookies(self.req.cj, self.COOKIES) url = self.pyfile.url = replace_patterns(self.pyfile.url, self.URL_REPLACEMENTS) - self.html = getURL(url, decode=not self.TEXT_ENCODING, cookies=self.COOKIES) + self.html = getURL(url, decode=not self.TEXT_ENCODING, cookies=bool(self.COOKIES)) def decrypt(self, pyfile): @@ -127,6 +127,9 @@ class SimpleCrypter(Crypter): def getPackageNameAndFolder(self): + if isinstance(self.TEXT_ENCODING, basestring): + self.html = unicode(html, self.TEXT_ENCODING) + if hasattr(self, 'TITLE_PATTERN'): try: m = re.search(self.TITLE_PATTERN, self.html) |