1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Accidentaly published a revoked api key

This commit is contained in:
Steffo 2016-08-13 16:27:27 +02:00 committed by GitHub
parent d0c41a7661
commit f2f3f449bd

View file

@ -1,27 +0,0 @@
import requests
import json
file = open("db.json")
db = json.load(file)
file.close()
namelist = ["Cosimo03", "fedececco", "Il Gattopardo", "lordlake", "Luzcuzz", "MRdima98", "RYGFrankez",
"Sensei the great", "UnsavouryComb2"]
for player in namelist:
r = requests.get("https://euw.api.pvp.net/api/lol/euw/v1.4/summoner/by-name/"
"{player}?api_key=d2e4cf8f-9a6d-4ce1-8eeb-6342c19f1ae4".format(player=player))
r = r.json()[player.lower().replace(" ", "")]
lolid = r["id"]
print(str(lolid) + " | " + r["name"])
discordid = str(input())
db[discordid] = dict()
db[discordid]["league"] = dict()
db[discordid]["league"]["summonerid"] = lolid
db[discordid]["league"]["region"] = "euw"
db[discordid]["league"]["tier"] = -1
db[discordid]["league"]["division"] = -1
file = open("db.json", "w")
json.dump(db, file)
file.close()