whois/__init__.py
changeset 14 2bada1724be7
parent 12 c57439b500cb
child 22 1a6c1830d4bc
equal deleted inserted replaced
13:f8d7b881701d 14:2bada1724be7
     8 
     8 
     9 def whois(url):
     9 def whois(url):
    10     # clean domain to expose netloc
    10     # clean domain to expose netloc
    11     domain = extract_domain(url)
    11     domain = extract_domain(url)
    12     try:
    12     try:
    13         raise OSError()
       
    14         # try native whois command first
    13         # try native whois command first
    15         r = subprocess.Popen(['whois', domain], stdout=subprocess.PIPE)
    14         r = subprocess.Popen(['whois', domain], stdout=subprocess.PIPE)
    16         text = r.stdout.read()
    15         text = r.stdout.read()
    17     except OSError:
    16     except OSError:
    18         # try experimental client
    17         # try experimental client