diff --git a/app/utils/string.py b/app/utils/string.py index f4b866f4..a6d31dde 100644 --- a/app/utils/string.py +++ b/app/utils/string.py @@ -242,7 +242,10 @@ class StringUtils: return 'u2.dmhy.org' _, netloc = StringUtils.get_url_netloc(url) if netloc: - return ".".join(netloc.split(".")[-2:]) + locs = netloc.split(".") + if len(locs) > 3: + return netloc + return ".".join(locs[-2:]) return "" @staticmethod