We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54690a1 commit 66f8079Copy full SHA for 66f8079
telegram/utils/helpers.py
@@ -161,8 +161,5 @@ def extract_urls(message):
161
# Strip trailing slash from URL so we can compare them for equality
162
stripped_urls = [x[:-1] if x[-1] == '/' else x for x in all_urls]
163
164
- sorted_urls = sorted(stripped_urls)
165
-
166
- # Remove exact duplicates
167
- urls = OrderedDict({k: None for k in sorted_urls})
168
- return list(urls.keys())
+ urls = set(stripped_urls)
+ return sorted(list(urls))
0 commit comments