On Fri, May 01, 2009 at 07:08:43PM +0100,
Milos Negovanovic <[email protected]> wrote
a message of 16 lines which said:
> Given the domain name what is the easiest way to obtain LOC record type?
% python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import dns.resolver
>>>
>>> answers = dns.resolver.query('www.afnic.fr','LOC')
>>>
>>> print answers[0]
48 47 14.806 N 2 2 46.156 E 25.00m 1.00m 2.00m 2.00m
>>>
This is assuming you know the domain name (and not an IP address) and
that it has a LOC record. Otherwise, the full algorithm of section 5.2
of RFC 1876 is not, to my knowledge, available in Python. You'll have
to write it yourself or to call the C code
<http://www.bortzmeyer.org/query-loc.html>.
_______________________________________________
dnspython-users mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-users