saghul / aiodns

Simple DNS resolver for asyncio

Home Page:https://pypi.python.org/pypi/aiodns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return fully qualified name when querying domain

Piskuliki0723 opened this issue · comments

https://docs.python.org/3.7/library/socket.html#socket.getfqdn

Analog: socket.getfqdn ("google.com")
google.com

Sometimes FQDNs differ from the request.

I could not find this in this library (although this is a standard function).

$ nslookup example.com
Server: 1.1.1.1
Address: 1.1.1.1#53

Non-authoritative answer:
Name: example.com
Address: 93.184.216.34
Name: example.com
Address: 2606:2800:220:1:248:1893:25c8:1946

  1. Please give an example with the '_callback' function
    There is no example in the documentation, I tried it in different ways, errors.

  2. https://pycares.readthedocs.io/en/latest/channel.html#pycares.Channel.getnameinfo
    Err? >>>getnameinfo

c-ares does not implement getfqn and in turn neither does this library, sorry.