From 8ab4c67443f2d1e9a47c89330b27aa31f54931ce Mon Sep 17 00:00:00 2001 From: Relakkes Date: Sat, 16 Nov 2024 00:37:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8A=96=E9=9F=B3=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E7=82=B9=E8=B5=9E=E6=95=B0=E9=87=8F=20#495?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema/tables.sql | 4 ++++ store/douyin/__init__.py | 1 + 2 files changed, 5 insertions(+) diff --git a/schema/tables.sql b/schema/tables.sql index 33e02d3..46e14a2 100644 --- a/schema/tables.sql +++ b/schema/tables.sql @@ -531,3 +531,7 @@ CREATE TABLE `zhihu_creator` ( PRIMARY KEY (`id`), UNIQUE KEY `idx_zhihu_creator_user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='知乎创作者'; + + +-- add column `like_count` to douyin_aweme_comment +alter table douyin_aweme_comment add column `like_count` varchar(255) NOT NULL DEFAULT '0' COMMENT '点赞数'; \ No newline at end of file diff --git a/store/douyin/__init__.py b/store/douyin/__init__.py index b0ea2a1..8e83981 100644 --- a/store/douyin/__init__.py +++ b/store/douyin/__init__.py @@ -100,6 +100,7 @@ async def update_dy_aweme_comment(aweme_id: str, comment_item: Dict): "nickname": user_info.get("nickname"), "avatar": avatar_info.get("url_list", [""])[0], "sub_comment_count": str(comment_item.get("reply_comment_total", 0)), + "like_count": comment_item.get("digg_count") if comment_item.get("digg_count") else 0, "last_modify_ts": utils.get_current_timestamp(), "parent_comment_id": parent_comment_id }