Skip to content

Commit b675547

Browse files
authored
Update __init__.py,为bilibili的视频信息、up主信息、评论信息添加额外字段
1 parent ec97001 commit b675547

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

store/bilibili/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ async def update_bilibili_video(video_item: Dict):
5454
"nickname": video_user_info.get("name"),
5555
"avatar": video_user_info.get("face", ""),
5656
"liked_count": str(video_item_stat.get("like", "")),
57+
"disliked_count": str(video_item_stat.get("dislike", "")),
5758
"video_play_count": str(video_item_stat.get("view", "")),
59+
"video_favorite_count": str(video_item_stat.get("favorite", "")),
60+
"video_share_count": str(video_item_stat.get("share", "")),
61+
"video_coin_count": str(video_item_stat.get("coin", "")),
5862
"video_danmaku": str(video_item_stat.get("danmaku", "")),
5963
"video_comment": str(video_item_stat.get("reply", "")),
6064
"last_modify_ts": utils.get_current_timestamp(),
@@ -73,6 +77,8 @@ async def update_up_info(video_item: Dict):
7377
saver_up_info = {
7478
"user_id": str(video_item_card.get("mid")),
7579
"nickname": video_item_card.get("name"),
80+
"sex": video_item_card.get("sex"),
81+
"sign": video_item_card.get("sign"),
7682
"avatar": video_item_card.get("face"),
7783
"last_modify_ts": utils.get_current_timestamp(),
7884
"total_fans": video_item_card.get("fans"),
@@ -105,6 +111,8 @@ async def update_bilibili_video_comment(video_id: str, comment_item: Dict):
105111
"content": content.get("message"),
106112
"user_id": user_info.get("mid"),
107113
"nickname": user_info.get("uname"),
114+
"sex": user_info.get("sex"),
115+
"sign": user_info.get("sign"),
108116
"avatar": user_info.get("avatar"),
109117
"sub_comment_count": str(comment_item.get("rcount", 0)),
110118
"last_modify_ts": utils.get_current_timestamp(),

0 commit comments

Comments
 (0)