summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwebapp.py6
-rwxr-xr-xzdf.py10
2 files changed, 8 insertions, 8 deletions
diff --git a/webapp.py b/webapp.py
index cd68396..0fe540f 100755
--- a/webapp.py
+++ b/webapp.py
@@ -28,9 +28,9 @@ def not_found(e):
return "Die angeforderte Seite konnte nicht gefunden werden."
-@app.route("/zdf/<path:feed>")
-def filterZDFFeed(feed):
- return rssResponse(zdf(feed))
+@app.route("/zdf/<path:show_url>")
+def fetch_zdf_show(show_url):
+ return rssResponse(zdf(show_url))
if __name__ == "__main__":
diff --git a/zdf.py b/zdf.py
index 0d5adc1..b81278d 100755
--- a/zdf.py
+++ b/zdf.py
@@ -15,18 +15,18 @@ def getText(dom, element):
return ""
-def zdf(feed):
- url = f"https://www.zdf.de/rss/zdf/{feed}"
+def zdf(show_url):
+ url = f"https://www.zdf.de/rss/zdf/{show_url}"
try:
- res = urlopen(Request(url))
+ response = urlopen(Request(url))
except Exception as exc:
logging.error("Request to zdf failed.", exc_info=exc)
return None
try:
- rss = res.read()
- xml = parseString(rss)
+ rss_raw = response.read()
+ xml = parseString(rss_raw)
except Exception as exc:
logging.error("Parsing to zdf failed.", exc_info=exc)
return None