parent
383028fcca
commit
23b7fcfb42
1 changed files with 6 additions and 1 deletions
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue