Skip to content

Commit 8ab4c67

Browse files
committed
feat: 抖音支持评论点赞数量 #495
1 parent c12a63a commit 8ab4c67

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

schema/tables.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,3 +531,7 @@ CREATE TABLE `zhihu_creator` (
531531
PRIMARY KEY (`id`),
532532
UNIQUE KEY `idx_zhihu_creator_user_id` (`user_id`)
533533
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='知乎创作者';
534+
535+
536+
-- add column `like_count` to douyin_aweme_comment
537+
alter table douyin_aweme_comment add column `like_count` varchar(255) NOT NULL DEFAULT '0' COMMENT '点赞数';

store/douyin/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ async def update_dy_aweme_comment(aweme_id: str, comment_item: Dict):
100100
"nickname": user_info.get("nickname"),
101101
"avatar": avatar_info.get("url_list", [""])[0],
102102
"sub_comment_count": str(comment_item.get("reply_comment_total", 0)),
103+
"like_count": comment_item.get("digg_count") if comment_item.get("digg_count") else 0,
103104
"last_modify_ts": utils.get_current_timestamp(),
104105
"parent_comment_id": parent_comment_id
105106
}

0 commit comments

Comments
 (0)