summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/ZDF.py
diff options
context:
space:
mode:
authorGravatar jellysheep <max.mail@dameweb.de> 2015-10-18 21:34:40 +0200
committerGravatar jellysheep <max.mail@dameweb.de> 2015-10-18 21:34:40 +0200
commitaff9388d433847fa7adad7421c4d76bd5bdd4e5a (patch)
tree6e6e37d72e6a6c3f9664cba6aed2c2c96eec3bc7 /module/plugins/hoster/ZDF.py
parentMerge pull request #2024 from GammaC0de/patch-6 (diff)
downloadpyload-aff9388d433847fa7adad7421c4d76bd5bdd4e5a.tar.xz
[ZDF] Encode file name to ASCII for compatibility
This ensures that unicode filenames with UTF-8 characters are encoded into ASCII strings, to be compatible to all Pyload methods using `pyfile.name`. The encoding now is similar to the [YoutubeCom hoster module](https://github.com/pyload/pyload/blob/f61dcaa263750a61f86b4bfbaf9c2cf20c157de0/module/plugins/hoster/YoutubeCom.py#L145).
Diffstat (limited to 'module/plugins/hoster/ZDF.py')
-rw-r--r--module/plugins/hoster/ZDF.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py
index 1876ddb15..7db5e920e 100644
--- a/module/plugins/hoster/ZDF.py
+++ b/module/plugins/hoster/ZDF.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Hoster import Hoster
class ZDF(Hoster):
__name__ = "ZDF Mediathek"
__type__ = "hoster"
- __version__ = "0.85"
+ __version__ = "0.86"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*'
@@ -52,7 +52,7 @@ class ZDF(Hoster):
video = xml.find("video")
title = video.findtext("information/title")
- pyfile.name = title.encode("Latin-1")
+ pyfile.name = title.encode('ascii', errors='replace')
target_url = sorted((v for v in video.iter("formitaet") if self.video_valid(v)),
key=self.video_key)[-1].findtext("url")