我正在成功使用pythonwhois
(与pip install ...
一起安装)来检查.com域的可用性:
import pythonwhois
for domain in ['aaa.com', 'bbb.com', ...]:
details = pythonwhois.get_whois(domain)
if 'No match for' in str(details): # simple but it works!
print domain
但是:
???mail.com
的可用性,其中?
是{问题:有没有比为每个域执行一个whois
请求更好的方法来检查可用性?
编辑:这项工作在9572秒内完成,截至2017年11月,如果有人有兴趣启动电子邮件服务,那么???mail.com
形式的所有可用域的here is the full list!在
你应该把你正在做的事情平行化。由于函数花费的大部分时间都在等待中,因此可以一次验证大量工作(不限于处理器数量)。示例:
相关问题 更多 >
编程相关推荐