From 6f43cee91b2cd8c32b723932d620bfbbedb4149b Mon Sep 17 00:00:00 2001
From: Edward Betts <edward@4angle.com>
Date: Mon, 30 Oct 2023 06:43:45 +0000
Subject: [PATCH] Fix support for Wikipedia URLs

Closes: #4
---
 main.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main.py b/main.py
index d4b4677..a7dfe35 100755
--- a/main.py
+++ b/main.py
@@ -57,7 +57,7 @@ def start() -> str:
     if not enwp:
         return flask.render_template("combined.html")
 
-    input_is = "url" if enwp.startswith(enwiki) else "title"
+    input_is = "url" if enwiki in enwp else "title"
 
     wikipedia_url: str
     wiki_part1: str
@@ -70,7 +70,7 @@ def start() -> str:
         wikipedia_url = enwp
     else:
         name = enwp
-        wiki_part1 = enwiki
+        wiki_part1 = "https://" + enwiki
         wiki_part2 = name.replace(" ", "_")
         wikipedia_url = wiki_part1 + wiki_part2