feat: 增加搜索词来源渠道

This commit is contained in:
Relakkes
2024-08-23 08:29:24 +08:00
parent d3c5111985
commit c70bd9e071
15 changed files with 37 additions and 8 deletions

View File

@@ -5,6 +5,7 @@
from typing import List
import config
from var import source_keyword_var
from . import xhs_store_impl
from .xhs_store_image import *
@@ -78,6 +79,7 @@ async def update_xhs_note(note_item: Dict):
"tag_list": ','.join([tag.get('name', '') for tag in tag_list if tag.get('type') == 'topic']),
"last_modify_ts": utils.get_current_timestamp(),
"note_url": f"https://www.xiaohongshu.com/explore/{note_id}?xsec_token={note_item.get('xsec_token')}&xsec_source=pc_search",
"source_keyword": source_keyword_var.get(),
}
utils.logger.info(f"[store.xhs.update_xhs_note] xhs note: {local_db_item}")
await XhsStoreFactory.create_store().store_content(local_db_item)