import tldextract
url = 'http://www.bddd.net/jd.html'
o = tldextract.extract(url)
domain = "{}.{}".format(o.domain, o.suffix)
print(domain)
获取网站主域名插件,获取url顶级域名方法
猜你喜欢
转载自blog.csdn.net/haohaomax1/article/details/112601141
今日推荐
周排行