From a6b488d1a65c32bcb8701fca66638324f29fc8b9 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 7 Oct 2024 17:44:42 +1100 Subject: [PATCH] fix: Update now.rss to include better descriptions --- server.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index 1c3c9ad..33a34e5 100644 --- a/server.py +++ b/server.py @@ -634,8 +634,9 @@ def now_old(): @app.route("/now.rss") def now_rss(): - host = request.scheme + "://" + request.host - print(host) + host = "https://" + request.host + if ":" in request.host: + host = "http://" + request.host # Generate RSS feed now_pages = os.listdir("templates/now") now_pages = [ @@ -647,7 +648,7 @@ def now_rss(): link = page.strip(".html") date = datetime.datetime.strptime(link, "%y_%m_%d") date = date.strftime("%A, %B %d, %Y") - rss += f'{date}{host}/now/{link}{date}{host}/now/{link}' + rss += f'What\'s Happening {date}{host}/now/{link}Latest updates for {date}{host}/now/{link}' rss += "" return make_response(rss, 200, {"Content-Type": "application/rss+xml"})