refactor: 优化代码

This commit is contained in:
Relakkes
2023-07-29 15:35:40 +08:00
parent febbb133d7
commit 4ff2cf8661
17 changed files with 133 additions and 140 deletions

View File

@@ -1,8 +1,8 @@
import json
from typing import Dict, List
from tortoise.models import Model
from tortoise import fields
from tortoise.models import Model
import config
from tools import utils

View File

@@ -1,7 +1,7 @@
from typing import List, Dict
from typing import Dict, List
from tortoise.models import Model
from tortoise import fields
from tortoise.models import Model
import config
from tools import utils
@@ -65,7 +65,7 @@ async def update_xhs_note(note_item: Dict):
local_db_item = {
"note_id": note_item.get("note_id"),
"type": note_item.get("type"),
"title": note_item.get("title"),
"title": note_item.get("title") or note_item.get("desc", ""),
"desc": note_item.get("desc", ""),
"time": note_item.get("time"),
"last_update_time": note_item.get("last_update_time", 0),