Skip to content

Instantly share code, notes, and snippets.

@adeolonoh
Last active December 11, 2015 02:54
Show Gist options
  • Save adeolonoh/8156f072338b25117b69 to your computer and use it in GitHub Desktop.
Save adeolonoh/8156f072338b25117b69 to your computer and use it in GitHub Desktop.
'''
This script downloads the latest list of domains available
for backorder at https://www.pool.com/viewlist.aspx and
checks for really short domains or dictionary words.
More info at https://jell.com/blog/how-the-wrong-name-cost-our-startup/
'''
import io
import requests
import zipfile
domain_zip_url = 'https://www.pool.com/Downloads/PoolDeletingDomainsList.zip'
domain_file = 'PoolDeletingDomainsList.txt'
dictionary_file = '/usr/share/dict/words'
# Grab the zip file and iterate over the domains
domains = []
request = requests.get(domain_zip_url)
with zipfile.ZipFile(io.BytesIO(request.content)) as z:
with z.open(domain_file) as f:
for line in f:
# Get the domain name
domain = line.split(',', 1)[0].lower()
# Only look at .com domains
if not domain.endswith('.com'):
continue
# Get the word in the domain
word = domain.split('.', 1)[0]
# Only look at reasonable length words
if len(word) > 8:
continue
# Throw away some common prefixes and suffixes
if word.startswith(('get', 'try', 'use')) or word.endswith(('app', 'hq')):
continue
# Match any short domains, regardless of dictionary
if len(word) <= 4:
print word
else:
domains.append(word)
# Iterate over the dictionary looking for good matches
with open(dictionary_file) as f:
for line in f:
word = line.rstrip().lower()
if word in domains:
print word
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment