summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/ZDF.py
diff options
context:
space:
mode:
authorGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
committerGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
commitb0ef3f1673e1930916604bb1264ca3a38414bc8d (patch)
treec97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/hoster/ZDF.py
parent[XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff)
parentFix https://github.com/pyload/pyload/issues/1707 (diff)
downloadpyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/hoster/ZDF.py')
-rw-r--r--module/plugins/hoster/ZDF.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py
index 8d3de5b26..f0b85d11a 100644
--- a/module/plugins/hoster/ZDF.py
+++ b/module/plugins/hoster/ZDF.py
@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
import re
+import xml.etree.ElementTree as etree
-from xml.etree.ElementTree import fromstring
-
-from module.plugins.Hoster import Hoster
+from module.plugins.internal.Hoster import Hoster
# Based on zdfm by Roland Beermann (http://github.com/enkore/zdfm/)
class ZDF(Hoster):
__name__ = "ZDF Mediathek"
__type__ = "hoster"
- __version__ = "0.80"
+ __version__ = "0.84"
+ __status__ = "testing"
__pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*'
@@ -42,7 +42,7 @@ class ZDF(Hoster):
def process(self, pyfile):
- xml = fromstring(self.load(self.XML_API % self.get_id(pyfile.url)))
+ xml = etree.fromstring(self.load(self.XML_API % self.get_id(pyfile.url), decode=False))
status = xml.findtext("./status/statuscode")
if status != "ok":
@@ -51,7 +51,7 @@ class ZDF(Hoster):
video = xml.find("video")
title = video.findtext("information/title")
- pyfile.name = title
+ pyfile.name = title.encode("Latin-1")
target_url = sorted((v for v in video.iter("formitaet") if self.video_valid(v)),
key=self.video_key)[-1].findtext("url")