summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-05 13:14:40 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-05 13:14:40 +0200
commitfe70307e0b6916cc5a4273c73cdd355dee02546a (patch)
tree9bd0ea05d8d31ac4a1705ea2405c27ecbe42d772 /module
parentFix long int conversion issue (diff)
downloadpyload-fe70307e0b6916cc5a4273c73cdd355dee02546a.tar.xz
[Plugin] Fix decoding in load method
Diffstat (limited to 'module')
-rw-r--r--module/plugins/internal/Plugin.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
index 1f86214c4..9b110280e 100644
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -2,6 +2,7 @@
from __future__ import with_statement
+import inspect
import os
import re
import urllib
@@ -260,14 +261,9 @@ class Plugin(object):
res = req.load(url, get, post, ref, cookies, just_header, True, bool(decode))
if decode:
- res = html_unescape(res)
-
- if isinstance(decode, basestring):
- res = res.decode(decode)
+ res = html_unescape(res).decode(decode if isinstance(decode, basestring) else 'utf8')
if self.core.debug:
- import inspect
-
frame = inspect.currentframe()
framefile = fs_join("tmp", self.__name__, "%s_line%s.dump.html" % (frame.f_back.f_code.co_name, frame.f_back.f_lineno))
try: