- import urllib2, itertools
- imgur = "http://imgur.com/"
- l1 = ['b','B','8']
- l2 = ['o','O','0']
- l3 = ['o','O','0']
- l4 = ['b','B','8']
- l5 = ['s','S','5']
- for name in itertools.product(l1,l2,l3,l4,l5): #Iterates through combinations
- name = ''.join(name) # Converts from list to string
- try:
- urllib2.urlopen( urllib2.Request( imgur+name ) ) #Tests the page
- print imgur+name #print url
- except:
- pass #Page did not exist