Merge pull request #427 from seek4/main

fix: json内容保存格式优化,支持缩进
This commit is contained in:
程序员阿江-Relakkes 2024-09-04 11:27:18 +08:00 committed by GitHub
commit fd60e0f4a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,7 @@ class XhsJsonStoreImplement(AbstractStore):
save_data.append(save_item) save_data.append(save_item)
async with aiofiles.open(save_file_name, 'w', encoding='utf-8') as file: 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: if config.ENABLE_GET_COMMENTS and config.ENABLE_GET_WORDCLOUD:
try: try: