Skip to content

Commit 14bc95b

Browse files
committed
Quick fix for small mistake
1 parent c89c575 commit 14bc95b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

twitfix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def twitfix(sub_path):
112112
twitter_url = "https://twitter.com/" + sub_path
113113
else:
114114
# URL normalization messes up the URL, so we have to fix it
115-
if sub_path.startswith("https:/"):
115+
if sub_path.startswith("https:/") and not sub_path.startswith("https://"):
116116
twitter_url = sub_path.replace("https:/", "https://", 1)
117-
elif sub_path.startswith("http:/"):
117+
elif sub_path.startswith("http:/") and not sub_path.startswith("http://"):
118118
twitter_url = sub_path.replace("http:/", "http://", 1)
119119

120120
if isValidUserAgent(user_agent):

0 commit comments

Comments
 (0)