Maybe Easy Mojang API Python Wrapper.
(Korean is here)
pip install mojang_python
# import class in module
from mojang_python.info import UserInfo
from mojang_python.optifine import Cape
async def example():
# Get uuid from username
uuid = await UserInfo.get_uuid("Dangk_")
print(f"UUID : {uuid}")
# Get Profile
class_name = UserInfo(uuid)
profile = await class_name.get_account_profile()
print(f'Profile URL : {profile["textures"]["SKIN"]["url"]}')
# Get Cape (with get_account_profile)
optifine_cape = await Cape.get_optifine_cape("Dangk_")
if "CAPE" in profile["textures"]:
cape = profile["textures"]["CAPE"]["url"]
if optifine_cape != None:
print(f"Cape URL : {cape} (Minecraft) / Cape URL : {optifine_cape} (Optifine)\n")
else:
print(f"Cape URL : {cape} (Minecraft)\n")
elif optifine_cape != None:
print(f"Cape URL : {optifine_cape} (Optifine) \n")
else:
print("Cape URL : None\n")
# Run with coroutine
import asyncio
asyncio.run(example())
if you want more information, check this
