Hi to everyone,

I am trying to get the second level domain name from a host name using
the "dns.resolver.zone_for_name" function as it is shown in the
following piece of code, but I am having problems with some TLDs and ccTLDs.

host_name = "www.forsight.com.au"
domain_name = dns.resolver.zone_for_name(host_name,resolver=my_resolver)
print str(domain_name)
com.au. (correct, but I was interested in obtaining "forsight.com.au.")

Is there a better way to do it that will work for all TLDs and ccTLDs?
Thanks in advance.

Cheers,
Marc
_______________________________________________
dnspython-users mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-users

Reply via email to