- import urllib2, itertools
- imgur = "http://imgur.com/"
- g = ['g','G','9','6']
- a = ['a','A','4']
- b = ['b','B','8','6']
- e = ['e','E','3']
- n = ['n','N']
- for name in itertools.product(g,a,b,e,n): #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