-
Notifications
You must be signed in to change notification settings - Fork 0
/
pr0 - Kopie.py
35 lines (28 loc) · 934 Bytes
/
pr0 - Kopie.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
names = ["skylar", "HigPingh", "halftimenerd1", "rothe"]
import sys, json, urllib, re
import urllib.request
import colorama
from colorama import Fore, Back, Style
colorama.init(autoreset=True)
for name in names:
url = f"https://pr0gramm.com/api/profile/info?name={name}"
data = json.load(urllib.request.urlopen(url))
benis = re.sub(r"(?<=.)(?=(?:...)+$)", ".", str(data["user"]["score"]))
upvotes = data["user"]["up"]
downvotes = data["user"]["down"]
uploads = data["uploadCount"]
tags = data["tagCount"]
badges = len(data["badges"])
print(url)
print (Fore.RED + Style.BRIGHT + ">_ ",Fore.RED + Style.BRIGHT + name, Fore.RED + Style.BRIGHT + benis)
print ("---")
print ("+Benis: " +Fore.GREEN+ str(upvotes))
print ("-Benis: " + Fore.RED + str(downvotes))
print ("Uploads: " + str(uploads))
print ("Tags: " + str(tags))
print ("Badges: " + str(badges))
print()
print("+++")
print("+++")
print()
input("lol")