Skip to content

Instantly share code, notes, and snippets.

@resure
Created July 8, 2011 14:06
Show Gist options
  • Save resure/1071906 to your computer and use it in GitHub Desktop.
Save resure/1071906 to your computer and use it in GitHub Desktop.
.su check (from habrahabr.ru)
#!/usr/bin/env python
import string
import urllib
l = string.letters[:26] + string.digits
url = 'http://www.reg.ru/newdomain/check_available?domain=%s%s.su'
get = lambda y, x: urllib.urlopen(url % (y, x)).read()
print ' ', ' '.join(l)
for y in l:
print ' '.join([y] + [' ' if 'unavail' in get(y, x) else '+' for x in l] + [y])
print ' ', ' '.join(l)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment