From d43bd2b0bf115b89c6bd99ca9b8377d740bb2442 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Wed, 18 Mar 2020 18:14:28 +0100 Subject: Add trailing slash to base URL if necessary. --- gemfeed.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gemfeed.py b/gemfeed.py index 41bca57..23dc007 100644 --- a/gemfeed.py +++ b/gemfeed.py @@ -189,6 +189,8 @@ def main(): base_url = base_url._replace(netloc=base_url.path, path="") base_url = base_url._replace(scheme="gemini") args.base_url = urllib.parse.urlunsplit(base_url) + if not args.base_url.endswith("/"): + args.base_url += "/" # Build the feed build_feed(args.directory, args.base_url, args.output, args.n, args.title, -- cgit v1.2.3-54-g00ecf