summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar jellysheep <max.mail@dameweb.de> 2015-08-02 19:35:01 +0200
committerGravatar jellysheep <max.mail@dameweb.de> 2015-08-02 19:35:01 +0200
commitd92b4f08f623295028cf59338ca33d2a55c29f7b (patch)
tree176247f7de0d68093788dac4c45b9c332d8cb37b /module
parentFix https://github.com/pyload/pyload/issues/1591 (diff)
downloadpyload-d92b4f08f623295028cf59338ca33d2a55c29f7b.tar.xz
[ZDF] Encode unicode characters when loading XML
The XML file from the ZDF website often contains unicode characters, which lead to errors like `'ascii' codec can't decode byte 0xc3 in position 29: ordinal not in range(128)`. This change makes the plugin encode unicode characters to UTF-8 before parsing the XML data.
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/ZDF.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py
index f66c07a13..549dd718c 100644
--- a/module/plugins/hoster/ZDF.py
+++ b/module/plugins/hoster/ZDF.py
@@ -42,7 +42,7 @@ class ZDF(Hoster):
def process(self, pyfile):
- xml = etree.fromstring(self.load(self.XML_API % self.get_id(pyfile.url)))
+ xml = etree.fromstring(self.load(self.XML_API % self.get_id(pyfile.url)).encode("UTF-8"))
status = xml.findtext("./status/statuscode")
if status != "ok":