Исправлена кодировка.

This commit is contained in:
none 2024-01-24 16:34:20 +03:00
parent f1dfe1998a
commit dd9f2ebf37

View File

@ -96,4 +96,6 @@ for item in yaml.load(requests.get(RECIPES_URL).content.decode("utf-8"), Loader=
reagents = [Reagent(init_data=content[item]) for item in content if "reactants" in content[item]]
write_db({x.name: x.dict() for x in reagents})
db = {x.name: x.dict() for x in reagents}
with open("db.json", mode="w", encoding="utf-8") as db_file:
json.dump(db, db_file, ensure_ascii=False, indent=2)