Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup as BS
- import string
- import random
- from contextlib import suppress
- import ctypes
- name = ""
- urlcislo = 16
- bad = 0
- good = 0
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 OPR/63.0.3368.71'
- }
- def randomString(stringLength=2):
- letters = string.ascii_lowercase
- return ''.join(random.choice(letters) for i in range(stringLength))
- while True:
- try:
- with requests.Session() as s:
- url = 'https://prnt.sc/' + randomString() + str(random.randint(100,999))
- r = s.get(url, headers=headers)
- soup = BS(r.content, 'html.parser')
- img_url = soup.find('img', {'id': 'screenshot-image'})['src']
- lmao = len(url) - 16
- for i in range(lmao):
- name = name + url[urlcislo]
- urlcislo = urlcislo + 1
- urlcislo = 16
- r = s.get(img_url, headers=headers)
- with open("screen/" + name + ".png", "wb") as f:
- f.write(r.content)
- print(name + " is working! 1")
- good +=1
- ctypes.windll.kernel32.SetConsoleTitleW("Good: " + str(good) + " Bad: " + str(bad) + " | By: noskin9782")
- name = ""
- except Exception:
- print(name + " failed :( 0")
- bad +=1
- ctypes.windll.kernel32.SetConsoleTitleW("Good: " + str(good) + " Bad: " + str(bad) + " | By: noskin9782")
- name = ""
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement