mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-09 23:39:25 +08:00
update
This commit is contained in:
@@ -36,6 +36,7 @@ pillow
|
||||
Jinja2>=2.11.2
|
||||
PyMySQL>=1.0.2
|
||||
whitenoise==5.3.0
|
||||
tldextract
|
||||
pyotp
|
||||
pytz
|
||||
supervisor
|
||||
|
||||
@@ -2263,6 +2263,12 @@ location ^~ {from} {\n\
|
||||
return def_var
|
||||
|
||||
def getDomainRootName(self, domain):
|
||||
import tldextract
|
||||
extracted = tldextract.extract(domain)
|
||||
# 组合注册域名和顶级域名
|
||||
return "{extracted.domain}.{extracted.suffix}"
|
||||
|
||||
def getDomainRootName_Old(self, domain):
|
||||
s = domain.split('.')
|
||||
count = len(s)
|
||||
last_index = count - 1
|
||||
|
||||
Reference in New Issue
Block a user