DEV Community

Roy
Roy

Posted on

Answer: Set specific DNS server using dns.resolver (pythondns)

You don't specify in your question, but assuming you're using the resolver from dnspython.org, the documentation indicates you want to set the nameservers attribute on the Resolver object.

Though it may be easier to provide an /etc/resolv.conf-style file to pass to the constructor's filename argument.

Oldest comments (0)

Here is a post you might want to check out:

Regex for lazy developers

regex for lazy devs

Sorry for the callout πŸ˜†