Closed covuworie closed 4 years ago
The ProxyResolver
uses 8.8.8.8, 8.8.4.4
as its name servers by default.
However the environment you are trying to use does not work with them.
A quick workaround in your case is to use the system nameservers instead:
from async_dns import get_nameservers
resolver = ProxyResolver(proxies=get_nameservers())
Thanks @gera2ld, this seems to have fixed the issue. It's strange as I thought that I had used aiodns
before in that environment with remote nameservers. But I tried that also again and it failed.
I'll probably do some other tests in a docker container or virtual environment on my machine so I don't have this issue again.
A quick question. Are there any plans to return errors when a domain name is not found, or the server fails, or there is a timeout etc.? At the moment None
is returned which doesn't give much information.
Are there any plans to return errors when a domain name is not found, or the server fails, or there is a timeout etc.?
Not yet but perhaps there should be. This project was designed to simply provide a DNS service at the beginning and the APIs are not well designed.
I see what you are saying. However, the design of the API is not actually as as bad as you say. You've done a good job making the API very concise. I've had a lot of experience designing APIs in the past and good APIs are hard to design. The main thing missing is documentation of the methods
, parameters
/ arguments
and responses
.
Possibly the responses could be split out into their own classes. But I think more comprehensive documentation and clear naming would probably make this less essential. It took me a bit of time to work out the responses depending on the name servers I was using (tld
vs authoritative
) and required me to understand quite a bit about the DNS
system.
Hi,
This library seems to have some very good functionality and I am looking into incorporating it into a project of mine. However, I'm struggling to get the example that you have in the
README
to even work:I get a value of
None
returned when I paste the code into the following online REPL: https://repl.it/repls/CoordinatedLameCoinsYou can see the versions of
python
andpypi
libraries being used in thepyproject.toml
. Even when I edit the file to force the use of the latest version (1.0.9
) I get the same result.Also, even if I change the domain name to
google.com
,facebook.com
etc. the sameNone
result is returned.Am I missing something here?