From f336079c4f5c519121ea965a381a6e78f220e0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Thu, 25 Nov 2021 13:59:54 +0100 Subject: ZDF: Remove filter on title Maithink X mostly does not contain the show title in the episode title. --- zdf.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'zdf.py') diff --git a/zdf.py b/zdf.py index a72e84a..afaf653 100755 --- a/zdf.py +++ b/zdf.py @@ -1,8 +1,8 @@ +import locale import logging -from urllib.request import urlopen, Request from datetime import datetime +from urllib.request import Request, urlopen from xml.dom.minidom import parse, parseString -import locale def getText(dom, element): @@ -37,13 +37,14 @@ def zdf(feed): s_url = getText(show, "link") if not s_url: continue - # Full episodes have the ID 100 + + # Full episodes have the ID 100 (others aswell sometimes) if not s_url.endswith("-100.html"): continue s_title = getText(show, "title") - if not s_title.startswith(title): - continue + # if not s_title.startswith(title): # broke vor Maithink X + # continue s_date = getText(show, "pubDate") s_date_parsed = datetime.strptime(s_date, "%a, %d %b %Y %H:%M:%S %z") @@ -86,7 +87,8 @@ def zdf(feed): def main(): # print(zdf("comedy/heute-show")) # print(zdf("comedy/die-anstalt")) - print(zdf("comedy/zdf-magazin-royale")) + # print(zdf("comedy/zdf-magazin-royale")) + print(zdf("show/mai-think-x-die-show")) if __name__ == "__main__": -- cgit v1.2.3