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 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hoster/ZDF.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/ZDF.py') diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index d51a16a80..b28ebba8c 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -16,8 +16,7 @@ class ZDF(Hoster): __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/[^0-9]*([0-9]+)[^0-9]*' __description__ = """ZDF.de hoster plugin""" - __author_name__ = None - __author_mail__ = None + __authors__ = [] XML_API = "http://www.zdf.de/ZDFmediathek/xmlservice/web/beitragsDetails?id=%i" -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hoster/ZDF.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/ZDF.py') diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index b28ebba8c..a59812271 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -16,6 +16,7 @@ class ZDF(Hoster): __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/[^0-9]*([0-9]+)[^0-9]*' __description__ = """ZDF.de hoster plugin""" + __license__ = "GPLv3" __authors__ = [] XML_API = "http://www.zdf.de/ZDFmediathek/xmlservice/web/beitragsDetails?id=%i" -- cgit v1.2.3 From f76e5c2336718dca9da8033ba22cd83c72c7b3b3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:14:28 +0200 Subject: Pattern update 1 --- 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 a59812271..83a3bd95c 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -13,7 +13,7 @@ class ZDF(Hoster): __type__ = "hoster" __version__ = "0.8" - __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/[^0-9]*([0-9]+)[^0-9]*' + __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*' __description__ = """ZDF.de hoster plugin""" __license__ = "GPLv3" @@ -36,7 +36,7 @@ class ZDF(Hoster): @staticmethod def get_id(url): - return int(re.search(r"[^0-9]*([0-9]{4,})[^0-9]*", url).group(1)) + return int(re.search(r"\D*(\d{4,})\D*", url).group(1)) def process(self, pyfile): xml = fromstring(self.load(self.XML_API % self.get_id(pyfile.url))) -- cgit v1.2.3 From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/hoster/ZDF.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'module/plugins/hoster/ZDF.py') diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index 83a3bd95c..274dd474a 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -29,15 +29,18 @@ class ZDF(Hoster): any(f.text == "progressive" for f in video.iter("facet")), ) + @staticmethod def video_valid(video): return video.findtext("url").startswith("http") and video.findtext("url").endswith(".mp4") and \ video.findtext("facets/facet").startswith("progressive") + @staticmethod def get_id(url): return int(re.search(r"\D*(\d{4,})\D*", url).group(1)) + def process(self, pyfile): xml = fromstring(self.load(self.XML_API % self.get_id(pyfile.url))) -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/hoster/ZDF.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/ZDF.py') diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index 274dd474a..479209b4b 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -46,7 +46,7 @@ class ZDF(Hoster): status = xml.findtext("./status/statuscode") if status != "ok": - self.fail("Error retrieving manifest.") + self.fail(_("Error retrieving manifest")) video = xml.find("video") title = video.findtext("information/title") -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/ZDF.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/ZDF.py') diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index 479209b4b..04a395e1e 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -9,15 +9,15 @@ from module.plugins.Hoster import Hoster # Based on zdfm by Roland Beermann (http://github.com/enkore/zdfm/) class ZDF(Hoster): - __name__ = "ZDF Mediathek" - __type__ = "hoster" + __name__ = "ZDF Mediathek" + __type__ = "hoster" __version__ = "0.8" __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*' __description__ = """ZDF.de hoster plugin""" - __license__ = "GPLv3" - __authors__ = [] + __license__ = "GPLv3" + __authors__ = [] XML_API = "http://www.zdf.de/ZDFmediathek/xmlservice/web/beitragsDetails?id=%i" -- cgit v1.2.3 From 6151e81fa0b325dffda3da4228d5821e73db3ef3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 9 Dec 2014 01:19:46 +0100 Subject: Fix __version__ format in some plugins --- module/plugins/hoster/ZDF.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/ZDF.py') diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index 04a395e1e..8d3de5b26 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -11,7 +11,7 @@ from module.plugins.Hoster import Hoster class ZDF(Hoster): __name__ = "ZDF Mediathek" __type__ = "hoster" - __version__ = "0.8" + __version__ = "0.80" __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*' -- cgit v1.2.3