secret
Created

  • Download Gist
gistfile1.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
import urllib, urllib2, csv, json
 
_check_domain = "http://ajaxwhois.com/lookup?d="
 
count = 0
 
words = """enter
words
here"""
 
for word in words.splitlines():
# build the url
check_domain = _check_domain
for tld in ['.com', ]: # add .net, .org if you want
check_domain += word + tld + ','
check_domain.rstrip(',')
# get the data
response = urllib2.urlopen(check_domain).read()
data = json.loads(response)
# check and print if available
for domain in data['r']:
print domain['d'] if domain['a'] else ''
count += 1

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.