from urllib import request from time import sleep from random import randint import string lst = [] cnt = 0 def check(s): global lst, cnt cnt += 1 print(s) if cnt % 10 == 0: print("found: ", *lst) try: obj = request.urlopen('http://dshpr.com/' + s + '.html') lst += [s] return True except Exception: return False st = string.ascii_lowercase for a in st: check(a) for a in st: for b in st: check(a + b) for a in st: for b in st: for c in st: check(a + b + c) for a in st: for b in st: for c in st: for d in st: check(a + b + c + d)