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

This commit is contained in:
Ashley Graves 2024-08-01 01:24:29 +02:00
parent 383028fcca
commit 23b7fcfb42

View file

@ -28,7 +28,12 @@ for mod in glob.glob("pack/mods/*.toml"):
moddata["url"] = "https://modrinth.com/mod/" + id moddata["url"] = "https://modrinth.com/mod/" + id
moddata["site"] = "Modrinth" moddata["site"] = "Modrinth"
data = requests.get("https://api.modrinth.com/v2/project/" + id).json() if moddata["name"] in cache:
data = cache[moddata["name"]]
else:
data = requests.get("https://api.modrinth.com/v2/project/" + id).json()["license"]
with open("licenses.json") as f:
f.write(json.dumps(data))
elif "curseforge" in data["update"]: elif "curseforge" in data["update"]:
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"]) moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
moddata["site"] = "CurseForge" moddata["site"] = "CurseForge"