From ffb4e6efae62a1b81d9c828a7f6b8502e6cd1ed9 Mon Sep 17 00:00:00 2001 From: "Skylar \"The Cobra\" Widulski" Date: Fri, 4 Aug 2023 19:04:43 -0400 Subject: [PATCH] Add link to source code Signed-off-by: Skylar "The Cobra" Widulski --- main.py | 5 ++++- templates/index.html | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/main.py b/main.py index f584406..2ed1936 100644 --- a/main.py +++ b/main.py @@ -12,7 +12,10 @@ def scrape(url): our_path = re.sub(r".*://.*/", "/", request.url) path = re.sub(r".*://.*/", "/", data.url) - print(our_path, path) + print() + print(our_path) + print(path) + print() if our_path != path: return f"REDIRECT {path}" ret = [] diff --git a/templates/index.html b/templates/index.html index 32eae70..7bebcf0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,11 +10,11 @@
- + Random
@@ -22,15 +22,18 @@ {% for defid, word, definition, example, author in data[0] %}
- -

{{ word }}

-
-

{{ definition|safe }}

-

{{ example|safe }}

-

{{ author|safe }}

+ +

{{ word }}

+
+

{{ definition|safe }}

+

{{ example|safe }}

+

{{ author|safe }}


{% endfor %} {{ data[1]|safe }} +
+

Source Code

+