We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c89c575 commit 14bc95bCopy full SHA for 14bc95b
twitfix.py
@@ -112,9 +112,9 @@ def twitfix(sub_path):
112
twitter_url = "https://twitter.com/" + sub_path
113
else:
114
# URL normalization messes up the URL, so we have to fix it
115
- if sub_path.startswith("https:/"):
+ if sub_path.startswith("https:/") and not sub_path.startswith("https://"):
116
twitter_url = sub_path.replace("https:/", "https://", 1)
117
- elif sub_path.startswith("http:/"):
+ elif sub_path.startswith("http:/") and not sub_path.startswith("http://"):
118
twitter_url = sub_path.replace("http:/", "http://", 1)
119
120
if isValidUserAgent(user_agent):
0 commit comments