🚑️ Fix namecard parse

This commit is contained in:
xtaodada 2023-04-12 11:23:16 +08:00
parent 2d9e63ff98
commit 154b5fd243
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -65,10 +65,10 @@ async def update_metadata_from_github(overwrite: bool = True):
started = False
cell = []
async for line in response.aiter_lines():
if line == " {\n":
if line == " {\n":
started = True
continue
if line in [" },\n", " }\n"]:
if line in [" },\n", " }\n"]:
started = False
if any("MATERIAL_NAMECARD" in x for x in cell):
material_json_data.append(json.loads("{" + "".join(cell) + "}"))