mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-02-19 05:21:24 +08:00
Update __init__.py,为bilibili的视频信息、up主信息、评论信息添加额外字段
This commit is contained in:
@@ -54,7 +54,11 @@ async def update_bilibili_video(video_item: Dict):
|
||||
"nickname": video_user_info.get("name"),
|
||||
"avatar": video_user_info.get("face", ""),
|
||||
"liked_count": str(video_item_stat.get("like", "")),
|
||||
"disliked_count": str(video_item_stat.get("dislike", "")),
|
||||
"video_play_count": str(video_item_stat.get("view", "")),
|
||||
"video_favorite_count": str(video_item_stat.get("favorite", "")),
|
||||
"video_share_count": str(video_item_stat.get("share", "")),
|
||||
"video_coin_count": str(video_item_stat.get("coin", "")),
|
||||
"video_danmaku": str(video_item_stat.get("danmaku", "")),
|
||||
"video_comment": str(video_item_stat.get("reply", "")),
|
||||
"last_modify_ts": utils.get_current_timestamp(),
|
||||
@@ -73,6 +77,8 @@ async def update_up_info(video_item: Dict):
|
||||
saver_up_info = {
|
||||
"user_id": str(video_item_card.get("mid")),
|
||||
"nickname": video_item_card.get("name"),
|
||||
"sex": video_item_card.get("sex"),
|
||||
"sign": video_item_card.get("sign"),
|
||||
"avatar": video_item_card.get("face"),
|
||||
"last_modify_ts": utils.get_current_timestamp(),
|
||||
"total_fans": video_item_card.get("fans"),
|
||||
@@ -105,6 +111,8 @@ async def update_bilibili_video_comment(video_id: str, comment_item: Dict):
|
||||
"content": content.get("message"),
|
||||
"user_id": user_info.get("mid"),
|
||||
"nickname": user_info.get("uname"),
|
||||
"sex": user_info.get("sex"),
|
||||
"sign": user_info.get("sign"),
|
||||
"avatar": user_info.get("avatar"),
|
||||
"sub_comment_count": str(comment_item.get("rcount", 0)),
|
||||
"last_modify_ts": utils.get_current_timestamp(),
|
||||
|
||||
Reference in New Issue
Block a user