Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib.request
- import itertools
- from urllib.request import Request, urlopen
- class AppURLopener(urllib.request.FancyURLopener):
- version = "Mozilla/6.0"
- opener = AppURLopener()
- def parse_images(source):
- links=[]
- t=str(source).split('<meta name="twitter:image:src" content="')
- for i in t:
- r=str(i).split('"')
- links.append(r[0])
- return links
- def download(links,name):
- for i in links:
- try:
- v=opener.open(i)
- f=open(''.join(name)+".png","wb")
- f.write(v.read())
- f.close()
- name+=1
- except:pass
- def load_source(website):
- s=opener.open(website)
- v=s.read()
- return v
- def main():
- init = input("start:")
- for f in itertools.combinations_with_replacement('qwertyuiopasdfghjklzxcvbnm1234567890', 6-len(init)):
- source=load_source("http://prnt.sc/"+str(init)+''.join(f))
- print("http://prnt.sc/"+str(init)+''.join(f))
- links=parse_images(source)
- download(links,str(init)+''.join(f))
- print("end")
- main()
Add Comment
Please, Sign In to add comment