+
55
-

python如何批量查询一个域名前缀可注册的后缀?

python如何批量查询一个域名前缀可注册的后缀?


网友回复

+
9
-

需要安装 python-whois 库:pip install python-whois

import whois
import time

# 域名前缀和后缀列表
prefixes = ["example", "test", "demo"]
suffixes = [".com", ".net", ".org", ".io"]

def is_domain_registered(domain):
    try:
        w = whois.whois(domain)
        # 如果返回的信息中有注册人...

点击查看剩余70%

我知道答案,我要回答