📅  最后修改于: 2022-03-11 14:45:18.684000             🧑  作者: Mango
import dns.resolver
name = 'iana.org'
for qtype in 'A', 'AAAA', 'MX', 'NS', 'TXT', 'SOA':
answer = dns.resolver.query(name,qtype, raise_on_no_answer=False)
if answer.rrset is not None:
print(answer.rrset)