fix: json内容保存格式优化,支持缩进

This commit is contained in:
tooyang 2024-09-04 11:24:12 +08:00
parent dad20baade
commit 0c1adb75fe

View File

@ -205,7 +205,7 @@ class XhsJsonStoreImplement(AbstractStore):
save_data.append(save_item)
async with aiofiles.open(save_file_name, 'w', encoding='utf-8') as file:
await file.write(json.dumps(save_data, ensure_ascii=False))
await file.write(json.dumps(save_data, ensure_ascii=False, indent=4))
if config.ENABLE_GET_COMMENTS and config.ENABLE_GET_WORDCLOUD:
try: