mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-22 17:00:25 +00:00
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@5 e7d03fd6-7b0d-0410-9947-9c21f3af8025
13 lines
448 B
Python
Executable file
13 lines
448 B
Python
Executable file
#!/opt/python/bin/python1.5
|
|
|
|
import DNS
|
|
# automatically load nameserver(s) from /etc/resolv.conf
|
|
# (works on unix - on others, YMMV)
|
|
DNS.ParseResolvConf()
|
|
|
|
# web server reliability, the NT way. *snigger*
|
|
res = r.req('www.microsoft.com',qtype='A')
|
|
# res.answers is a list of dictionaries of answers
|
|
print len(res.answers),'different A records'
|
|
# each of these has an entry for 'data', which is the result.
|
|
print map(lambda x:x['data'], res.answers)
|