python快速解析域名

import dns.resolver
myresolver = dns.resolver.Resolver(None, False)
myresolver.nameservers = ["8.8.4.4"]
myresolver.query("a.b.com")

比socket.getaddrinfo和socket.gethostbyname速度快几百倍

推荐阅读更多精彩内容