test
Some checks failed
Update wiki / test (push) Failing after 47s

This commit is contained in:
Ashley Graves 2024-08-01 01:15:41 +02:00
parent ab73dcbff0
commit 5044cdd17a

View file

@ -18,7 +18,9 @@ for mod in glob.glob("pack/mods/*.toml"):
with open(mod, "r") as f:
data = tomli.load(f)
moddata = dict()
moddata["name"] = data["name"]
moddata["url"] = ""
moddata["side"] = data["side"]
if "modrinth" in data["update"]:
id = data["update"]["modrinth"]["mod-id"]
@ -27,15 +29,12 @@ for mod in glob.glob("pack/mods/*.toml"):
moddata["site"] = "Modrinth"
data = requests.get("https://api.modrinth.com/v2/project/" + id).json()
print(data)
exit
elif "curseforge" in data["update"]:
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
moddata["site"] = "CurseForge"
count[data["side"]] += 1
moddata["side"] = data["side"]
mods[data["name"]] = moddata
count[moddata["side"]] += 1
mods[moddata["name"]] = moddata
with open("wiki/Modlist.md", "w") as f: