wynnbuilder-forked-for-changes/recipes.py

33 lines
19 KiB
Python
Raw Normal View History

2021-01-19 17:32:27 +00:00
import requests
import json
import time
'''
response = requests.get("https://api.wynncraft.com/v2/recipe/list")
with open("mats.json", "w") as outfile:
outfile.write(json.dumps(response.json()))'''
recipes = ["Boots-3-5", "Boots-5-7", "Bow-1-3", "Boots-7-9", "Bow-3-5", "Bow-5-7", "Bow-7-9", "Bracelet-3-5", "Bracelet-5-7", "Bracelet-1-3", "Chestplate-1-3", "Chestplate-3-5", "Chestplate-7-9", "Chestplate-5-7", "Dagger-1-3", "Dagger-3-5", "Dagger-5-7", "Bracelet-7-9", "Dagger-7-9", "Food-3-5", "Food-1-3", "Food-5-7", "Food-7-9", "Helmet-1-3", "Helmet-3-5", "Helmet-7-9", "Helmet-5-7", "Necklace-3-5", "Necklace-1-3", "Necklace-7-9", "Necklace-5-7", "Pants-1-3", "Pants-3-5", "Pants-5-7", "Pants-7-9", "Potion-1-3", "Potion-3-5", "Potion-5-7", "Relik-1-3", "Potion-7-9", "Relik-5-7", "Relik-3-5", "Relik-7-9", "Boots-1-3", "Ring-3-5", "Ring-5-7", "Ring-7-9", "Scroll-1-3", "Scroll-3-5", "Scroll-5-7", "Scroll-7-9", "Spear-1-3", "Spear-3-5", "Spear-5-7", "Spear-7-9", "Wand-1-3", "Wand-3-5", "Wand-5-7", "Wand-7-9", "Boots-10-13", "Boots-13-15", "Boots-15-17", "Boots-17-19", "Bow-10-13", "Bow-13-15", "Bracelet-10-13", "Bracelet-13-15", "Bracelet-15-17", "Bow-17-19", "Bracelet-17-19", "Chestplate-10-13", "Chestplate-13-15", "Chestplate-15-17", "Bow-15-17", "Dagger-10-13", "Dagger-13-15", "Chestplate-17-19", "Dagger-17-19", "Food-13-15", "Food-15-17", "Food-10-13", "Food-17-19", "Helmet-10-13", "Helmet-13-15", "Helmet-15-17", "Helmet-17-19", "Necklace-10-13", "Dagger-15-17", "Necklace-15-17", "Necklace-17-19", "Pants-10-13", "Pants-13-15", "Pants-15-17", "Pants-17-19", "Potion-10-13", "Potion-13-15", "Potion-15-17", "Relik-10-13", "Relik-13-15", "Relik-15-17", "Relik-17-19", "Ring-10-13", "Ring-13-15", "Ring-15-17", "Ring-17-19", "Scroll-10-13", "Potion-17-19", "Scroll-13-15", "Scroll-15-17", "Spear-10-13", "Scroll-17-19", "Spear-13-15", "Spear-15-17", "Spear-17-19", "Wand-10-13", "Wand-13-15", "Wand-15-17", "Wand-17-19", "Boots-20-23", "Boots-23-25", "Boots-25-27", "Bow-23-25", "Bow-20-23", "Boots-27-29", "Bow-25-27", "Bow-27-29", "Bracelet-20-23", "Bracelet-23-25", "Bracelet-25-27", "Bracelet-27-29", "Chestplate-23-25", "Chestplate-25-27", "Chestplate-20-23", "Chestplate-27-29", "Dagger-20-23", "Dagger-23-25", "Dagger-25-27", "Dagger-27-29", "Food-20-23", "Food-25-27", "Food-27-29", "Helmet-20-23", "Food-23-25", "Helmet-23-25", "Helmet-27-29", "Helmet-25-27", "Necklace-20-23", "Necklace-23-25", "Necklace-27-29", "Pants-20-23", "Necklace-25-27", "Pants-23-25", "Pants-25-27", "Pants-27-29", "Potion-20-23", "Potion-23-25", "Potion-27-29", "Potion-25-27", "Relik-20-23", "Relik-23-25", "Relik-25-27", "Relik-27-29", "Ring-20-23", "Ring-23-25", "Ring-25-27", "Ring-27-29", "Scroll-20-23", "Scroll-23-25", "Scroll-25-27", "Scroll-27-29", "Spear-20-23", "Spear-23-25", "Spear-25-27", "Spear-27-29", "Wand-20-23", "Wand-23-25", "Wand-25-27", "Wand-27-29", "Boots-30-33", "Boots-33-35", "Boots-35-37", "Boots-37-39", "Bow-30-33", "Bow-33-35", "Bow-35-37", "Necklace-13-15", "Bow-37-39", "Bracelet-30-33", "Bracelet-33-35", "Bracelet-35-37", "Bracelet-37-39", "Chestplate-30-33", "Chestplate-35-37", "Chestplate-33-35", "Dagger-30-33", "Chestplate-37-39", "Dagger-35-37", "Dagger-37-39", "Food-30-33", "Dagger-33-35", "Food-33-35", "Food-35-37", "Food-37-39", "Helmet-30-33", "Helmet-33-35", "Helmet-35-37", "Helmet-37-39", "Necklace-30-33", "Necklace-33-35", "Necklace-35-37", "Necklace-37-39", "Pants-33-35", "Pants-30-33", "Pants-35-37", "Pants-37-39", "Potion-30-33", "Potion-33-35", "Potion-35-37", "Potion-37-39", "Relik-30-33", "Relik-33-35", "Relik-35-37", "Ring-30-33", "Relik-37-39", "Ring-33-35", "Ring-35-37", "Ring-37-39", "Scroll-30-33", "Scroll-33-35", "Scroll-35-37", "Scroll-37-39", "Spear-30-33", "Spear-33-35", "Spear-35-37", "Spear-37-39", "Wand-30-33", "Wand-33-35", "Wand-35-37", "Boots-40-43", "Wand-37-39", "Boots-45-47", "Boots-47-49", "Boots-43-45", "Bow-40-43", "Bow-47-49", "Bow-43-45", "Bracelet-40-43", "Bow-45-47", "Bracelet-45-47", "Bracelet-47-49", "Chestplate-43-45", "Bracelet-43-45", "Chestplate-40-43", "Chestplate-45-47", "Dagger-40-43", "Chestplate-47-49", "Dagger-43-45", "Dagger-47-49", "Dagger-45-47", "Food-40-43", "Food-43-45", "Food-45-47", "Food-47-49", "Helmet-40-43", "Helmet-43-45", "Helmet-45-47", "Necklace-40-43", "Neckl
#recipes = ["Boots-3-5", "Boots-5-7", "Bow-1-3", "Boots-7-9", "Bow-3-5", "Bow-5-7", "Bow-7-9", "Bracelet-3-5", "Bracelet-5-7", "Bracelet-1-3", "Chestplate-1-3", "Chestplate-3-5", "Chestplate-7-9", "Chestplate-5-7", "Dagger-1-3", "Dagger-3-5", "Dagger-5-7", "Bracelet-7-9", "Dagger-7-9", "Food-3-5", "Food-1-3", "Food-5-7", "Food-7-9", "Helmet-1-3", "Helmet-3-5", "Helmet-7-9", "Helmet-5-7", "Necklace-3-5", "Necklace-1-3", "Necklace-7-9", "Necklace-5-7", "Pants-1-3", "Pants-3-5", "Pants-5-7", "Pants-7-9", "Potion-1-3", "Potion-3-5", "Potion-5-7", "Relik-1-3", "Potion-7-9", "Relik-5-7", "Relik-3-5", "Relik-7-9", "Boots-1-3", "Ring-3-5", "Ring-5-7", "Ring-7-9", "Scroll-1-3", "Scroll-3-5", "Scroll-5-7", "Scroll-7-9", "Spear-1-3", "Spear-3-5", "Spear-5-7", "Spear-7-9", "Wand-1-3", "Wand-3-5", "Wand-5-7", "Wand-7-9", "Boots-10-13", "Boots-13-15", "Boots-15-17", "Boots-17-19", "Bow-10-13", "Bow-13-15", "Bracelet-10-13", "Bracelet-13-15", "Bracelet-15-17", "Bow-17-19", "Bracelet-17-19", "Chestplate-10-13", "Chestplate-13-15", "Chestplate-15-17", "Bow-15-17", "Dagger-10-13", "Dagger-13-15", "Chestplate-17-19", "Dagger-17-19", "Food-13-15", "Food-15-17", "Food-10-13", "Food-17-19", "Helmet-10-13", "Helmet-13-15", "Helmet-15-17", "Helmet-17-19", "Necklace-10-13", "Dagger-15-17", "Necklace-15-17", "Necklace-17-19", "Pants-10-13", "Pants-13-15", "Pants-15-17", "Pants-17-19", "Potion-10-13", "Potion-13-15", "Potion-15-17", "Relik-10-13", "Relik-13-15", "Relik-15-17", "Relik-17-19", "Ring-10-13", "Ring-13-15", "Ring-15-17", "Ring-17-19", "Scroll-10-13", "Potion-17-19", "Scroll-13-15", "Scroll-15-17", "Spear-10-13", "Scroll-17-19", "Spear-13-15", "Spear-15-17", "Spear-17-19", "Wand-10-13", "Wand-13-15", "Wand-15-17", "Wand-17-19", "Boots-20-23", "Boots-23-25", "Boots-25-27", "Bow-23-25", "Bow-20-23", "Boots-27-29", "Bow-25-27", "Bow-27-29", "Bracelet-20-23", "Bracelet-23-25", "Bracelet-25-27", "Bracelet-27-29", "Chestplate-23-25", "Chestplate-25-27", "Chestplate-20-23", "Chestplate-27-29", "Dagger-20-23", "Dagger-23-25", "Dagger-25-27", "Dagger-27-29", "Food-20-23", "Food-25-27", "Food-27-29", "Helmet-20-23", "Food-23-25", "Helmet-23-25", "Helmet-27-29", "Helmet-25-27", "Necklace-20-23", "Necklace-23-25", "Necklace-27-29", "Pants-20-23", "Necklace-25-27", "Pants-23-25", "Pants-25-27", "Pants-27-29", "Potion-20-23", "Potion-23-25", "Potion-27-29", "Potion-25-27", "Relik-20-23", "Relik-23-25", "Relik-25-27", "Relik-27-29", "Ring-20-23", "Ring-23-25", "Ring-25-27", "Ring-27-29", "Scroll-20-23", "Scroll-23-25", "Scroll-25-27", "Scroll-27-29", "Spear-20-23", "Spear-23-25", "Spear-25-27", "Spear-27-29", "Wand-20-23", "Wand-23-25", "Wand-25-27", "Wand-27-29", "Boots-30-33", "Boots-33-35", "Dagger-33-35", "Food-33-35", "Food-35-37", "Food-37-39", "Helmet-30-33", "Helmet-33-35", "Helmet-35-37", "Helmet-37-39", "Necklace-30-33", "Necklace-33-35", "Necklace-35-37", "Necklace-37-39", "Pants-33-35", "Pants-30-33", "Pants-35-37", "Pants-37-39", "Potion-30-33", "Potion-33-35", "Potion-35-37", "Potion-37-39", "Relik-30-33", "Relik-33-35", "Relik-35-37", "Ring-30-33", "Relik-37-39", "Ring-33-35", "Ring-35-37", "Ring-37-39", "Scroll-30-33", "Scroll-33-35", "Scroll-35-37", "Scroll-37-39", "Spear-30-33", "Spear-33-35", "Spear-35-37", "Spear-37-39", "Wand-30-33", "Wand-33-35", "Wand-35-37", "Boots-40-43", "Wand-37-39", "Boots-45-47", "Boots-47-49", "Boots-43-45", "Bow-40-43", "Bow-47-49", "Bow-43-45", "Bracelet-40-43", "Bow-45-47", "Bracelet-45-47", "Bracelet-47-49", "Chestplate-43-45", "Bracelet-43-45", "Chestplate-40-43", "Chestplate-45-47", "Dagger-40-43", "Chestplate-47-49", "Dagger-43-45", "Dagger-47-49", "Dagger-45-47", "Food-40-43", "Food-43-45", "Food-45-47", "Food-47-49", "Helmet-40-43", "Helmet-43-45", "Helmet-45-47", "Necklace-40-43", "Necklace-43-45", "Necklace-45-47", "Helmet-47-49", "Necklace-47-49", "Pants-40-43", "Pants-43-45", "Pants-45-47", "Pants-47-49", "Potion-43-45", "Potion-45-47", "Relik-40-43", "Potion-47-49", "Potion-40-43", "Relik-45-47", "Ring-40-43", "Relik-43-45", "Ring-45-47", "Relik-47-49", "Ring-43-45", "Ring-47-49", "Scroll-4
arr = []
fail = []
data = []
'''for i in range(330,len(recipes)):
response = requests.get("https://api.wynncraft.com/v2/recipe/get/" + recipes[i])
if("message" in response.json()):
print("failed to get " + recipes[i])
fail.append(recipes[i])
else:
arr.append(response.json())
time.sleep(0.2)
with open("temp.json", "w") as outfile:
json.dump(arr,outfile)'''
with open("mats_clean.json", "w") as outfile:
json.dump(arr,outfile,indent = 2)
with open("mats_compress.json", "w") as outfile:
json.dump(arr,outfile)