File size: 679 Bytes
04d482b fc31fe4 04d482b 1fa2e03 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import enkacard
import enkacard.encbanner
import enkanetwork
import asyncio
from flask import Flask, jsonify, request
import requests
from io import BytesIO
from enkanetwork import EnkaNetworkAPI
import os
enka_update = EnkaNetworkAPI()
async def update_genshin():
try:
async with enka_update:
await enka_update.update_assets(lang=["EN"], path="/tmp")
print("Finished update")
except Exception as e:
print(f"Update failed: {e}")
data_dir = "/tmp/data"
if not os.path.exists(data_dir):
os.makedirs(data_dir)
data_dir = "/tmp/langs"
if not os.path.exists(data_dir):
os.makedirs(data_dir)
asyncio.run(update_genshin())
|