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):