From 48c0c42fd6faffc56432d5f037cd575979f180cc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 02:23:37 +0200 Subject: Removed all @author flags + key attributes cleanup for internal & hooks plugins --- module/plugins/hoster/ZDF.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/ZDF.py') diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index e718f283e..3c9c6ce9a 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -15,8 +15,8 @@ class ZDF(Hoster): __version__ = "0.8" __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/[^0-9]*([0-9]+)[^0-9]*' __description__ = """ZDF.de hoster plugin""" - __author_name__ = "" - __author_mail__ = "" + __author_name__ = None + __author_mail__ = None @staticmethod def video_key(video): -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/hoster/ZDF.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/ZDF.py') diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index 3c9c6ce9a..d51a16a80 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -1,23 +1,27 @@ # -*- coding: utf-8 -*- import re + from xml.etree.ElementTree import fromstring from module.plugins.Hoster import Hoster -XML_API = "http://www.zdf.de/ZDFmediathek/xmlservice/web/beitragsDetails?id=%i" - +# Based on zdfm by Roland Beermann (http://github.com/enkore/zdfm/) class ZDF(Hoster): - # Based on zdfm by Roland Beermann - # http://github.com/enkore/zdfm/ __name__ = "ZDF Mediathek" + __type__ = "hoster" __version__ = "0.8" + __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/[^0-9]*([0-9]+)[^0-9]*' + __description__ = """ZDF.de hoster plugin""" __author_name__ = None __author_mail__ = None + XML_API = "http://www.zdf.de/ZDFmediathek/xmlservice/web/beitragsDetails?id=%i" + + @staticmethod def video_key(video): return ( @@ -35,7 +39,7 @@ class ZDF(Hoster): return int(re.search(r"[^0-9]*([0-9]{4,})[^0-9]*", url).group(1)) def process(self, pyfile): - xml = fromstring(self.load(XML_API % self.get_id(pyfile.url))) + xml = fromstring(self.load(self.XML_API % self.get_id(pyfile.url))) status = xml.findtext("./status/statuscode") if status != "ok": -- cgit v1.2.3