parent
5044cdd17a
commit
8ce95e38a8
1 changed files with 7 additions and 3 deletions
|
@ -29,6 +29,7 @@ for mod in glob.glob("pack/mods/*.toml"):
|
|||
moddata["site"] = "Modrinth"
|
||||
|
||||
data = requests.get("https://api.modrinth.com/v2/project/" + id).json()
|
||||
print("Processed: " + moddata["name"])
|
||||
elif "curseforge" in data["update"]:
|
||||
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
|
||||
moddata["site"] = "CurseForge"
|
||||
|
@ -92,8 +93,11 @@ with open("wiki/Licenses.md", "w") as f:
|
|||
data = mods[mod]
|
||||
f.write("## " + mod + "\r\n")
|
||||
f.write("<b>")
|
||||
if data["license"]["url"] != None:
|
||||
f.write("<a href=\"" + data["license"]["url"] + "\">" + data["license"] + "")
|
||||
if data["license"] != None:
|
||||
if data["license"]["url"] != None:
|
||||
f.write("<a href=\"" + data["license"]["url"] + "\">" + data["license"] + "")
|
||||
else:
|
||||
f.write(data["license"]["name"])
|
||||
else:
|
||||
f.write(data["license"]["name"])
|
||||
f.write("Unknown")
|
||||
f.write("</b>\r\n")
|
||||
|
|
Loading…
Reference in a new issue