From aab93dad026491e055e062fa5241c6785305b892 Mon Sep 17 00:00:00 2001 From: AINDUSTRIES Date: Thu, 3 Sep 2026 02:36:35 +0200 Subject: [PATCH] Agents image download --- images.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 images.py diff --git a/images.py b/images.py new file mode 100644 index 0000000..6ff04e4 --- /dev/null +++ b/images.py @@ -0,0 +1,46 @@ +import json, requests, os + +os.mkdir("skins") + +with open("skins.json", "r") as f: + content = json.load(f) + +for skin in content: + url = skin["image"] + weapon = skin["weapon"]["id"] + paint_index = skin["paint_index"] + + if "sfui_wpnhud" in weapon: + continue + + content = requests.get(url).content + + with open(f"skins/{weapon}_{paint_index}.png", "wb") as f: + f.write(content) + +with open("base_weapons.json", "r") as f: + content = json.load(f) + +for skin in content: + url = skin["image"] + weapon = skin["id"].replace("base_weapon-", "") + + if "sfui_wpnhud" in weapon: + continue + + content = requests.get(url).content + + with open(f"skins/{weapon}_0.png", "wb") as f: + f.write(content) + +with open("agents.json", "r") as f: + content = json.load(f) + +for skin in content: + url = skin["image"] + weapon = skin["id"] + + content = requests.get(url).content + + with open(f"skins/{weapon}_0.png", "wb") as f: + f.write(content) \ No newline at end of file