From 14bc95ba543fe5554a1547e99ed673894d2b858a Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 2 Jul 2023 16:16:19 +0100 Subject: [PATCH] Quick fix for small mistake --- twitfix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twitfix.py b/twitfix.py index 7607329..cd27e3d 100644 --- a/twitfix.py +++ b/twitfix.py @@ -112,9 +112,9 @@ def twitfix(sub_path): twitter_url = "https://twitter.com/" + sub_path else: # URL normalization messes up the URL, so we have to fix it - if sub_path.startswith("https:/"): + if sub_path.startswith("https:/") and not sub_path.startswith("https://"): twitter_url = sub_path.replace("https:/", "https://", 1) - elif sub_path.startswith("http:/"): + elif sub_path.startswith("http:/") and not sub_path.startswith("http://"): twitter_url = sub_path.replace("http:/", "http://", 1) if isValidUserAgent(user_agent):