PyDNS & DNS timeout error
问题 Per validate_email 1.3 : Python Package Index, in order to check the domain mx and verify email exits, I must have the pyDNS package installed. How do I set my own name service (DNS) instead of system one as I'm getting timeout otherwise... 回答1: Here is how you would set your DNS server to, for example, Google's public DNS server: from validate_email import validate_email import DNS DNS.defaults['server']=['8.8.8.8', '8.8.4.4'] print validate_email('rob@example.com', check_mx=True) 来源: https: