diff options
author | André Glüpker <git@wgmd.de> | 2021-11-25 13:59:54 +0100 |
---|---|---|
committer | André Glüpker <git@wgmd.de> | 2021-11-25 13:59:54 +0100 |
commit | f336079c4f5c519121ea965a381a6e78f220e0af (patch) | |
tree | c07c948636e5710e85389664571965c46933b8ab | |
parent | a056cdf87b88fcc086d5426880cef5a37661c6e7 (diff) | |
download | rss-feeds-f336079c4f5c519121ea965a381a6e78f220e0af.tar.gz rss-feeds-f336079c4f5c519121ea965a381a6e78f220e0af.tar.bz2 rss-feeds-f336079c4f5c519121ea965a381a6e78f220e0af.zip |
ZDF: Remove filter on title
Maithink X mostly does not contain the show title in the episode title.
-rwxr-xr-x | zdf.py | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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__": |