From 28e8a7cbf0c7cdada610733faa9c0dc89d7a257b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AF=92=E5=BD=A4?= <70561268+cxw620@users.noreply.github.com> Date: Tue, 28 Mar 2023 04:08:46 +0300 Subject: [PATCH 001/159] add: new united playurl grpc interface (#642) --- .../playerunite/pgcanymodel/pgcanymodel.proto | 14 + .../playerunite/ugcanymodel/ugcanymodel.proto | 27 + .../bilibili/app/playerunite/v1/playurl.proto | 45 + .../pgc/gateway/player/v2/playurl.proto | 1568 +++++----- .../bilibili/playershared/playershared.proto | 871 +++--- .../web/interfaces/v1/interfaces.proto | 2550 ++++++++--------- 6 files changed, 2590 insertions(+), 2485 deletions(-) create mode 100644 grpc_api/bilibili/app/playerunite/pgcanymodel/pgcanymodel.proto create mode 100644 grpc_api/bilibili/app/playerunite/ugcanymodel/ugcanymodel.proto create mode 100644 grpc_api/bilibili/app/playerunite/v1/playurl.proto diff --git a/grpc_api/bilibili/app/playerunite/pgcanymodel/pgcanymodel.proto b/grpc_api/bilibili/app/playerunite/pgcanymodel/pgcanymodel.proto new file mode 100644 index 0000000..cb1db04 --- /dev/null +++ b/grpc_api/bilibili/app/playerunite/pgcanymodel/pgcanymodel.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package bilibili.app.playerunite.pgcanymodel; + +import "bilibili/pgc/gateway/player/v2/playurl.proto"; + +message PGCAnyModel { + bilibili.pgc.gateway.player.v2.PlayViewBusinessInfo business = 3; + bilibili.pgc.gateway.player.v2.Event event = 4; + bilibili.pgc.gateway.player.v2.ViewInfo view_info = 5; + bilibili.pgc.gateway.player.v2.PlayAbilityExtConf play_ext_conf = 6; + bilibili.pgc.gateway.player.v2.PlayExtInfo play_ext_info = 7; +} + diff --git a/grpc_api/bilibili/app/playerunite/ugcanymodel/ugcanymodel.proto b/grpc_api/bilibili/app/playerunite/ugcanymodel/ugcanymodel.proto new file mode 100644 index 0000000..c5f0ac0 --- /dev/null +++ b/grpc_api/bilibili/app/playerunite/ugcanymodel/ugcanymodel.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package bilibili.app.playerunite.ugcanymodel; + +message ButtonStyle { + string text = 1; + string text_color = 2; + string bg_color = 3; + string jump_link = 4; +} + +enum PlayLimitCode { + PLC_UNKNOWN = 0; + PLC_NOTPAYED = 1; +} + +message PlayLimit { + PlayLimitCode code = 1; + string message = 2; + string sub_message = 3; + ButtonStyle button = 4; +} + +message UGCAnyModel { + PlayLimit play_limit = 1; +} + diff --git a/grpc_api/bilibili/app/playerunite/v1/playurl.proto b/grpc_api/bilibili/app/playerunite/v1/playurl.proto new file mode 100644 index 0000000..2f381ba --- /dev/null +++ b/grpc_api/bilibili/app/playerunite/v1/playurl.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; + +package bilibili.app.playerunite.v1; + +import "bilibili/playershared/playershared.proto"; + +import "google/protobuf/any.proto"; + +// 统一视频url +service Player { + // 视频地址 + rpc PlayViewUnite (PlayViewUniteReq) returns (PlayViewUniteReply); +} + +// +message PlayViewUniteReq { + // 请求资源VOD信息 + bilibili.playershared.VideoVod vod = 1; + // + string spmid = 2; + // + string from_spmid = 3; + // 补充信息, 如ep_id等 + map extra_content = 4; +} + +// +message PlayViewUniteReply { + // 音视频流信息 + bilibili.playershared.VodInfo vod_info = 1; + // + bilibili.playershared.PlayArcConf play_arc_conf = 2; + // + bilibili.playershared.PlayDeviceConf play_device_conf = 3; + // + bilibili.playershared.Event event = 4; + // 使用 pgcanymodel / ugcanymodel 进行proto any转换成对应业务码结构体 + google.protobuf.Any supplement = 5; + // + bilibili.playershared.PlayArc play_arc = 6; + // + bilibili.playershared.QnTrialInfo qn_trial_info = 7; + // + bilibili.playershared.History history = 8; +} diff --git a/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto b/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto index 6a1d1e4..c238880 100644 --- a/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto +++ b/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto @@ -1,785 +1,785 @@ -syntax = "proto3"; - -package bilibili.pgc.gateway.player.v2; - -import "google/protobuf/timestamp.proto"; - -// 视频url -service PlayURL { - // 播放页信息 - rpc PlayView (PlayViewReq) returns (PlayViewReply); - // - rpc PlayViewComic(PlayViewReq) returns (PlayViewReply); -} - -// 角标信息 -message BadgeInfo { - // 角标文案 - string text = 1; - // 角标色值 - string bg_color = 2; - // 角标色值-夜间模式 - string bg_color_night = 3; - // 文案色值 - string text_color = 4; - // ? 新版本客户端已弃用此项 - GradientColor bg_gradient_color = 5; -} - -// Dialog组件: 底部显示 -message BottomDisplay { - // 文案 - TextInfo title = 1; - // 图标 - string icon = 2; -} - -// 按钮信息 -message ButtonInfo { - // 按钮文案 - string text = 1; - // 按钮字体色值 - string text_color = 2; - // 按钮字体色值-夜间模式 - string text_color_night = 3; - // 按钮背景色 - string bg_color = 4; - // 按钮背景色-夜间模式 - string bg_color_night = 5; - // 按钮链接 - string link = 6; - // 按钮动作类型 - string action_type = 7; - // 角标信息 - BadgeInfo badge_info = 8; - // 埋点上报信息 - Report report = 9; - // 左侧删除线样式文案 - string left_strikethrough_text = 10; - // 缩略按钮文案信息 - TextInfo simple_text_info = 11; - // 缩略按钮背景色值 - string simple_bg_color = 12; - // 缩略按钮字体色值-夜间模式 - string simple_bg_color_night = 13; - // - GradientColor bg_gradient_color = 14; - // - map order_report_params = 15; -} - -// 投屏限制. code = 0 时为无限制, 否则表示不不允许投屏并提示message -message CastTips { - // - int32 code = 1; - // - string message = 2; -} - -// 跳过片头/片尾配置 -message ClipInfo { - // - int64 material_no = 1; - // DASH分段始 - int32 start = 2; - // DASH分段终 - int32 end = 3; - // Clip类型 - ClipType clip_type = 4; - // 跳过片头/片尾时的提示语 - string toast_text = 5; - // - MultiView multi_view = 6; -} - -// 跳过片头/片尾配置: Clip类型 -enum ClipType { - NT_UNKNOWN = 0; // - CLIP_TYPE_OP = 1; // 跳过OP - CLIP_TYPE_ED = 2; // 跳过ED - CLIP_TYPE_HE = 3; // - CLIP_TYPE_MULTI_VIEW = 4; // -} - -// 编码类型 -enum CodeType { - NOCODE = 0; // 默认 - CODE264 = 1; // H.264 - CODE265 = 2; // H.265 -} - -// -message ContinuePlayInfo { - // - int64 continue_play_ep_id = 1; -} - -// 优惠券 -message Coupon { - // 优惠券token - string coupon_token = 1; - // 优惠券类型 - // 1:折扣券 2:满减券 3:兑换券 - int64 type = 2; - // 优惠券面值 - string value = 3; - // 优惠券使用描述 - string use_desc = 4; - // 优惠券标题 - string title = 5; - // 优惠券描述 - string desc = 6; - // 优惠券支付按钮文案 - string pay_button_text = 7; - // 优惠券支付按钮删除线文案 - string pay_button_text_line_through = 8; - // 实付金额 - string real_amount = 9; - // 使用过期时间 - google.protobuf.Timestamp expire_time = 10; -} - -// 优惠券信息 -message CouponInfo { - // 提示框信息 - CouponToast toast = 1; - // 弹窗信息 - PopWin pop_win = 2; -} - -// 优惠券提示框文案信息 -message CouponTextInfo { - // 提示框文案-播正片6分钟预览 - string positive_preview = 1; - // 提示框文案-播非正片分节ep - string section = 2; -} - -// 优惠券提示框信息 -message CouponToast { - // 提示框文案信息 - CouponTextInfo text_info = 1; - // 提示框按钮 - ButtonInfo button = 2; -} - -// dash条目 -message DashItem { - // 清晰度 - uint32 id = 1; - // 主线流 - string base_url = 2; - // 备用流 - repeated string backup_url = 3; - // 带宽 - uint32 bandwidth = 4; - // 编码id - uint32 codecid = 5; - // md5 - string md5 = 6; - // 视频大小 - uint64 size = 7; - // 帧率 - string frame_rate = 8; -} - -// dash视频流 -message DashVideo { - // 主线流 - string base_url = 1; - // 备用流 - repeated string backup_url = 2; - // 带宽 - uint32 bandwidth = 3; - // 编码id - uint32 codecid = 4; - // md5 - string md5 = 5; - // 大小 - uint64 size = 6; - // 伴音质量id - uint32 audio_id = 7; - // 是否非全二压 - bool no_rexcode = 8; - // 帧率 - string frame_rate = 9; - // 宽 - int32 width = 10; - // 高 - int32 height = 11; -} - -// 鉴权浮层 -message Dialog { - // 鉴权限制码 - int64 code = 1; - // 鉴权限制信息 - string msg = 2; - // 浮层类型 - string type = 3; - // 浮层样式类型 - string style_type = 4; - // 浮层配置 - DialogConfig config = 5; - // 标题 - TextInfo title = 6; - // 副标题 - TextInfo subtitle = 7; - // 图片信息 - ImageInfo image = 8; - // 按钮列表 - repeated ButtonInfo button = 9; - // 底部描述 - ButtonInfo bottom_desc = 10; - // 埋点上报信息 - Report report = 11; - // 倒计时 秒 - int32 count_down_sec = 12; - // 右下描述 - TextInfo right_bottom_desc = 13; - // - repeated BottomDisplay bottom_display = 14; -} - -// 鉴权浮层配置 -message DialogConfig { - // 是否显示高斯模糊背景图 - bool is_show_cover = 1; - // 是否响应转屏 - bool is_orientation_enable = 2; - // 是否响应上滑吸顶 - bool is_nested_scroll_enable = 3; - // 是否强制竖屏 - bool is_force_halfscreen_enable = 4; -} - -// 当前分辨率信息 -message Dimension { - // 宽 - int32 width = 1; - // 长 - int32 height = 2; - // 旋转角度 - int32 rotate = 3; -} - -// 杜比音频信息 -message DolbyItem { - // 杜比类型 - enum Type { - NONE = 0; // NONE - COMMON = 1; // 普通杜比音效 - ATMOS = 2; // 全景杜比音效 - } - // 杜比类型 - Type type = 1; - // 音频流 - DashItem audio = 2; -} - -// DRM技术类型 -enum DrmTechType { - NON = 0; // - FAIR_PLAY = 1; // -} - -// 播放结束页 -message EndPage { - // 鉴权浮层 - Dialog dialog = 1; - // 播放完后是否隐藏end_page - bool hide = 2; -} - -// 事件 -message Event { - // 震动 - Shake shake = 1; -} - -// ? 放映室提示语 -message FreyaConfig { - // - string desc = 1; - // - int32 type = 2; - // - int32 issued_cnt = 3; - // - bool is_always_show = 4; - // - int32 screen_number = 5; - // - int32 full_screen_number = 6; -} - -// 渐变色信息 -message GradientColor { - // - string start_color = 1; - // - string end_color = 2; -} - -// 高画质试看信息 -message HighDefinitionTrialInfo { - // - bool trial_able = 1; - // - int32 remaining_times = 2; - // - int32 start = 3; - // - int32 time_length = 4; - // - Toast start_toast = 5; - // - Toast end_toast = 6; - // - Report report = 7; - // - ButtonInfo quality_open_tip_btn = 8; - // - ButtonInfo no_longer_trial_btn = 9; -} - -// 图片信息 -message ImageInfo { - // 图片链接 - string url = 1; -} - -// -enum InlineScene { - UNKNOWN = 0; // - RELATED_EP = 1; // - HE = 2; // - SKIP = 3; // -} - -// -enum InlineType { - TYPE_UNKNOWN = 0; // - TYPE_WHOLE = 1; // - TYPE_HE_CLIP = 2; // - TYPE_PREVIEW = 3; // -} - -// -message MultiView { - // - string button_material = 1; - // - int64 ep_id = 2; - // - int64 cid = 3; - // - int64 avid = 4; -} - -// 大会员广告: 支付提示信息 -message PayTip { - // - string title = 1; - // - string url = 2; - // - string icon = 3; - // - int32 type = 4; - // - int32 show_type = 5; - // - string img = 6; - // - string bg_day_color = 7; - // - string bg_night_color = 8; - // - string bg_line_color = 9; - // - string bg_night_line_color = 10; - // - string text_color = 11; - // - string text_night_color = 12; - // - int64 view_start_time = 13; - // - repeated ButtonInfo button = 14; - // - int32 url_open_type = 15; - // - Report report = 16; - // - int32 angle_style = 17; - // - int32 report_type = 18; - // - map order_report_params = 19; -} - -// 禁用功能配置 -message PlayAbilityConf { - bool background_play_disable = 1; // 后台播放 - bool flip_disable = 2; // 镜像反转 - bool cast_disable = 3; // 投屏 - bool feedback_disable = 4; // 反馈 - bool subtitle_disable = 5; // 字幕 - bool playback_rate_disable = 6; // 播放速度 - bool time_up_disable = 7; // 定时停止 - bool playback_mode_disable = 8; // 播放方式 - bool scale_mode_disable = 9; // 画面尺寸 - bool like_disable = 10; // 赞 - bool dislike_disable = 11; // 踩 - bool coin_disable = 12; // 投币 - bool elec_disable = 13; // 充电 - bool share_disable = 14; // 分享 - bool screen_shot_disable = 15; // 截图 - bool lock_screen_disable = 16; // 锁定 - bool recommend_disable = 17; // 相关推荐 - bool playback_speed_disable = 18; // 播放速度 - bool definition_disable = 19; // 清晰度 - bool selections_disable = 20; // 选集 - bool next_disable = 21; // 下一集 - bool edit_dm_disable = 22; // 编辑弹幕 - bool small_window_disable = 23; // 小窗 - bool shake_disable = 24; // 震动 - bool outer_dm_disable = 25; // 外层面板弹幕设置 - bool inner_dm_disable = 26; // 三点内弹幕设置 - bool freya_enter_disable = 27; // 一起看入口 - bool dolby_disable = 28; // 杜比音效 - bool freya_full_disable = 29; // 全屏一起看入口 - bool skip_oped_switch_disable = 30; // - bool record_screen_disable = 31; // - bool color_optimize_disable = 32; // -} - -// 云控扩展配置信息 -message PlayAbilityExtConf { - // 自定义配置扩展信息 - bool allow_close_subtitle = 1; - // - FreyaConfig freya_config = 2; - // - CastTips cast_tips = 3; -} - -// 错误码 -enum PlayErr { - NoErr = 0; // - WithMultiDeviceLoginErr = 1; // 管控类型的错误码 -} - -// 其他业务信息 -message PlayViewBusinessInfo { - // 当前视频是否是预览 - bool is_preview = 1; - // 用户是否承包过 - bool bp = 2; - // drm使用 - string marlin_token = 3; - // 倍速动效色值 - string playback_speed_color = 4; - // - ContinuePlayInfo continue_play_info = 5; - // 跳过片头/片尾配置 - repeated ClipInfo clip_info = 6; - // - InlineType inline_type = 7; - // - int32 ep_whole_duration = 8; - // 当前分辨率信息 - Dimension dimension = 9; - // - map quality_ext_map = 10; - // - map exp_map = 11; - // DRM技术类型 - DrmTechType drm_tech_type = 12; -} - -// 播放页信息-响应 -message PlayViewReply { - // 视频流信息 - VideoInfo video_info = 1; - // 播放控件用户自定义配置 - PlayAbilityConf play_conf = 2; - // 业务需要的其他信息 - PlayViewBusinessInfo business = 3; - // 事件 - Event event = 4; - // 展示信息 - ViewInfo view_info = 5; - // 自定义配置扩展信息 - PlayAbilityExtConf play_ext_conf = 6; -} - -// 播放页信息-请求 -message PlayViewReq { - // 剧集epid - int64 epid = 1; - // 视频cid - int64 cid = 2; - // 清晰度 - int64 qn = 3; - // 视频流版本 - int32 fnver = 4; - // 视频流格式 - int32 fnval = 5; - // 下载模式 - // 0:播放 1:flv下载 2:dash下载 - uint32 download = 6; - // 流url强制是用域名 - // 0:允许使用ip 1:使用http 2:使用https - int32 force_host = 7; - // 是否4K - bool fourk = 8; - // 当前页spm - string spmid = 9; - // 上一页spm - string from_spmid = 10; - // 青少年模式 - int32 teenagers_mode = 11; - // 视频编码 - CodeType prefer_codec_type = 12; - // 是否强制请求预览视频 - bool is_preview = 13; - // 一起看房间id - int64 room_id = 14; - // 是否需要展示信息 - bool is_need_view_info = 15; - // 场景控制 - SceneControl scene_control = 16; - // - InlineScene inline_scene = 17; - // - int64 material_no = 18; -} - -// 弹窗信息 -message PopWin { - // 弹窗标题 老字段 - string title = 1; - // 优惠券列表 - repeated Coupon coupon = 2; - // 弹窗按钮列表 - repeated ButtonInfo button = 3; - // 底部文案 老字段 - string bottom_text = 4; - // 弹窗标题 新字段 - TextInfo pop_title = 5; - // 弹窗副标题 - TextInfo subtitle = 6; - // 底部描述 新字段 - ButtonInfo bottom_desc = 7; - // 弹窗小图 - string cover = 8; - // 弹窗类型 - string pop_type = 9; -} - -// 广告组件: 竖屏时视频下部提示栏 -message PromptBar { - // 主标题, 如: "本片含大会员专享内容" - TextInfo title = 1; - // 副标题, 如: "成为大会员可免费看全部剧集" - TextInfo sub_title = 2; - // 副标题前面的icon - string sub_title_icon = 3; - // 背景图 - string bg_image = 4; - // 背景渐变色 - GradientColor bg_gradient_color = 5; - // 按钮 - repeated ButtonInfo button = 6; - // 埋点上报信息 - Report report = 7; - // - string full_screen_ip_icon = 8; - // - GradientColor full_screen_bg_gradient_color = 9; -} - -// 云控拓展视频画质信息 -message QualityExtInfo { - // 是否支持试看 - bool trial_support = 1; -} - -// 埋点上报信息 -message Report { - // 曝光事件 - string show_event_id = 1; - // 点击事件 - string click_event_id = 2; - // 埋点透传参数 - string extends = 3; -} - -// 分段流条目 -message ResponseUrl { - // 分段序号 - uint32 order = 1; - // 分段时长 - uint64 length = 2; - // 分段大小 - uint64 size = 3; - // 主线流 - string url = 4; - // 备用流 - repeated string backup_url = 5; - // md5 - string md5 = 6; -} - -// 场景控制 -message SceneControl { - // 是否收藏播单 - bool fav_playlist = 1; - // 是否小窗 - bool small_window = 2; - // 是否画中画 - bool pip = 3; - // - bool was_he_inline = 4; - // - bool is_need_trial = 5; -} - -//分段视频流 -message SegmentVideo { - //分段视频流列表 - repeated ResponseUrl segment = 1; -} - -// 震动 -message Shake { - // 文件地址 - string file = 1; -} - -// 视频流信息 -message Stream { - // 元数据 - StreamInfo info = 1; - // 流数据 - oneof content { - // dash流 - DashVideo dash_video = 2; - // 分段流 - SegmentVideo segment_video = 3; - } -} - -// 流媒体元数据 -message StreamInfo { - // 清晰度 - uint32 quality = 1; - // 格式 - string format = 2; - // 格式描述 - string description = 3; - // 错误码 - uint32 err_code = 4; - // 不满足条件信息 - StreamLimit limit = 5; - // 是否需要vip - bool need_vip = 6; - // 是否需要登录 - bool need_login = 7; - // 是否完整 - bool intact = 8; - // 是否非全二压 - bool no_rexcode = 9; - // 清晰度属性位 - int64 attribute = 10; - // 新版格式描述 - string new_description = 11; - // 格式文字 - string display_desc = 12; - // 新版格式描述备注 - string superscript = 13; -} - -// 清晰度不满足条件信息 -message StreamLimit { - // 标题 - string title = 1; - // 跳转地址 - string uri = 2; - // 提示信息 - string msg = 3; -} - -// 文案信息 -message TextInfo { - // 文案 - string text = 1; - // 字体色值 - string textColor = 2; - // 字体色值-夜间模式 - string textColorNight = 3; -} - -// toast -message Toast { - // toast文案 老字段 - string text = 1; - // toast按钮 - ButtonInfo button = 2; - // 显示样式类型 - int32 show_style_type = 3; - // 图标 - string icon = 4; - // toast文案 新字段 - TextInfo toast_text = 5; - // 埋点上报信息 - Report report = 6; - // - map order_report_params = 7; -} - -// 视频url信息 -message VideoInfo { - // 视频清晰度 - uint32 quality = 1; - // 视频格式 - string format = 2; - // 视频时长 - uint64 timelength = 3; - // 视频编码id - uint32 video_codecid = 4; - // 视频流 - repeated Stream stream_list = 5; - // 伴音流 - repeated DashItem dash_audio = 6; - // 杜比伴音流 - DolbyItem dolby = 7; -} - -// 展示信息 -message ViewInfo { - // 鉴权浮层 - Dialog dialog = 1; - // toast - Toast toast = 2; - // 优惠券信息 - CouponInfo coupon_info = 3; - // 未购买的超前点播ep列表 - repeated int64 demand_no_pay_epids = 4; - // 播放结束页 - EndPage end_page = 5; - // - map exp_config = 6; - // 弹窗 - PopWin pop_win = 7; - // - PromptBar try_watch_prompt_bar = 8; - // - PayTip pay_tip = 9; - // - HighDefinitionTrialInfo high_definition_trial_info = 10; - // - map ext_dialog = 11; +syntax = "proto3"; + +package bilibili.pgc.gateway.player.v2; + +import "google/protobuf/timestamp.proto"; + +// 视频url +service PlayURL { + // 播放页信息 + rpc PlayView (PlayViewReq) returns (PlayViewReply); + // + rpc PlayViewComic(PlayViewReq) returns (PlayViewReply); +} + +// 角标信息 +message BadgeInfo { + // 角标文案 + string text = 1; + // 角标色值 + string bg_color = 2; + // 角标色值-夜间模式 + string bg_color_night = 3; + // 文案色值 + string text_color = 4; + // ? 新版本客户端已弃用此项 + GradientColor bg_gradient_color = 5; +} + +// Dialog组件: 底部显示 +message BottomDisplay { + // 文案 + TextInfo title = 1; + // 图标 + string icon = 2; +} + +// 按钮信息 +message ButtonInfo { + // 按钮文案 + string text = 1; + // 按钮字体色值 + string text_color = 2; + // 按钮字体色值-夜间模式 + string text_color_night = 3; + // 按钮背景色 + string bg_color = 4; + // 按钮背景色-夜间模式 + string bg_color_night = 5; + // 按钮链接 + string link = 6; + // 按钮动作类型 + string action_type = 7; + // 角标信息 + BadgeInfo badge_info = 8; + // 埋点上报信息 + Report report = 9; + // 左侧删除线样式文案 + string left_strikethrough_text = 10; + // 缩略按钮文案信息 + TextInfo simple_text_info = 11; + // 缩略按钮背景色值 + string simple_bg_color = 12; + // 缩略按钮字体色值-夜间模式 + string simple_bg_color_night = 13; + // + GradientColor bg_gradient_color = 14; + // + map order_report_params = 15; +} + +// 投屏限制. code = 0 时为无限制, 否则表示不不允许投屏并提示message +message CastTips { + // + int32 code = 1; + // + string message = 2; +} + +// 跳过片头/片尾配置 +message ClipInfo { + // + int64 material_no = 1; + // DASH分段始 + int32 start = 2; + // DASH分段终 + int32 end = 3; + // Clip类型 + ClipType clip_type = 4; + // 跳过片头/片尾时的提示语 + string toast_text = 5; + // + MultiView multi_view = 6; +} + +// 跳过片头/片尾配置: Clip类型 +enum ClipType { + NT_UNKNOWN = 0; // + CLIP_TYPE_OP = 1; // 跳过OP + CLIP_TYPE_ED = 2; // 跳过ED + CLIP_TYPE_HE = 3; // + CLIP_TYPE_MULTI_VIEW = 4; // +} + +// 编码类型 +enum CodeType { + NOCODE = 0; // 默认 + CODE264 = 1; // H.264 + CODE265 = 2; // H.265 +} + +// +message ContinuePlayInfo { + // + int64 continue_play_ep_id = 1; +} + +// 优惠券 +message Coupon { + // 优惠券token + string coupon_token = 1; + // 优惠券类型 + // 1:折扣券 2:满减券 3:兑换券 + int64 type = 2; + // 优惠券面值 + string value = 3; + // 优惠券使用描述 + string use_desc = 4; + // 优惠券标题 + string title = 5; + // 优惠券描述 + string desc = 6; + // 优惠券支付按钮文案 + string pay_button_text = 7; + // 优惠券支付按钮删除线文案 + string pay_button_text_line_through = 8; + // 实付金额 + string real_amount = 9; + // 使用过期时间 + google.protobuf.Timestamp expire_time = 10; +} + +// 优惠券信息 +message CouponInfo { + // 提示框信息 + CouponToast toast = 1; + // 弹窗信息 + PopWin pop_win = 2; +} + +// 优惠券提示框文案信息 +message CouponTextInfo { + // 提示框文案-播正片6分钟预览 + string positive_preview = 1; + // 提示框文案-播非正片分节ep + string section = 2; +} + +// 优惠券提示框信息 +message CouponToast { + // 提示框文案信息 + CouponTextInfo text_info = 1; + // 提示框按钮 + ButtonInfo button = 2; +} + +// dash条目 +message DashItem { + // 清晰度 + uint32 id = 1; + // 主线流 + string base_url = 2; + // 备用流 + repeated string backup_url = 3; + // 带宽 + uint32 bandwidth = 4; + // 编码id + uint32 codecid = 5; + // md5 + string md5 = 6; + // 视频大小 + uint64 size = 7; + // 帧率 + string frame_rate = 8; +} + +// dash视频流 +message DashVideo { + // 主线流 + string base_url = 1; + // 备用流 + repeated string backup_url = 2; + // 带宽 + uint32 bandwidth = 3; + // 编码id + uint32 codecid = 4; + // md5 + string md5 = 5; + // 大小 + uint64 size = 6; + // 伴音质量id + uint32 audio_id = 7; + // 是否非全二压 + bool no_rexcode = 8; + // 帧率 + string frame_rate = 9; + // 宽 + int32 width = 10; + // 高 + int32 height = 11; +} + +// 鉴权浮层 +message Dialog { + // 鉴权限制码 + int64 code = 1; + // 鉴权限制信息 + string msg = 2; + // 浮层类型 + string type = 3; + // 浮层样式类型 + string style_type = 4; + // 浮层配置 + DialogConfig config = 5; + // 标题 + TextInfo title = 6; + // 副标题 + TextInfo subtitle = 7; + // 图片信息 + ImageInfo image = 8; + // 按钮列表 + repeated ButtonInfo button = 9; + // 底部描述 + ButtonInfo bottom_desc = 10; + // 埋点上报信息 + Report report = 11; + // 倒计时 秒 + int32 count_down_sec = 12; + // 右下描述 + TextInfo right_bottom_desc = 13; + // + repeated BottomDisplay bottom_display = 14; +} + +// 鉴权浮层配置 +message DialogConfig { + // 是否显示高斯模糊背景图 + bool is_show_cover = 1; + // 是否响应转屏 + bool is_orientation_enable = 2; + // 是否响应上滑吸顶 + bool is_nested_scroll_enable = 3; + // 是否强制竖屏 + bool is_force_halfscreen_enable = 4; +} + +// 当前分辨率信息 +message Dimension { + // 宽 + int32 width = 1; + // 长 + int32 height = 2; + // 旋转角度 + int32 rotate = 3; +} + +// 杜比音频信息 +message DolbyItem { + // 杜比类型 + enum Type { + NONE = 0; // NONE + COMMON = 1; // 普通杜比音效 + ATMOS = 2; // 全景杜比音效 + } + // 杜比类型 + Type type = 1; + // 音频流 + DashItem audio = 2; +} + +// DRM技术类型 +enum DrmTechType { + NON = 0; // + FAIR_PLAY = 1; // +} + +// 播放结束页 +message EndPage { + // 鉴权浮层 + Dialog dialog = 1; + // 播放完后是否隐藏end_page + bool hide = 2; +} + +// 事件 +message Event { + // 震动 + Shake shake = 1; +} + +// ? 放映室提示语 +message FreyaConfig { + // + string desc = 1; + // + int32 type = 2; + // + int32 issued_cnt = 3; + // + bool is_always_show = 4; + // + int32 screen_number = 5; + // + int32 full_screen_number = 6; +} + +// 渐变色信息 +message GradientColor { + // + string start_color = 1; + // + string end_color = 2; +} + +// 高画质试看信息 +message HighDefinitionTrialInfo { + // + bool trial_able = 1; + // + int32 remaining_times = 2; + // + int32 start = 3; + // + int32 time_length = 4; + // + Toast start_toast = 5; + // + Toast end_toast = 6; + // + Report report = 7; + // + ButtonInfo quality_open_tip_btn = 8; + // + ButtonInfo no_longer_trial_btn = 9; +} + +// 图片信息 +message ImageInfo { + // 图片链接 + string url = 1; +} + +// +enum InlineScene { + UNKNOWN = 0; // + RELATED_EP = 1; // + HE = 2; // + SKIP = 3; // +} + +// +enum InlineType { + TYPE_UNKNOWN = 0; // + TYPE_WHOLE = 1; // + TYPE_HE_CLIP = 2; // + TYPE_PREVIEW = 3; // +} + +// +message MultiView { + // + string button_material = 1; + // + int64 ep_id = 2; + // + int64 cid = 3; + // + int64 avid = 4; +} + +// 大会员广告: 支付提示信息 +message PayTip { + // + string title = 1; + // + string url = 2; + // + string icon = 3; + // + int32 type = 4; + // + int32 show_type = 5; + // + string img = 6; + // + string bg_day_color = 7; + // + string bg_night_color = 8; + // + string bg_line_color = 9; + // + string bg_night_line_color = 10; + // + string text_color = 11; + // + string text_night_color = 12; + // + int64 view_start_time = 13; + // + repeated ButtonInfo button = 14; + // + int32 url_open_type = 15; + // + Report report = 16; + // + int32 angle_style = 17; + // + int32 report_type = 18; + // + map order_report_params = 19; +} + +// 禁用功能配置 +message PlayAbilityConf { + bool background_play_disable = 1; // 后台播放 + bool flip_disable = 2; // 镜像反转 + bool cast_disable = 3; // 投屏 + bool feedback_disable = 4; // 反馈 + bool subtitle_disable = 5; // 字幕 + bool playback_rate_disable = 6; // 播放速度 + bool time_up_disable = 7; // 定时停止 + bool playback_mode_disable = 8; // 播放方式 + bool scale_mode_disable = 9; // 画面尺寸 + bool like_disable = 10; // 赞 + bool dislike_disable = 11; // 踩 + bool coin_disable = 12; // 投币 + bool elec_disable = 13; // 充电 + bool share_disable = 14; // 分享 + bool screen_shot_disable = 15; // 截图 + bool lock_screen_disable = 16; // 锁定 + bool recommend_disable = 17; // 相关推荐 + bool playback_speed_disable = 18; // 播放速度 + bool definition_disable = 19; // 清晰度 + bool selections_disable = 20; // 选集 + bool next_disable = 21; // 下一集 + bool edit_dm_disable = 22; // 编辑弹幕 + bool small_window_disable = 23; // 小窗 + bool shake_disable = 24; // 震动 + bool outer_dm_disable = 25; // 外层面板弹幕设置 + bool inner_dm_disable = 26; // 三点内弹幕设置 + bool freya_enter_disable = 27; // 一起看入口 + bool dolby_disable = 28; // 杜比音效 + bool freya_full_disable = 29; // 全屏一起看入口 + bool skip_oped_switch_disable = 30; // + bool record_screen_disable = 31; // + bool color_optimize_disable = 32; // +} + +// 云控扩展配置信息 +message PlayAbilityExtConf { + // 自定义配置扩展信息 + bool allow_close_subtitle = 1; + // + FreyaConfig freya_config = 2; + // + CastTips cast_tips = 3; +} + +// 错误码 +enum PlayErr { + NoErr = 0; // + WithMultiDeviceLoginErr = 1; // 管控类型的错误码 +} + +// 其他业务信息 +message PlayViewBusinessInfo { + // 当前视频是否是预览 + bool is_preview = 1; + // 用户是否承包过 + bool bp = 2; + // drm使用 + string marlin_token = 3; + // 倍速动效色值 + string playback_speed_color = 4; + // + ContinuePlayInfo continue_play_info = 5; + // 跳过片头/片尾配置 + repeated ClipInfo clip_info = 6; + // + InlineType inline_type = 7; + // + int32 ep_whole_duration = 8; + // 当前分辨率信息 + Dimension dimension = 9; + // + map quality_ext_map = 10; + // + map exp_map = 11; + // DRM技术类型 + DrmTechType drm_tech_type = 12; +} + +// 播放页信息-响应 +message PlayViewReply { + // 视频流信息 + VideoInfo video_info = 1; + // 播放控件用户自定义配置 + PlayAbilityConf play_conf = 2; + // 业务需要的其他信息 + PlayViewBusinessInfo business = 3; + // 事件 + Event event = 4; + // 展示信息 + ViewInfo view_info = 5; + // 自定义配置扩展信息 + PlayAbilityExtConf play_ext_conf = 6; +} + +// 播放页信息-请求 +message PlayViewReq { + // 剧集epid + int64 epid = 1; + // 视频cid + int64 cid = 2; + // 清晰度 + int64 qn = 3; + // 视频流版本 + int32 fnver = 4; + // 视频流格式 + int32 fnval = 5; + // 下载模式 + // 0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + // 流url强制是用域名 + // 0:允许使用ip 1:使用http 2:使用https + int32 force_host = 7; + // 是否4K + bool fourk = 8; + // 当前页spm + string spmid = 9; + // 上一页spm + string from_spmid = 10; + // 青少年模式 + int32 teenagers_mode = 11; + // 视频编码 + CodeType prefer_codec_type = 12; + // 是否强制请求预览视频 + bool is_preview = 13; + // 一起看房间id + int64 room_id = 14; + // 是否需要展示信息 + bool is_need_view_info = 15; + // 场景控制 + SceneControl scene_control = 16; + // + InlineScene inline_scene = 17; + // + int64 material_no = 18; +} + +// 弹窗信息 +message PopWin { + // 弹窗标题 老字段 + string title = 1; + // 优惠券列表 + repeated Coupon coupon = 2; + // 弹窗按钮列表 + repeated ButtonInfo button = 3; + // 底部文案 老字段 + string bottom_text = 4; + // 弹窗标题 新字段 + TextInfo pop_title = 5; + // 弹窗副标题 + TextInfo subtitle = 6; + // 底部描述 新字段 + ButtonInfo bottom_desc = 7; + // 弹窗小图 + string cover = 8; + // 弹窗类型 + string pop_type = 9; +} + +// 广告组件: 竖屏时视频下部提示栏 +message PromptBar { + // 主标题, 如: "本片含大会员专享内容" + TextInfo title = 1; + // 副标题, 如: "成为大会员可免费看全部剧集" + TextInfo sub_title = 2; + // 副标题前面的icon + string sub_title_icon = 3; + // 背景图 + string bg_image = 4; + // 背景渐变色 + GradientColor bg_gradient_color = 5; + // 按钮 + repeated ButtonInfo button = 6; + // 埋点上报信息 + Report report = 7; + // + string full_screen_ip_icon = 8; + // + GradientColor full_screen_bg_gradient_color = 9; +} + +// 云控拓展视频画质信息 +message QualityExtInfo { + // 是否支持试看 + bool trial_support = 1; +} + +// 埋点上报信息 +message Report { + // 曝光事件 + string show_event_id = 1; + // 点击事件 + string click_event_id = 2; + // 埋点透传参数 + string extends = 3; +} + +// 分段流条目 +message ResponseUrl { + // 分段序号 + uint32 order = 1; + // 分段时长 + uint64 length = 2; + // 分段大小 + uint64 size = 3; + // 主线流 + string url = 4; + // 备用流 + repeated string backup_url = 5; + // md5 + string md5 = 6; +} + +// 场景控制 +message SceneControl { + // 是否收藏播单 + bool fav_playlist = 1; + // 是否小窗 + bool small_window = 2; + // 是否画中画 + bool pip = 3; + // + bool was_he_inline = 4; + // + bool is_need_trial = 5; +} + +//分段视频流 +message SegmentVideo { + //分段视频流列表 + repeated ResponseUrl segment = 1; +} + +// 震动 +message Shake { + // 文件地址 + string file = 1; +} + +// 视频流信息 +message Stream { + // 元数据 + StreamInfo info = 1; + // 流数据 + oneof content { + // dash流 + DashVideo dash_video = 2; + // 分段流 + SegmentVideo segment_video = 3; + } +} + +// 流媒体元数据 +message StreamInfo { + // 清晰度 + uint32 quality = 1; + // 格式 + string format = 2; + // 格式描述 + string description = 3; + // 错误码 + uint32 err_code = 4; + // 不满足条件信息 + StreamLimit limit = 5; + // 是否需要vip + bool need_vip = 6; + // 是否需要登录 + bool need_login = 7; + // 是否完整 + bool intact = 8; + // 是否非全二压 + bool no_rexcode = 9; + // 清晰度属性位 + int64 attribute = 10; + // 新版格式描述 + string new_description = 11; + // 格式文字 + string display_desc = 12; + // 新版格式描述备注 + string superscript = 13; +} + +// 清晰度不满足条件信息 +message StreamLimit { + // 标题 + string title = 1; + // 跳转地址 + string uri = 2; + // 提示信息 + string msg = 3; +} + +// 文案信息 +message TextInfo { + // 文案 + string text = 1; + // 字体色值 + string textColor = 2; + // 字体色值-夜间模式 + string textColorNight = 3; +} + +// toast +message Toast { + // toast文案 老字段 + string text = 1; + // toast按钮 + ButtonInfo button = 2; + // 显示样式类型 + int32 show_style_type = 3; + // 图标 + string icon = 4; + // toast文案 新字段 + TextInfo toast_text = 5; + // 埋点上报信息 + Report report = 6; + // + map order_report_params = 7; +} + +// 视频url信息 +message VideoInfo { + // 视频清晰度 + uint32 quality = 1; + // 视频格式 + string format = 2; + // 视频时长 + uint64 timelength = 3; + // 视频编码id + uint32 video_codecid = 4; + // 视频流 + repeated Stream stream_list = 5; + // 伴音流 + repeated DashItem dash_audio = 6; + // 杜比伴音流 + DolbyItem dolby = 7; +} + +// 展示信息 +message ViewInfo { + // 鉴权浮层 + Dialog dialog = 1; + // toast + Toast toast = 2; + // 优惠券信息 + CouponInfo coupon_info = 3; + // 未购买的超前点播ep列表 + repeated int64 demand_no_pay_epids = 4; + // 播放结束页 + EndPage end_page = 5; + // + map exp_config = 6; + // 弹窗 + PopWin pop_win = 7; + // + PromptBar try_watch_prompt_bar = 8; + // + PayTip pay_tip = 9; + // + HighDefinitionTrialInfo high_definition_trial_info = 10; + // + map ext_dialog = 11; } \ No newline at end of file diff --git a/grpc_api/bilibili/playershared/playershared.proto b/grpc_api/bilibili/playershared/playershared.proto index d272b7a..47d586c 100644 --- a/grpc_api/bilibili/playershared/playershared.proto +++ b/grpc_api/bilibili/playershared/playershared.proto @@ -1,426 +1,445 @@ -syntax = "proto3"; - -package bilibili.playershared; - - -message ArcConf { - bool is_support = 1; - bool disable = 2; - ExtraContent extra_connent = 3; - repeated int32 unsupport_scene = 4; -} - -// 视频编码 -enum CodeType { - NOCODE = 0; // - CODE264 = 1; // H264 - CODE265 = 2; // H265 - CODEAV1 = 3; // AV1 -} - -// 功能类型 -enum ConfType { - NoType = 0; - FLIPCONF = 1; - CASTCONF = 2; - FEEDBACK = 3; - SUBTITLE = 4; - PLAYBACKRATE = 5; - TIMEUP = 6; - PLAYBACKMODE = 7; - SCALEMODE = 8; - BACKGROUNDPLAY = 9; - LIKE = 10; - DISLIKE = 11; - COIN = 12; - ELEC = 13; - SHARE = 14; - SCREENSHOT = 15; - LOCKSCREEN = 16; - RECOMMEND = 17; - PLAYBACKSPEED = 18; - DEFINITION = 19; - SELECTIONS = 20; - NEXT = 21; - EDITDM = 22; - SMALLWINDOW = 23; - SHAKE = 24; - OUTERDM = 25; - INNERDM = 26; - PANORAMA = 27; - DOLBY = 28; - COLORFILTER = 29; - LOSSLESS = 30; - FREYAENTER = 31; - FREYAFULLENTER = 32; - SKIPOPED = 33; - RECORDSCREEN = 34; - DUBBING = 35; - LISTEN = 36; -} - -message ConfValue { - oneof value { - // dash流 - int32 switch_val = 1; - // 分段流 - int32 selected_val = 2; - } -} - -message DeviceConf { - ConfValue conf_value = 1; -} - -// DRM类型 -enum DrmTechType { - // - UNKNOWN_DRM = 0; - // - FAIR_PLAY = 1; - // - WIDE_VINE = 2; - // 哔哩哔哩自研DRM - BILI_DRM = 3; -} - -// ? 错误码补充信息 -message ExtraContent { - // - string disable_reason = 1; - // - uint64 disable_code = 2; -} - -// 播放历史 -message History { - // 播放进度 - uint64 progress = 1; - // - string toast = 2; - // - uint64 last_play_cid = 3; -} - -message PlayDeviceConf { - map arc_confs = 1; -} - -// 错误码 -enum PlayErr { - NoErr = 0; // - WithMultiDeviceLoginErr = 1; // 管控类型的错误码 -} - -// 方案 -message Scheme { - enum ActionType { - UNKNOWN = 0; - SHOW_TOAST = 1; - } - ActionType action_type = 1; - string toast = 2; -} - -// -enum UnsupportScene { - // - UNKNOWN_SCENE = 0; - // - PREMIERE = 1; -} - -// 视频类型 -enum VideoType { - UNKNOWN = 0; - // 用户生成内容 - UGC = 1; - // 专业生产内容 - PGC = 2; -} - -// 视频流信息 -message Stream { - // 元数据 - StreamInfo stream_info = 1; - // 流数据 - oneof content { - // dash流 - DashVideo dash_video = 2; - // 分段流 - SegmentVideo segment_video = 3; - } -} - -// 视频流信息: 元数据 -message StreamInfo { - // 清晰度 - uint32 quality = 1; - // 格式 - string format = 2; - // 格式描述 - string description = 3; - // 错误码 - uint32 err_code = 4; - // 不满足条件信息 - StreamLimit limit = 5; - // 是否需要vip - bool need_vip = 6; - // 是否需要登录 - bool need_login = 7; - // 是否完整 - bool intact = 8; - // 是否非全二压 - bool no_rexcode = 9; - // 清晰度属性位 - int64 attribute = 10; - // 新版格式描述 - string new_description = 11; - // 格式文字 - string display_desc = 12; - // 新版格式描述备注 - string superscript = 13; - // - bool vip_free = 14; - // - string subtitle = 15; - // 方案 - Scheme scheme = 16; - // 支持drm - bool support_drm = 17; -} - -// Dash条目 -message DashItem { - // 清晰度 - uint32 id = 1; - // 主线流 - string base_url = 2; - // 备用流 - repeated string backup_url = 3; - // 带宽 - uint32 bandwidth = 4; - // 编码id - uint32 codecid = 5; - // md5 - string md5 = 6; - // 大小 - uint64 size = 7; - // 帧率 - string frame_rate = 8; - // DRM密钥 - string widevine_pssh = 9; -} - -// 视频流信息: dash流 -message DashVideo { - // 主线流 - string base_url = 1; - // 备用流 - repeated string backup_url = 2; - // 带宽 - uint32 bandwidth = 3; - // 编码id - uint32 codecid = 4; - // md5 - string md5 = 5; - // 大小 - uint64 size = 6; - // 伴音质量id - uint32 audio_id = 7; - // 是否非全二压 - bool no_rexcode = 8; - // 帧率 - string frame_rate = 9; - // 宽 - int32 width = 10; - // 高 - int32 height = 11; - // DRM密钥 - string widevine_pssh = 12; -} - -// 视频流信息: 分段流 -message SegmentVideo { - repeated ResponseUrl segment = 1; -} - -// 分段流条目 -message ResponseUrl { - // 分段序号 - uint32 order = 1; - // 分段时长 - uint64 length = 2; - // 分段大小 - uint64 size = 3; - // 主线流 - string url = 4; - // 备用流 - repeated string backup_url = 5; - // md5 - string md5 = 6; -} - -// Dash Response, 未使用 -message ResponseDash { - repeated DashItem video = 1; - repeated DashItem audio = 2; -} - -// 视频流信息: 流媒体元数据: 清晰度不满足条件信息 -message StreamLimit { - // 标题 - string title = 1; - // 跳转地址 - string uri = 2; - // 提示信息 - string msg = 3; -} - - -// 播放页信息-请求: 音视频VOD -message VideoVod { - // 视频aid - int32 aid = 1; - // 视频cid - int32 cid = 2; - // 清晰度 - uint64 qn = 3; - // 视频流版本 - int32 fnver = 4; - // 视频流格式 - int32 fnval = 5; - // 下载模式 - // 0:播放 1:flv下载 2:dash下载 - uint32 download = 6; - // 流url强制是用域名 - // 0:允许使用ip 1:使用http 2:使用https - int32 force_host = 7; - // 是否4K - bool fourk = 8; - // 视频编码 - CodeType prefer_codec_type = 9; - // 响度均衡 - uint64 voice_balance = 10; -} - -// 播放页信息-响应: VOD音视频信息 -message VodInfo { - // 视频清晰度 - uint32 quality = 1; - // 视频格式 - string format = 2; - // 视频时长 - uint64 timelength = 3; - // 视频编码id - uint32 video_codecid = 4; - // 视频流 - repeated Stream stream_list = 5; - // 伴音流 - repeated DashItem dash_audio = 6; - // 杜比伴音流 - DolbyItem dolby = 7; - // 响度均衡操作信息 - VolumeInfo volume = 8; - // HIRES伴音流信息 - LossLessItem loss_less_item = 9; -} - -// 杜比伴音流信息 -message DolbyItem { - // 杜比类型 - enum Type { - NONE = 0; // NONE - COMMON = 1; // 普通杜比音效 - ATMOS = 2; // 全景杜比音效 - } - // 杜比类型 - Type type = 1; - // 音频流 - DashItem audio = 2; -} - -// HIRES伴音流信息 -message LossLessItem { - // 是否为hires - bool is_lossless_audio = 1; - // 音频流信息 - DashItem audio = 2; - // 是否需要大会员 - bool need_vip = 3; -} - -// 响度均衡操作信息 -message VolumeInfo { - // Measured integrated loudness 实际综合响度 - double measured_i = 1; - // Measured loudness range 实际响度范围 - double measured_lra = 2; - // Measured true peak 实际响度真峰值 - double measured_tp = 3; - // Measured threshold 实际响度阈值 - double measured_threshold = 4; - // Target offset gain(Gain is applied before the true-peak limiter) 目标增益Offset(增益在真实峰值限制器之前应用) - double target_offset = 5; - // Target integrated loudness 目标综合响度 - double target_i = 6; - // Target true peak 目标响度真峰值 - double target_tp = 7; -} - -// -message PlayArc { - VideoType video_type = 1; - uint64 aid = 2; - uint64 cid = 3; - DrmTechType drm_tech_type = 4; -} - -// 播放页信息-响应: PlayArcConf -message PlayArcConf { - map arc_confs = 1; -} - -// 高画质试看信息: 按钮 -message QnTrialButton { - string text = 1; - string link = 2; -} - -// 播放页信息-响应: 高画质试看信息 -message QnTrialInfo { - // 能否试看高画质 - bool trial_able = 1; - // - int32 remaining_times = 2; - // - int32 start = 3; - // - int32 time_length = 4; - // - QnTrialToast start_toast = 5; - // - QnTrialToast end_toast = 6; - // - QnTrialButton quality_open_tip_btn = 8; -} - -// 高画质试看信息: Toast信息 -message QnTrialToast { - // toast文案 老字段 - string text = 1; - // toast按钮 - QnTrialButton button = 2; -} - -// 事件 -message Event { - // 震动 - Shake shake = 1; -} - -// 震动 -message Shake { - // - string file = 1; -} +syntax = "proto3"; + +package bilibili.playershared; + +// +message ArcConf { + bool is_support = 1; + bool disable = 2; + ExtraContent extra_content = 3; + repeated int32 unsupport_scene = 4; +} + +// 按钮组件 +message Button { + // 按钮文本 + string text = 1; + // 按钮跳转链接 + string link = 2; + // 埋点上报相关 + map report_params = 3; +} + +// 视频编码 +enum CodeType { + NOCODE = 0; // 不指定 + CODE264 = 1; // H264 + CODE265 = 2; // H265 + CODEAV1 = 3; // AV1 +} + +// 功能类型 +enum ConfType { + NoType = 0; + FLIPCONF = 1; + CASTCONF = 2; + FEEDBACK = 3; + SUBTITLE = 4; + PLAYBACKRATE = 5; + TIMEUP = 6; + PLAYBACKMODE = 7; + SCALEMODE = 8; + BACKGROUNDPLAY = 9; + LIKE = 10; + DISLIKE = 11; + COIN = 12; + ELEC = 13; + SHARE = 14; + SCREENSHOT = 15; + LOCKSCREEN = 16; + RECOMMEND = 17; + PLAYBACKSPEED = 18; + DEFINITION = 19; + SELECTIONS = 20; + NEXT = 21; + EDITDM = 22; + SMALLWINDOW = 23; + SHAKE = 24; + OUTERDM = 25; + INNERDM = 26; + PANORAMA = 27; + DOLBY = 28; + COLORFILTER = 29; + LOSSLESS = 30; + FREYAENTER = 31; + FREYAFULLENTER = 32; + SKIPOPED = 33; + RECORDSCREEN = 34; + DUBBING = 35; + LISTEN = 36; +} + +// +message ConfValue { + oneof value { + // DASH流 + int32 switch_val = 1; + // 分段流 + int32 selected_val = 2; + } +} + +// +message DeviceConf { + ConfValue conf_value = 1; +} + +// DRM类型 +enum DrmTechType { + // + UNKNOWN_DRM = 0; + // + FAIR_PLAY = 1; + // + WIDE_VINE = 2; + // 哔哩哔哩自研DRM + BILI_DRM = 3; +} + +// ? 错误码补充信息 +message ExtraContent { + // + string disable_reason = 1; + // + uint64 disable_code = 2; +} + +// 播放历史 +message History { + // + HistoryInfo current_video = 1; + // + HistoryInfo related_video = 2; +} + +message HistoryInfo { + // + int64 progress = 1; + // + int64 last_play_cid = 2; +} + +// +message PlayDeviceConf { + // + map arc_confs = 1; +} + +// 错误码 +enum PlayErr { + NoErr = 0; // + WithMultiDeviceLoginErr = 1; // 管控类型的错误码 +} + +// 方案 +message Scheme { + enum ActionType { + UNKNOWN = 0; + SHOW_TOAST = 1; + } + // + ActionType action_type = 1; + // + string toast = 2; +} + +// +enum UnsupportScene { + // + UNKNOWN_SCENE = 0; + // + PREMIERE = 1; +} + +// 视频类型 +enum VideoType { + UNKNOWN = 0; + // 用户生成内容 + UGC = 1; + // 专业生产内容 + PGC = 2; +} + +// 视频流信息 +message Stream { + // 元数据 + StreamInfo stream_info = 1; + // 流数据 + oneof content { + // dash流 + DashVideo dash_video = 2; + // 分段流 + SegmentVideo segment_video = 3; + } +} + +// 视频流信息: 元数据 +message StreamInfo { + // 清晰度 + uint32 quality = 1; + // 格式 + string format = 2; + // 格式描述 + string description = 3; + // 错误码 + uint32 err_code = 4; + // 不满足条件信息 + StreamLimit limit = 5; + // 是否需要vip + bool need_vip = 6; + // 是否需要登录 + bool need_login = 7; + // 是否完整 + bool intact = 8; + // 是否非全二压 + bool no_rexcode = 9; + // 清晰度属性位 + int64 attribute = 10; + // 新版格式描述 + string new_description = 11; + // 格式文字 + string display_desc = 12; + // 新版格式描述备注 + string superscript = 13; + // + bool vip_free = 14; + // + string subtitle = 15; + // 方案 + Scheme scheme = 16; + // 支持drm + bool support_drm = 17; +} + +// Dash条目 +message DashItem { + // 清晰度 + uint32 id = 1; + // 主线流 + string base_url = 2; + // 备用流 + repeated string backup_url = 3; + // 带宽 + uint32 bandwidth = 4; + // 编码id + uint32 codecid = 5; + // md5 + string md5 = 6; + // 大小 + uint64 size = 7; + // 帧率 + string frame_rate = 8; + // DRM密钥 + string widevine_pssh = 9; +} + +// 视频流信息: dash流 +message DashVideo { + // 主线流 + string base_url = 1; + // 备用流 + repeated string backup_url = 2; + // 带宽 + uint32 bandwidth = 3; + // 编码id + uint32 codecid = 4; + // md5 + string md5 = 5; + // 大小 + uint64 size = 6; + // 伴音质量id + uint32 audio_id = 7; + // 是否非全二压 + bool no_rexcode = 8; + // 帧率 + string frame_rate = 9; + // 宽 + int32 width = 10; + // 高 + int32 height = 11; + // DRM密钥 + string widevine_pssh = 12; +} + +// 视频流信息: 分段流 +message SegmentVideo { + repeated ResponseUrl segment = 1; +} + +// 分段流条目 +message ResponseUrl { + // 分段序号 + uint32 order = 1; + // 分段时长 + uint64 length = 2; + // 分段大小 + uint64 size = 3; + // 主线流 + string url = 4; + // 备用流 + repeated string backup_url = 5; + // md5 + string md5 = 6; +} + +// Dash Response, 未使用 +message ResponseDash { + repeated DashItem video = 1; + repeated DashItem audio = 2; +} + +// 视频流信息: 流媒体元数据: 清晰度不满足条件信息 +message StreamLimit { + // 标题 + string title = 1; + // 跳转地址 + string uri = 2; + // 提示信息 + string msg = 3; +} + + +// 播放页信息-请求: 音视频VOD +message VideoVod { + // 视频aid + int32 aid = 1; + // 视频cid + int32 cid = 2; + // 清晰度 + uint64 qn = 3; + // 视频流版本 + int32 fnver = 4; + // 视频流格式 + int32 fnval = 5; + // 下载模式 + // 0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + // 流url强制是用域名 + // 0:允许使用ip 1:使用http 2:使用https + int32 force_host = 7; + // 是否4K + bool fourk = 8; + // 视频编码 + CodeType prefer_codec_type = 9; + // 响度均衡 + uint64 voice_balance = 10; +} + +// 播放页信息-响应: VOD音视频信息 +message VodInfo { + // 视频清晰度 + uint32 quality = 1; + // 视频格式 + string format = 2; + // 视频时长 + uint64 timelength = 3; + // 视频编码id + uint32 video_codecid = 4; + // 视频流 + repeated Stream stream_list = 5; + // 伴音流 + repeated DashItem dash_audio = 6; + // 杜比伴音流 + DolbyItem dolby = 7; + // 响度均衡操作信息 + VolumeInfo volume = 8; + // HIRES伴音流信息 + LossLessItem loss_less_item = 9; +} + +// 杜比伴音流信息 +message DolbyItem { + // 杜比类型 + enum Type { + NONE = 0; // NONE + COMMON = 1; // 普通杜比音效 + ATMOS = 2; // 全景杜比音效 + } + // 杜比类型 + Type type = 1; + // 音频流 + repeated DashItem audio = 2; +} + +// HIRES伴音流信息 +message LossLessItem { + // 是否为hires + bool is_lossless_audio = 1; + // 音频流信息 + DashItem audio = 2; + // 是否需要大会员 + bool need_vip = 3; +} + +// 响度均衡操作信息 +message VolumeInfo { + // Measured integrated loudness 实际综合响度 + double measured_i = 1; + // Measured loudness range 实际响度范围 + double measured_lra = 2; + // Measured true peak 实际响度真峰值 + double measured_tp = 3; + // Measured threshold 实际响度阈值 + double measured_threshold = 4; + // Target offset gain(Gain is applied before the true-peak limiter) 目标增益Offset(增益在真实峰值限制器之前应用) + double target_offset = 5; + // Target integrated loudness 目标综合响度 + double target_i = 6; + // Target true peak 目标响度真峰值 + double target_tp = 7; +} + +// +message PlayArc { + // + VideoType video_type = 1; + // + uint64 aid = 2; + // + uint64 cid = 3; + // + DrmTechType drm_tech_type = 4; +} + +// 播放页信息-响应: PlayArcConf +message PlayArcConf { + map arc_confs = 1; +} + +// 播放页信息-响应: 高画质试看信息 +message QnTrialInfo { + // 能否试看高画质 + bool trial_able = 1; + // + int32 remaining_times = 2; + // + int32 start = 3; + // + int32 time_length = 4; + // + Toast start_toast = 5; + // + Toast end_toast = 6; + // + Button quality_open_tip_btn = 8; +} + +// Toast信息 +message Toast { + // toast文案 + string text = 1; + // toast按钮 + Button button = 2; +} + +// 事件 +message Event { + // 震动 + Shake shake = 1; +} + +// 震动 +message Shake { + // + string file = 1; +} diff --git a/grpc_api/bilibili/web/interfaces/v1/interfaces.proto b/grpc_api/bilibili/web/interfaces/v1/interfaces.proto index 62ca35f..190c623 100644 --- a/grpc_api/bilibili/web/interfaces/v1/interfaces.proto +++ b/grpc_api/bilibili/web/interfaces/v1/interfaces.proto @@ -1,1275 +1,1275 @@ -syntax = "proto3"; - -package bilibili.web.interfaces.v1; - -// -message AccInfo { - // - int64 mid = 1; - // - string name = 2; - // - string sex = 3; - // - string face = 4; - // - string sign = 5; -} - -// -message AccountCard { - // - string mid = 1; - // - string name = 2; - // - string sex = 3; - // - string rank = 4; - // - string face = 5; - // - int32 spacesta = 6; - // - string sign = 7; - // - CardLevelInfo level_info = 8; - // - PendantInfo pendant = 9; - // - NameplateInfo nameplate = 10; - // - OfficialInfo official = 11; - // - OfficialVerify official_verify = 12; - // - CardVip vip = 13; - // - int64 fans = 14; - // - int64 friend = 15; - // - int64 attention = 16; -} - -// -message ActivityArchiveReply { - // - Arc arc = 1; - // - string bvid = 2; - // - repeated Page pages = 3; - // - ReqUser req_user = 4; - // - repeated Staff staff = 5; - // - OperationRelate right_relate = 6; - // - OperationRelate bottom_relate = 7; -} - -// -message ActivityArchiveReq { - // - int64 aid = 1; - // - string bvid = 2; - // - string activity_key = 3; -} - -// -message ActivityEpisode { - // - int64 id = 1; - // - int64 aid = 2; - // - string bvid = 3; - // - int64 cid = 4; - // - string title = 5; - // - string cover = 6; - // - Author author = 7; - // - Rights rights = 8; -} - -// -message ActivityGame { - // - repeated ActivityGameIframe iframes = 1; - // - string disclaimer = 2; - // - string disclaimer_url = 3; -} - -// -message ActivityGameIframe { - // - string url = 1; - // - int64 height = 2; -} - -// -message ActivityLive { - // - int64 room_id = 1; - // - int64 now_time = 2; - // - int64 start_time = 3; - // - int64 end_time = 4; - // - string hover_pic = 5; - // - string hover_jump_url = 6; - // - int64 break_cycle = 7; - // - repeated LiveTimeline timeline = 8; - // - OperationRelate operation_relate = 9; - // - int64 reply_type = 10; - // - int64 reply_id = 11; - // - string hover_pic_close = 12; - // - string gift_disclaimer = 13; -} - -// -message ActivityLiveTimeInfoReply { - // - int64 now_time = 1; - // - int64 start_time = 2; - // - int64 end_time = 3; - // - repeated LiveTimeline timeline = 4; -} - -// -message ActivityLiveTimeInfoReq { - // - string activity_key = 1; -} - -// -message ActivitySeasonReply { - // - ActivitySeasonStatus status = 1; - // - string title = 2; - // - ActivityLive live = 3; - // - ActivitySubscribe subscribe = 4; - // - ActivityGame game = 5; - // - ActivityView view = 6; - // - ActivityTheme theme = 7; -} - -// -message ActivitySeasonReq { - // - int64 aid = 1; - // - string bvid = 2; - // - string activity_key = 3; -} - -// -message ActivitySeasonSection { - // - int64 id = 1; - // - string title = 2; - // - int64 type = 3; - // - repeated ActivityEpisode episodes = 4; -} - -// -enum ActivitySeasonStatus { - StatusNone = 0; // - StatusLive = 1; // - StatusView = 2; // -} - -// -message ActivitySubscribe { - // - bool status = 1; - // - string title = 2; - // - string button_title = 3; - // - string button_selected_title = 4; - // - int64 season_stat_view = 5; - // - int64 season_stat_danmaku = 6; - // - OrderType order_type = 7; - oneof param { - // - ReserveActivityParam reserve_activity_param = 8; - // - FavSeasonParam fav_season_param = 9; - // - JumpURLParam jump_URL_param = 10; - } -} - -// -message ActivityTheme { - // - string base_color = 1; - // - string loading_bg_color = 2; - // - string operated_bg_color = 3; - // - string default_element_color = 4; - // - string hover_element_color = 5; - // - string selected_element_color = 6; - // - string base_font_color = 7; - // - string info_font_color = 8; - // - string mask_bg_color = 9; - // - string page_bg_color = 10; - // - string center_logo_img = 11; - // - string page_bg_img = 12; - // - string decorations2233_img = 13; - // - string main_banner_bg_img = 14; - // - string main_banner_title_img = 15; - // - string like_animation_img = 16; - // - string combo_like_img = 17; - // - string combo_coin_img = 18; - // - string combo_fav_img = 19; - // - string arrow_btn_img = 20; - // - string share_icon_bg_img = 21; - // - string live_list_location_img = 22; - // - string live_list_location_img_active = 23; - // - string player_loading_img = 24; - // - string share_img = 25; - // - map kv_color = 26; -} - -// -message ActivityView { - // - Arc arc = 1; - // - string bvid = 2; - // - repeated Page pages = 3; - // - repeated Staff staff = 4; - // - ReqUser req_user = 5; - // - OperationRelate right_relate = 6; - // - OperationRelate bottom_relate = 7; - // - repeated ActivitySeasonSection sections = 8; -} - -// -message Arc { - // - int64 aid = 1; - // - int64 videos = 2; - // - int32 type_id = 3; - // - string type_name = 4; - // - int32 copyright = 5; - // - string pic = 6; - // - string title = 7; - // - int64 pubdate = 8; - // - int64 ctime = 9; - // - string desc = 10; - // - int32 state = 11; - // - int32 access = 12; - // - int32 attribute = 13; - // - string tag = 14; - // - repeated string tags = 15; - // - int64 duration = 16; - // - int64 mission_id = 17; - // - int64 order_id = 18; - // - string redirect_url = 19; - // - int64 forward = 20; - // - Rights rights = 21; - // - Author author = 22; - // - Stat stat = 23; - // - string report_result = 24; - // - string dynamic = 25; - // - int64 first_cid = 26; - // - Dimension dimension = 27; - // - repeated StaffInfo staff_info = 28; - // - int64 season_id = 29; - // - repeated DescV2 desc_v2 = 30; - // - bool is_chargeable_season = 31; - // - bool is_blooper = 32; -} - -// -message Author { - // - int64 mid = 1; - // - string name = 2; - // - string face = 3; -} - -// -message Card { - // - AccountCard card = 1; - // - Space space = 2; - // - bool following = 3; - // - int64 archive_count = 4; - // - int32 article_count = 5; - // - int64 follower = 6; -} - -// -message CardLevelInfo { - // - int32 cur = 1; - // - int32 min = 2; - // - int32 now_exp = 3; - // - int32 next_exp = 4; -} - -// -message CardVip { - // - int32 type = 1; - // - string due_remark = 2; - // - int32 access_status = 3; - // - int32 vip_status = 4; - // - string vip_status_warn = 5; - // - int32 theme_type = 6; -} - -message ClickActivitySeasonReq { - // - OrderType order_type = 1; - oneof param { - // - ReserveActivityParam reserve_activity_param = 2; - // - FavSeasonParam fav_season_param = 3; - // - JumpURLParam jump_URL_param = 4; - } - // - string spmid = 5; - // - int64 action = 6; -} - -// -message DescV2 { - // - string raw_text = 1; - // - int64 type = 2; - // - int64 biz_id = 3; -} - -// -message Dimension { - // - int64 width = 1; - // - int64 height = 2; - // - int64 rotate = 3; -} - -// -message FavSeasonParam { - // - int64 season_id = 1; -} - -// -message HotReply { - // - ReplyPage page = 1; - // - repeated Reply replies = 2; -} - -// -message JumpURLParam { - // - string jump_url = 1; -} - -// -message LiveTimeline { - // - string name = 1; - // - int64 start_time = 2; - // - int64 end_time = 3; - // - string cover = 4; - // - string subtitle = 5; - // - string h5_cover = 6; -} - -// -message NameplateInfo { - // - int32 nid = 1; - // - string name = 2; - // - string image = 3; - // - string image_small = 4; - // - string level = 5; - // - string condition = 6; -} - -// -message NoReply {} - -// -message OfficialInfo { - // - int32 role = 1; - // - string title = 2; - // - string desc = 3; -} - -// -message OfficialVerify { - // - int32 type = 1; - // - string desc = 2; -} - -// -message OperationRelate { - // - string title = 1; - // - repeated RelateItem relate_item = 2; - // - repeated Relate ai_relate_item = 3; -} - -// -enum OrderType { - TypeNone = 0; // - TypeOrderActivity = 1; // - TypeFavSeason = 2; // - TypeClick = 3; // -} - -// -message Page { - // - int64 cid = 1; - // - int32 page = 2; - // - string from = 3; - // - string part = 4; - // - int64 duration = 5; - // - string vid = 6; - // - string desc = 7; - // - string weblink = 8; - // - Dimension dimension = 9; -} - -// -message PendantInfo { - // - int32 pid = 1; - // - string name = 2; - // - string image = 3; - // - int64 expire = 4; -} - -// -message ReasonStyle { - // - string text = 1; -} - -// -message Relate { - // - Arc arc = 1; - // - string bvid = 2; - // - int64 season_type = 3; -} - -// -message RelateItem { - // - string url = 1; - // - string cover = 2; -} - -// -message Relation { - // - int64 attribute = 1; - // - int64 special = 3; -} - -// -message Reply { - // - int64 rpid = 1; - // - int64 oid = 2; - // - int32 type = 3; - // - int64 mid = 4; - // - int64 root = 5; - // - int64 parent = 6; - // - int64 dialog = 7; - // - int32 count = 8; - // - int32 rcount = 9; - // - int32 floor = 10; - // - int32 state = 11; - // - int32 fans_grade = 12; - // - int32 attr = 13; - // - int64 ctime = 14; - // - string rpid_str = 15; - // - string root_str = 16; - // - string parent_str = 17; - // - string dialog_str = 18; - // - int32 like = 19; - // - int32 hate = 20; - // - int32 action = 21; - // - ReplyMember member = 22; - // - ReplyContent content = 23; - // - repeated Reply replies = 24; - // - int32 assist = 25; - // - ReplyFolder folder = 26; - // - ReplyUpAction up_action = 27; - // - ReplyLabel label = 28; - // - string raw_input = 29; - // - bool show_follow = 30; -} - -// -message ReplyContent { - // - int64 rp_id = 1; - // - string message = 2; - // - ReplyVote vote = 3; - // - repeated string topics = 5; - // - int32 ip = 6; - // - int32 plat = 7; - // - string device = 8; - // - string version = 9; - // - repeated ReplyMemberInfo members = 10; - // - map emote = 11; -} - -// -message ReplyEmote { - // - int64 id = 1; - // - int64 package_id = 2; - // - int64 state = 3; - // - int64 type = 4; - // - int64 attr = 5; - // - string text = 6; - // - string url = 7; - // - ReplyEmoteMeta meta = 8; - // - int64 ctime = 9; - // - int64 mtime = 10; -} - -// -message ReplyEmoteMeta { - // - ReplyEmoteMetaSize size = 1; -} - -// -enum ReplyEmoteMetaSize { - EMOTE_META_SIZE_UNSPECIFIED = 0; // - EMOTE_META_SIZE_SMALL = 1; // - EMOTE_META_SIZE_BIG = 2; // -} - -// -message ReplyFansDetail { - // - int64 uid = 1; - // - int32 medal_id = 2; - // - string medal_name = 3; - // - int32 score = 4; - // - int32 level = 5; - // - int32 intimacy = 6; - // - int32 status = 7; - // - int32 received = 8; -} - -// -message ReplyFolder { - // - bool has_folded = 1; - // - bool is_folded = 2; - // - string rule = 3; -} - -// -message ReplyLabel { - // - int64 rpid = 1; - // - string content = 2; - // - string text_color = 3; - // - string text_color_night_mode = 4; - // - string bg_color = 5; - // - string bg_color_night_mode = 6; - // - string link = 7; - // - string position = 8; -} - -// -message ReplyLevelInfo { - // - int32 cur = 1; - // - int32 min = 2; - // - int32 now_exp = 3; - // - int32 next_exp = 4; -} - -// -message ReplyMember { - // - ReplyMemberInfo info = 1; - // - ReplyFansDetail fans_detail = 2; - // - int32 following = 3; -} - -// -message ReplyMemberInfo { - // - int32 role = 1; - // - string mid = 2; - // - string name = 3; - // - string sex = 4; - // - string sign = 5; - // - string avatar = 6; - // - string rank = 7; - // - string display_rank = 8; - // - ReplyLevelInfo level_info = 9; - // - PendantInfo pendant = 10; - // - NameplateInfo nameplate = 11; - // - OfficialVerify official_verify = 12; - // - ReplyVip vip = 13; -} - -// -message ReplyPage { - // - int64 acount = 1; - // - int64 count = 2; - // - int64 num = 3; - // - int64 size = 4; -} - -// -message ReplyUpAction { - // - bool like = 1; - // - bool reply = 2; -} - -// -message ReplyVip { - // - int32 type = 1; - // - int64 due_date = 2; - // - string due_remark = 3; - // - int32 access_status = 4; - // - int32 vip_status = 5; - // - string vip_status_warn = 6; - // - int32 theme_type = 7; - // - VipLabel label = 8; -} - -// -message ReplyVote { - // - int64 id = 1; - // - string title = 2; - // - int32 cnt = 3; - // - string desc = 4; - // - bool deleted = 5; -} - -// -message ReqUser { - // - bool favorite = 1; - // - bool like = 2; - // - bool dislike = 3; - // - int64 multiply = 4; -} - -// -message ReserveActivityParam { - // - int64 reserve_id = 1; - // - string from = 2; - // - string type = 3; - // - int64 oid = 4; -} - -// -message Rights { - // - int32 bp = 1; - // - int32 elec = 2; - // - int32 download = 3; - // - int32 movie = 4; - // - int32 pay = 5; - // - int32 hd5 = 6; - // - int32 no_reprint = 7; - // - int32 autoplay = 8; - // - int32 ugc_pay = 9; - // - int32 is_cooperation = 10; - // - int32 ugc_pay_preview = 11; - // - int32 arc_pay = 12; - // - int32 free_watch = 13; -} - -// -message SeasonEpisode { - // - int64 season_id = 1; - // - int64 section_id = 2; - // - int64 id = 3; - // - int64 aid = 4; - // - int64 cid = 5; - // - string title = 6; - // - int64 attribute = 7; - // - Arc arc = 8; - // - Page page = 9; - // - string bvid = 10; - // - ReasonStyle badge_style = 11; -} - -// -message SeasonSection { - // - int64 season_id = 1; - // - int64 id = 2; - // - string title = 3; - // - int64 type = 4; - // - repeated SeasonEpisode episodes = 5; -} - -// -message SeasonStat { - // - int64 season_id = 1; - // - int32 view = 2; - // - int32 danmaku = 3; - // - int32 reply = 4; - // - int32 fav = 5; - // - int32 coin = 6; - // - int32 share = 7; - // - int32 now_rank = 8; - // - int32 his_rank = 9; - // - int32 like = 10; -} - -// -message Space { - // - string s_img = 1; - // - string l_img = 2; -} - -// -message Staff { - // - int64 mid = 1; - // - string title = 2; - // - string name = 3; - // - string face = 4; - // - VipInfo vip = 5; - // - OfficialInfo official = 6; - // - int64 follower = 7; - // - int32 label_style = 8; - // - Relation relation = 9; -} - -// -message StaffInfo { - // - int64 mid = 1; - // - string title = 2; -} - -// -message Stat { - // - int64 aid = 1; - // - int32 view = 2; - // - int32 danmaku = 3; - // - int32 reply = 4; - // - int32 fav = 5; - // - int32 coin = 6; - // - int32 share = 7; - // - int32 now_rank = 8; - // - int32 his_rank = 9; - // - int32 like = 10; - // - int32 dislike = 11; - // - string evaluation = 12; - // - string argue_msg = 13; -} - -// -message Subtitle { - // - bool allow_submit = 1; - // - repeated SubtitleItem list = 2; -} - -// -message SubtitleItem { - // - int64 id = 1; - // - string lan = 2; - // - string lan_doc = 3; - // - bool is_lock = 4; - // - int64 author_mid = 5; - // - string subtitle_url = 6; - // - AccInfo author = 7; -} - -// -message Tag { - // - int64 id = 1; - // - string name = 2; - // - string cover = 3; - // - string head_cover = 4; - // - string content = 5; - // - string short_content = 6; - // - int32 type = 7; - // - int32 state = 8; - // - int64 ctime = 9; - // - TagCount tag_count = 10; - // - int32 is_atten = 11; - // - int64 likes = 12; - // - int64 hates = 13; - // - int32 attribute = 14; - // - int32 liked = 15; - // - int32 hated = 16; -} - -// -message TagCount { - // - int64 view = 1; - // - int64 use = 2; - // - int64 atten = 3; -} - -// -message UGCPayAsset { - // - int64 price = 1; - // - map platform_price = 2; -} - -// -message UGCSeason { - // - int64 id = 1; - // - string title = 2; - // - string cover = 3; - // - int64 mid = 4; - // - string intro = 5; - // - int32 sign_state = 6; - // - int64 attribute = 7; - // - repeated SeasonSection sections = 8; - // - SeasonStat stat = 9; - // - int64 ep_count = 10; - // - int64 season_type = 11; - // - bool is_pay_season = 12; -} - -// -message View { - // - Arc arc = 1; - // - bool no_cache = 2; - // - repeated Page pages = 3; - // - Subtitle subtitle = 4; - // - UGCPayAsset asset = 5; - // - ViewLabel label = 6; - // - repeated Staff staff = 7; - // - UGCSeason ugc_season = 8; - // - int64 stein_guide_cid = 9; -} - -// -message ViewDetailReply { - // - View view = 1; - // - Card card = 2; - // - repeated Tag tags = 3; - // - HotReply reply = 4; - // - repeated Arc related = 5; -} - -// -message ViewDetailReq { - // - int64 aid = 1; - // - string bvid = 2; -} - -// -message ViewLabel { - // - int64 type = 1; -} - -// -message VipInfo { - // - int32 type = 1; - // - int32 status = 2; - // - int32 vip_pay_type = 3; - // - int32 theme_type = 4; -} - -// -message VipLabel { - // - string path = 1; -} +syntax = "proto3"; + +package bilibili.web.interfaces.v1; + +// 用户信息 +message AccInfo { + // 用户UID + int64 mid = 1; + // 用户昵称 + string name = 2; + // + string sex = 3; + // + string face = 4; + // + string sign = 5; +} + +// +message AccountCard { + // + string mid = 1; + // + string name = 2; + // + string sex = 3; + // + string rank = 4; + // + string face = 5; + // + int32 spacesta = 6; + // + string sign = 7; + // + CardLevelInfo level_info = 8; + // + PendantInfo pendant = 9; + // + NameplateInfo nameplate = 10; + // + OfficialInfo official = 11; + // + OfficialVerify official_verify = 12; + // + CardVip vip = 13; + // + int64 fans = 14; + // + int64 friend = 15; + // + int64 attention = 16; +} + +// +message ActivityArchiveReply { + // + Arc arc = 1; + // + string bvid = 2; + // + repeated Page pages = 3; + // + ReqUser req_user = 4; + // + repeated Staff staff = 5; + // + OperationRelate right_relate = 6; + // + OperationRelate bottom_relate = 7; +} + +// +message ActivityArchiveReq { + // + int64 aid = 1; + // + string bvid = 2; + // + string activity_key = 3; +} + +// +message ActivityEpisode { + // + int64 id = 1; + // + int64 aid = 2; + // + string bvid = 3; + // + int64 cid = 4; + // + string title = 5; + // + string cover = 6; + // + Author author = 7; + // + Rights rights = 8; +} + +// +message ActivityGame { + // + repeated ActivityGameIframe iframes = 1; + // + string disclaimer = 2; + // + string disclaimer_url = 3; +} + +// +message ActivityGameIframe { + // + string url = 1; + // + int64 height = 2; +} + +// +message ActivityLive { + // + int64 room_id = 1; + // + int64 now_time = 2; + // + int64 start_time = 3; + // + int64 end_time = 4; + // + string hover_pic = 5; + // + string hover_jump_url = 6; + // + int64 break_cycle = 7; + // + repeated LiveTimeline timeline = 8; + // + OperationRelate operation_relate = 9; + // + int64 reply_type = 10; + // + int64 reply_id = 11; + // + string hover_pic_close = 12; + // + string gift_disclaimer = 13; +} + +// +message ActivityLiveTimeInfoReply { + // + int64 now_time = 1; + // + int64 start_time = 2; + // + int64 end_time = 3; + // + repeated LiveTimeline timeline = 4; +} + +// +message ActivityLiveTimeInfoReq { + // + string activity_key = 1; +} + +// +message ActivitySeasonReply { + // + ActivitySeasonStatus status = 1; + // + string title = 2; + // + ActivityLive live = 3; + // + ActivitySubscribe subscribe = 4; + // + ActivityGame game = 5; + // + ActivityView view = 6; + // + ActivityTheme theme = 7; +} + +// +message ActivitySeasonReq { + // + int64 aid = 1; + // + string bvid = 2; + // + string activity_key = 3; +} + +// +message ActivitySeasonSection { + // + int64 id = 1; + // + string title = 2; + // + int64 type = 3; + // + repeated ActivityEpisode episodes = 4; +} + +// +enum ActivitySeasonStatus { + StatusNone = 0; // + StatusLive = 1; // + StatusView = 2; // +} + +// +message ActivitySubscribe { + // + bool status = 1; + // + string title = 2; + // + string button_title = 3; + // + string button_selected_title = 4; + // + int64 season_stat_view = 5; + // + int64 season_stat_danmaku = 6; + // + OrderType order_type = 7; + oneof param { + // + ReserveActivityParam reserve_activity_param = 8; + // + FavSeasonParam fav_season_param = 9; + // + JumpURLParam jump_URL_param = 10; + } +} + +// +message ActivityTheme { + // + string base_color = 1; + // + string loading_bg_color = 2; + // + string operated_bg_color = 3; + // + string default_element_color = 4; + // + string hover_element_color = 5; + // + string selected_element_color = 6; + // + string base_font_color = 7; + // + string info_font_color = 8; + // + string mask_bg_color = 9; + // + string page_bg_color = 10; + // + string center_logo_img = 11; + // + string page_bg_img = 12; + // + string decorations2233_img = 13; + // + string main_banner_bg_img = 14; + // + string main_banner_title_img = 15; + // + string like_animation_img = 16; + // + string combo_like_img = 17; + // + string combo_coin_img = 18; + // + string combo_fav_img = 19; + // + string arrow_btn_img = 20; + // + string share_icon_bg_img = 21; + // + string live_list_location_img = 22; + // + string live_list_location_img_active = 23; + // + string player_loading_img = 24; + // + string share_img = 25; + // + map kv_color = 26; +} + +// +message ActivityView { + // + Arc arc = 1; + // + string bvid = 2; + // + repeated Page pages = 3; + // + repeated Staff staff = 4; + // + ReqUser req_user = 5; + // + OperationRelate right_relate = 6; + // + OperationRelate bottom_relate = 7; + // + repeated ActivitySeasonSection sections = 8; +} + +// +message Arc { + // + int64 aid = 1; + // + int64 videos = 2; + // + int32 type_id = 3; + // + string type_name = 4; + // + int32 copyright = 5; + // + string pic = 6; + // + string title = 7; + // + int64 pubdate = 8; + // + int64 ctime = 9; + // + string desc = 10; + // + int32 state = 11; + // + int32 access = 12; + // + int32 attribute = 13; + // + string tag = 14; + // + repeated string tags = 15; + // + int64 duration = 16; + // + int64 mission_id = 17; + // + int64 order_id = 18; + // + string redirect_url = 19; + // + int64 forward = 20; + // + Rights rights = 21; + // + Author author = 22; + // + Stat stat = 23; + // + string report_result = 24; + // + string dynamic = 25; + // + int64 first_cid = 26; + // + Dimension dimension = 27; + // + repeated StaffInfo staff_info = 28; + // + int64 season_id = 29; + // + repeated DescV2 desc_v2 = 30; + // + bool is_chargeable_season = 31; + // + bool is_blooper = 32; +} + +// +message Author { + // + int64 mid = 1; + // + string name = 2; + // + string face = 3; +} + +// +message Card { + // + AccountCard card = 1; + // + Space space = 2; + // + bool following = 3; + // + int64 archive_count = 4; + // + int32 article_count = 5; + // + int64 follower = 6; +} + +// +message CardLevelInfo { + // + int32 cur = 1; + // + int32 min = 2; + // + int32 now_exp = 3; + // + int32 next_exp = 4; +} + +// +message CardVip { + // + int32 type = 1; + // + string due_remark = 2; + // + int32 access_status = 3; + // + int32 vip_status = 4; + // + string vip_status_warn = 5; + // + int32 theme_type = 6; +} + +message ClickActivitySeasonReq { + // + OrderType order_type = 1; + oneof param { + // + ReserveActivityParam reserve_activity_param = 2; + // + FavSeasonParam fav_season_param = 3; + // + JumpURLParam jump_URL_param = 4; + } + // + string spmid = 5; + // + int64 action = 6; +} + +// +message DescV2 { + // + string raw_text = 1; + // + int64 type = 2; + // + int64 biz_id = 3; +} + +// +message Dimension { + // + int64 width = 1; + // + int64 height = 2; + // + int64 rotate = 3; +} + +// +message FavSeasonParam { + // + int64 season_id = 1; +} + +// +message HotReply { + // + ReplyPage page = 1; + // + repeated Reply replies = 2; +} + +// +message JumpURLParam { + // + string jump_url = 1; +} + +// +message LiveTimeline { + // + string name = 1; + // + int64 start_time = 2; + // + int64 end_time = 3; + // + string cover = 4; + // + string subtitle = 5; + // + string h5_cover = 6; +} + +// +message NameplateInfo { + // + int32 nid = 1; + // + string name = 2; + // + string image = 3; + // + string image_small = 4; + // + string level = 5; + // + string condition = 6; +} + +// +message NoReply {} + +// +message OfficialInfo { + // + int32 role = 1; + // + string title = 2; + // + string desc = 3; +} + +// +message OfficialVerify { + // + int32 type = 1; + // + string desc = 2; +} + +// +message OperationRelate { + // + string title = 1; + // + repeated RelateItem relate_item = 2; + // + repeated Relate ai_relate_item = 3; +} + +// +enum OrderType { + TypeNone = 0; // + TypeOrderActivity = 1; // + TypeFavSeason = 2; // + TypeClick = 3; // +} + +// +message Page { + // + int64 cid = 1; + // + int32 page = 2; + // + string from = 3; + // + string part = 4; + // + int64 duration = 5; + // + string vid = 6; + // + string desc = 7; + // + string weblink = 8; + // + Dimension dimension = 9; +} + +// +message PendantInfo { + // + int32 pid = 1; + // + string name = 2; + // + string image = 3; + // + int64 expire = 4; +} + +// +message ReasonStyle { + // + string text = 1; +} + +// +message Relate { + // + Arc arc = 1; + // + string bvid = 2; + // + int64 season_type = 3; +} + +// +message RelateItem { + // + string url = 1; + // + string cover = 2; +} + +// +message Relation { + // + int64 attribute = 1; + // + int64 special = 3; +} + +// +message Reply { + // + int64 rpid = 1; + // + int64 oid = 2; + // + int32 type = 3; + // + int64 mid = 4; + // + int64 root = 5; + // + int64 parent = 6; + // + int64 dialog = 7; + // + int32 count = 8; + // + int32 rcount = 9; + // + int32 floor = 10; + // + int32 state = 11; + // + int32 fans_grade = 12; + // + int32 attr = 13; + // + int64 ctime = 14; + // + string rpid_str = 15; + // + string root_str = 16; + // + string parent_str = 17; + // + string dialog_str = 18; + // + int32 like = 19; + // + int32 hate = 20; + // + int32 action = 21; + // + ReplyMember member = 22; + // + ReplyContent content = 23; + // + repeated Reply replies = 24; + // + int32 assist = 25; + // + ReplyFolder folder = 26; + // + ReplyUpAction up_action = 27; + // + ReplyLabel label = 28; + // + string raw_input = 29; + // + bool show_follow = 30; +} + +// +message ReplyContent { + // + int64 rp_id = 1; + // + string message = 2; + // + ReplyVote vote = 3; + // + repeated string topics = 5; + // + int32 ip = 6; + // + int32 plat = 7; + // + string device = 8; + // + string version = 9; + // + repeated ReplyMemberInfo members = 10; + // + map emote = 11; +} + +// +message ReplyEmote { + // + int64 id = 1; + // + int64 package_id = 2; + // + int64 state = 3; + // + int64 type = 4; + // + int64 attr = 5; + // + string text = 6; + // + string url = 7; + // + ReplyEmoteMeta meta = 8; + // + int64 ctime = 9; + // + int64 mtime = 10; +} + +// +message ReplyEmoteMeta { + // + ReplyEmoteMetaSize size = 1; +} + +// +enum ReplyEmoteMetaSize { + EMOTE_META_SIZE_UNSPECIFIED = 0; // + EMOTE_META_SIZE_SMALL = 1; // + EMOTE_META_SIZE_BIG = 2; // +} + +// +message ReplyFansDetail { + // + int64 uid = 1; + // + int32 medal_id = 2; + // + string medal_name = 3; + // + int32 score = 4; + // + int32 level = 5; + // + int32 intimacy = 6; + // + int32 status = 7; + // + int32 received = 8; +} + +// +message ReplyFolder { + // + bool has_folded = 1; + // + bool is_folded = 2; + // + string rule = 3; +} + +// +message ReplyLabel { + // + int64 rpid = 1; + // + string content = 2; + // + string text_color = 3; + // + string text_color_night_mode = 4; + // + string bg_color = 5; + // + string bg_color_night_mode = 6; + // + string link = 7; + // + string position = 8; +} + +// +message ReplyLevelInfo { + // + int32 cur = 1; + // + int32 min = 2; + // + int32 now_exp = 3; + // + int32 next_exp = 4; +} + +// +message ReplyMember { + // + ReplyMemberInfo info = 1; + // + ReplyFansDetail fans_detail = 2; + // + int32 following = 3; +} + +// +message ReplyMemberInfo { + // + int32 role = 1; + // + string mid = 2; + // + string name = 3; + // + string sex = 4; + // + string sign = 5; + // + string avatar = 6; + // + string rank = 7; + // + string display_rank = 8; + // + ReplyLevelInfo level_info = 9; + // + PendantInfo pendant = 10; + // + NameplateInfo nameplate = 11; + // + OfficialVerify official_verify = 12; + // + ReplyVip vip = 13; +} + +// +message ReplyPage { + // + int64 acount = 1; + // + int64 count = 2; + // + int64 num = 3; + // + int64 size = 4; +} + +// +message ReplyUpAction { + // + bool like = 1; + // + bool reply = 2; +} + +// +message ReplyVip { + // + int32 type = 1; + // + int64 due_date = 2; + // + string due_remark = 3; + // + int32 access_status = 4; + // + int32 vip_status = 5; + // + string vip_status_warn = 6; + // + int32 theme_type = 7; + // + VipLabel label = 8; +} + +// +message ReplyVote { + // + int64 id = 1; + // + string title = 2; + // + int32 cnt = 3; + // + string desc = 4; + // + bool deleted = 5; +} + +// +message ReqUser { + // + bool favorite = 1; + // + bool like = 2; + // + bool dislike = 3; + // + int64 multiply = 4; +} + +// +message ReserveActivityParam { + // + int64 reserve_id = 1; + // + string from = 2; + // + string type = 3; + // + int64 oid = 4; +} + +// +message Rights { + // + int32 bp = 1; + // + int32 elec = 2; + // + int32 download = 3; + // + int32 movie = 4; + // + int32 pay = 5; + // + int32 hd5 = 6; + // + int32 no_reprint = 7; + // + int32 autoplay = 8; + // + int32 ugc_pay = 9; + // + int32 is_cooperation = 10; + // + int32 ugc_pay_preview = 11; + // + int32 arc_pay = 12; + // + int32 free_watch = 13; +} + +// +message SeasonEpisode { + // + int64 season_id = 1; + // + int64 section_id = 2; + // + int64 id = 3; + // + int64 aid = 4; + // + int64 cid = 5; + // + string title = 6; + // + int64 attribute = 7; + // + Arc arc = 8; + // + Page page = 9; + // + string bvid = 10; + // + ReasonStyle badge_style = 11; +} + +// +message SeasonSection { + // + int64 season_id = 1; + // + int64 id = 2; + // + string title = 3; + // + int64 type = 4; + // + repeated SeasonEpisode episodes = 5; +} + +// +message SeasonStat { + // + int64 season_id = 1; + // + int32 view = 2; + // + int32 danmaku = 3; + // + int32 reply = 4; + // + int32 fav = 5; + // + int32 coin = 6; + // + int32 share = 7; + // + int32 now_rank = 8; + // + int32 his_rank = 9; + // + int32 like = 10; +} + +// +message Space { + // + string s_img = 1; + // + string l_img = 2; +} + +// +message Staff { + // + int64 mid = 1; + // + string title = 2; + // + string name = 3; + // + string face = 4; + // + VipInfo vip = 5; + // + OfficialInfo official = 6; + // + int64 follower = 7; + // + int32 label_style = 8; + // + Relation relation = 9; +} + +// +message StaffInfo { + // + int64 mid = 1; + // + string title = 2; +} + +// +message Stat { + // + int64 aid = 1; + // + int32 view = 2; + // + int32 danmaku = 3; + // + int32 reply = 4; + // + int32 fav = 5; + // + int32 coin = 6; + // + int32 share = 7; + // + int32 now_rank = 8; + // + int32 his_rank = 9; + // + int32 like = 10; + // + int32 dislike = 11; + // + string evaluation = 12; + // + string argue_msg = 13; +} + +// +message Subtitle { + // + bool allow_submit = 1; + // + repeated SubtitleItem list = 2; +} + +// +message SubtitleItem { + // + int64 id = 1; + // + string lan = 2; + // + string lan_doc = 3; + // + bool is_lock = 4; + // + int64 author_mid = 5; + // + string subtitle_url = 6; + // + AccInfo author = 7; +} + +// +message Tag { + // + int64 id = 1; + // + string name = 2; + // + string cover = 3; + // + string head_cover = 4; + // + string content = 5; + // + string short_content = 6; + // + int32 type = 7; + // + int32 state = 8; + // + int64 ctime = 9; + // + TagCount tag_count = 10; + // + int32 is_atten = 11; + // + int64 likes = 12; + // + int64 hates = 13; + // + int32 attribute = 14; + // + int32 liked = 15; + // + int32 hated = 16; +} + +// +message TagCount { + // + int64 view = 1; + // + int64 use = 2; + // + int64 atten = 3; +} + +// +message UGCPayAsset { + // + int64 price = 1; + // + map platform_price = 2; +} + +// +message UGCSeason { + // + int64 id = 1; + // + string title = 2; + // + string cover = 3; + // + int64 mid = 4; + // + string intro = 5; + // + int32 sign_state = 6; + // + int64 attribute = 7; + // + repeated SeasonSection sections = 8; + // + SeasonStat stat = 9; + // + int64 ep_count = 10; + // + int64 season_type = 11; + // + bool is_pay_season = 12; +} + +// +message View { + // + Arc arc = 1; + // + bool no_cache = 2; + // + repeated Page pages = 3; + // + Subtitle subtitle = 4; + // + UGCPayAsset asset = 5; + // + ViewLabel label = 6; + // + repeated Staff staff = 7; + // + UGCSeason ugc_season = 8; + // + int64 stein_guide_cid = 9; +} + +// +message ViewDetailReply { + // + View view = 1; + // + Card card = 2; + // + repeated Tag tags = 3; + // + HotReply reply = 4; + // + repeated Arc related = 5; +} + +// +message ViewDetailReq { + // + int64 aid = 1; + // + string bvid = 2; +} + +// +message ViewLabel { + // + int64 type = 1; +} + +// +message VipInfo { + // + int32 type = 1; + // + int32 status = 2; + // + int32 vip_pay_type = 3; + // + int32 theme_type = 4; +} + +// +message VipLabel { + // + string path = 1; +} From 57ced69c4eade333e605fdd43ef789e7bc041917 Mon Sep 17 00:00:00 2001 From: XiaoMiku01 Date: Tue, 28 Mar 2023 09:11:42 +0800 Subject: [PATCH 002/159] =?UTF-8?q?[gRpc]=20=E6=9B=B4=E6=96=B0=E5=8C=85?= =?UTF-8?q?=E5=90=8D=20`interface`=20->=20`interfaces`=20(#634)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 增加新版动态点赞转发列表接口 * 更新包名 `interface` -> `interfaces` --- grpc_api/bilibili/app/interfaces/v1/history.proto | 2 +- grpc_api/bilibili/app/interfaces/v1/media.proto | 2 +- grpc_api/bilibili/app/interfaces/v1/search.proto | 2 +- grpc_api/bilibili/app/interfaces/v1/space.proto | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grpc_api/bilibili/app/interfaces/v1/history.proto b/grpc_api/bilibili/app/interfaces/v1/history.proto index 3723963..7690cac 100644 --- a/grpc_api/bilibili/app/interfaces/v1/history.proto +++ b/grpc_api/bilibili/app/interfaces/v1/history.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.app.interface.v1; +package bilibili.app.interfaces.v1; import "bilibili/app/archive/middleware/v1/preload.proto"; diff --git a/grpc_api/bilibili/app/interfaces/v1/media.proto b/grpc_api/bilibili/app/interfaces/v1/media.proto index 440430a..ca90359 100644 --- a/grpc_api/bilibili/app/interfaces/v1/media.proto +++ b/grpc_api/bilibili/app/interfaces/v1/media.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.app.interface.v1; +package bilibili.app.interfaces.v1; // service Media { diff --git a/grpc_api/bilibili/app/interfaces/v1/search.proto b/grpc_api/bilibili/app/interfaces/v1/search.proto index 1654c54..75459da 100644 --- a/grpc_api/bilibili/app/interfaces/v1/search.proto +++ b/grpc_api/bilibili/app/interfaces/v1/search.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.app.interface.v1; +package bilibili.app.interfaces.v1; // 搜索 service Search { diff --git a/grpc_api/bilibili/app/interfaces/v1/space.proto b/grpc_api/bilibili/app/interfaces/v1/space.proto index 236dca3..65f6c0b 100644 --- a/grpc_api/bilibili/app/interfaces/v1/space.proto +++ b/grpc_api/bilibili/app/interfaces/v1/space.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.app.interface.v1; +package bilibili.app.interfaces.v1; import "bilibili/app/archive/middleware/v1/preload.proto"; import "bilibili/app/archive/v1/archive.proto"; From 1bafdf0c0c19ec42ecd97461b7723289afc18f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fa=E9=B8=BD?= <43724908+Akarinnnnn@users.noreply.github.com> Date: Tue, 28 Mar 2023 09:12:51 +0800 Subject: [PATCH 003/159] Update message_stream.md (#638) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SUPER_CHAT_MESSAGE.message_trans为sc机翻 --- docs/live/message_stream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/live/message_stream.md b/docs/live/message_stream.md index 6ed7487..dc97599 100644 --- a/docs/live/message_stream.md +++ b/docs/live/message_stream.md @@ -604,7 +604,7 @@ data字段 | medal_info | obj | SC发送用户佩戴的粉丝牌信息 | | | message | str | sc内容 | | | message_font_color | str | SC文本颜色 | | -| message_trans | str | 待调查 | | +| message_trans | str | 机翻sc内容 | | | price | num | sc金额 | | | rate | num | 待调查 | | | start_time | num | 待调查 | | From 78a42e0c76b072ae7d376a8d1c8f093cc5d771d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AF=92=E5=BD=A4?= <70561268+cxw620@users.noreply.github.com> Date: Tue, 28 Mar 2023 11:29:01 +0300 Subject: [PATCH 004/159] add detailed appkey info (#641) --- docs/other/API_sign.md | 66 +++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/docs/other/API_sign.md b/docs/other/API_sign.md index 0549011..7824f97 100644 --- a/docs/other/API_sign.md +++ b/docs/other/API_sign.md @@ -1,13 +1,15 @@ # API 签名与鉴权 -部分客户端专用的 rest api 存在基于 sign 的鉴权,需要使用规定的`appkey`及其对应的`appsec`与原始请求参数进行签名计算 +部分客户端专用的 RESTful API 存在基于 sign 的鉴权,需要使用规定的`appkey`及其对应的`appsec`与原始请求参数进行签名计算 -不同`appkey`对应不同的 app (如客户端、概念版、必剪、漫画、bililink等) +不同 `appkey` 对应不同的 app (如客户端、概念版、必剪、漫画、bililink等) -不同平台同 app 也会存在不同的 `appkey`(如安卓端、ios端、TV端等) +不同平台同 app 也会存在不同的 `appkey` (如安卓端、ios端、TV端等) 同平台同 app 下不同功能也会存在不同的 `appkey`(如登录专用、取流专用等) +不同版本的客户端的 `appkey` 也可能不同 + **appkey与appsec一一对应** ## API签名的计算方式 @@ -52,28 +54,40 @@ print(query) {'appkey': '1d8b6e7d45233436', 'id': 114514, 'str': '1919810', 'test': 'いいよ,こいよ', 'sign': '01479cf20504d865519ac50f33ba3a7d'} appkey=1d8b6e7d45233436&id=114514&str=1919810&test=%E3%81%84%E3%81%84%E3%82%88%EF%BC%8C%E3%81%93%E3%81%84%E3%82%88&sign=01479cf20504d865519ac50f33ba3a7d ``` +## 已知的APPKEY/APPSEC, 及部分参数信息 -## 已知的APPKey +| APPKEY | APPSEC | platform2 | APP类型 | neuronAppId1 | mobi_app2 | 备注 | +|:--:|:--:|:--:|:--:|:--:|:--:|:--:| +| 9d5889cf67e615cd | 8fd9bb32efea8cef801fd895bef2713d | `android` | Ai4cCreatorAndroid | +| 1d8b6e7d45233436 | 560c52ccd288fed045859ed18bffd973 | `android` | 普通版(粉版) | `1` |`android`| 获取资源通用 | +| 783bbb7264451d82 | 2653583c8873dea268ab9386918b1d65 | `android` | 普通版(粉版) | `1` | `android` | 仅获取用户信息时使用(7.X及更新版本) | +| 57263273bc6b67f6 | a0488e488d1567960d3a765e8d129f90 | `android` | 普通版(粉版) | `1` |`android`| 可能来自旧版 | +| 07da50c9a0bf829f | 25bdede4e1581c836cab73a48790ca6e | `android` | 概念版(蓝版) | `3` | `android_b` | +| 191c3b6b975af184 | ******************************** | `android` | 概念版(蓝版) | `3` | `android_b` | 新出现, 仅获取用户信息时使用. 暂未知appsec | +| 178cf125136ca8ea | 34381a26236dd1171185c0beb042e1c6 | `android` | 概念版(蓝版) | `3` | `android_b` | 可能来自旧版 | +| 7d336ec01856996b | a1ce6983bc89e20a36c37f40c4f1a0dd | `android` | 概念版(蓝版) | `3` | `android_b` | 可能来自旧版 | +| dfca71928277209b | b5475a8825547a4fc26c7d518eaaa02e | `android` | HD版 | `5` | `android_hd` | +| bb3101000e232e27 | 36efcfed79309338ced0380abd824ac1 | `android` | play版(国际版) | `14` | `android_i` | +| ae57252b0c09105d | c75875c596a69eb55bd119e74b07cfe3 | `android` | play版(国际版) | `14` | `android_i` | 仅获取用户信息时使用(7.X及更新版本) | +| 8e16697a1b4f8121 | f5dd03b752426f2e623d7badb28d190a | `android` | play版(国际版) | `14` | `android_i` | 可能来自旧版 | +| 7d089525d3611b1c | acd495b248ec528c2eed1e862d393126 | `android` | 东南亚版 | `30` | `bstar_a` | +| iVGUTjsxvpLeuDCf | aHRmhWMLkdeMuILqORnYZocwMBpMEOdt | `android` | - | - | - | 视频取流专用, 仅5.X旧版使用 | +| YvirImLGlLANCLvM | JNlZNgfNGKZEpaDTkCdPQVXntXhuiJEM | `ios` | - | - | - | 视频取流专用 | +| 27eb53fc9058f8c3 | c2ed53a74eeefe3cf99fbd01d8c9c375 | `web`/`ios`? | - | - | - | 第三方授权使用 | +| 84956560bc028eb7 | 94aba54af9065f71de72f5508f1cd42e | ? | UWP版 | - | - | 部分API不接受此appkey, 返回-663错误 | +| 85eb6835b0a1034e | 2ad42749773c441109bdc0191257a664 | ? | UWP版? | - | - | 部分API不接受此appkey, 返回-663错误 | +| 4ebafd7c4951b366 | 8cb98205e9b2ad3669aad0fce12a4c13 | `ios` | iPhone客户端? | `iphone` | ? | +| 8d23902c1688a798 | 710f0212e62bd499b8d3ac6e1db9302a | `android` | AndroidBiliThings | ? | ? | +| 4c6e1021617d40d9 | e559a59044eb2701b7a8628c86aa12ae | `android` | AndroidMallTicket | ? | ? | +| c034e8b74130a886 | e4e8966b1e71847dc4a3830f2d078523 | `android` | AndroidOttSdk | `7` | ? | +| 4409e2ce8ffd12b8 | 59b43e04ad6965f34319062b478f83dd | `android` | 云视听小电视(TV版) | `9`? | `android_tv_yst`? | +| 37207f2beaebf8d7 | e988e794d4d4b6dd43bc0e89d6e90c43 | `android` | BiliLink | ? | ? | +| 9a75abf7de2d8947 | 35ca1c82be6c2c242ecc04d88c735f31 | `android` | BiliScan | ? | ? | +| aae92bc66f3edfab | af125a0d5279fd576c1b4418a3e8276d | ? | PC 投稿工具 | - | ? | +| bca7e84c2d947ac6 | 60698ba2f68e01ce44738920a0ffe768 | ? | login | - | ? | -| appkey | appsec(sign盐值) | 平台 | 应用 | 备注 | -|------------------|----------------------------------|-----|----------|------| -| 07da50c9a0bf829f | 25bdede4e1581c836cab73a48790ca6e | 安卓 | 概念版 | | -| 1d8b6e7d45233436 | 560c52ccd288fed045859ed18bffd973 | 安卓 | 客户端 | 一般用途 | -| 178cf125136ca8ea | 34381a26236dd1171185c0beb042e1c6 | 安卓 | 概念版 | | -| 27eb53fc9058f8c3 | c2ed53a74eeefe3cf99fbd01d8c9c375 | ios | 客户端 | 一般用途 | -| 37207f2beaebf8d7 | e988e794d4d4b6dd43bc0e89d6e90c43 | 安卓 | biliLink | | -| 4409e2ce8ffd12b8 | 59b43e04ad6965f34319062b478f83dd | TV | 客户端 | | -| 57263273bc6b67f6 | a0488e488d1567960d3a765e8d129f90 | 安卓 | 客户端 | | -| 8d23902c1688a798 | 710f0212e62bd499b8d3ac6e1db9302a | 安卓 | 车机版 | | -| 5dce947fe22167f9 | | 安卓 | 必剪 | | -| 7d336ec01856996b | a1ce6983bc89e20a36c37f40c4f1a0dd | 安卓 | 概念版 | | -| 85eb6835b0a1034e | 2ad42749773c441109bdc0191257a664 | | | | -| 8e16697a1b4f8121 | f5dd03b752426f2e623d7badb28d190a | 安卓 | 国际版 | | -| aae92bc66f3edfab | af125a0d5279fd576c1b4418a3e8276d | PC | 投稿工具 | | -| ae57252b0c09105d | c75875c596a69eb55bd119e74b07cfe3 | 安卓 | 国际版 | | -| bb3101000e232e27 | 36efcfed79309338ced0380abd824ac1 | 安卓 | 国际版 | | -| bca7e84c2d947ac6 | 60698ba2f68e01ce44738920a0ffe768 | 安卓 | 客户端 | 登录专用 | -| cc578d267072c94d | ffb6bb4c4edae2566584dbcacfc6a6ad | 安卓 | 轻视频 | | -| cc8617fd6961e070 | 3131924b941aac971e45189f265262be | 安卓 | 漫画 | | -| iVGUTjsxvpLeuDCf | aHRmhWMLkdeMuILqORnYZocwMBpMEOdt | 安卓 | 客户端 | 取流专用 | -| YvirImLGlLANCLvM | JNlZNgfNGKZEpaDTkCdPQVXntXhuiJEM | ios | 客户端 | 取流专用 | +注释: + +1 `neuronAppId`, 产品编号,由数据平台分配,粉=1,白=2,蓝=3,直播姬=4,HD=5,海外=6,OTT=7,漫画=8,TV野版=9,小视频=10,网易漫画=11,网易漫画lite=12,网易漫画HD=13, 国际版=14. + +2 `platform`, `mobi_app` 仅供参考, 具体值需要抓包确定. From 65da316b48edb83f6832b038ca393061b912f387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AF=92=E5=BD=A4?= <70561268+cxw620@users.noreply.github.com> Date: Wed, 29 Mar 2023 00:28:46 +0000 Subject: [PATCH 005/159] add: new united view grpc interface (#644) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add: new united view grpc interface * add: 补全proto --- .../bilibili/account/fission/v1/fission.proto | 126 ++-- grpc_api/bilibili/api/probe/v1/probe.proto | 330 ++++++----- .../bilibili/app/click/v1/heartbeat.proto | 121 ++++ .../v1/{playurl.proto => playerunite.proto} | 0 .../app/show/mixture/v1/mixture.proto | 53 ++ .../bilibili/app/viewunite/pgcanymodel.proto | 11 + .../bilibili/app/viewunite/ugcanymodel.proto | 10 + .../bilibili/app/viewunite/v1/viewunite.proto | 539 ++++++++++++++++++ grpc_api/bilibili/render/render.proto | 18 +- 9 files changed, 1007 insertions(+), 201 deletions(-) create mode 100644 grpc_api/bilibili/app/click/v1/heartbeat.proto rename grpc_api/bilibili/app/playerunite/v1/{playurl.proto => playerunite.proto} (100%) create mode 100644 grpc_api/bilibili/app/show/mixture/v1/mixture.proto create mode 100644 grpc_api/bilibili/app/viewunite/pgcanymodel.proto create mode 100644 grpc_api/bilibili/app/viewunite/ugcanymodel.proto create mode 100644 grpc_api/bilibili/app/viewunite/v1/viewunite.proto diff --git a/grpc_api/bilibili/account/fission/v1/fission.proto b/grpc_api/bilibili/account/fission/v1/fission.proto index 18eca65..051d6b7 100644 --- a/grpc_api/bilibili/account/fission/v1/fission.proto +++ b/grpc_api/bilibili/account/fission/v1/fission.proto @@ -1,62 +1,64 @@ -syntax = "proto3"; - -package bilibili.account.fission.v1; - -// Fission裂变 -service Fission { - // 活动入口 - rpc Entrance (EntranceReq) returns (EntranceReply); - // 首页弹窗 - rpc Window (WindowReq) returns (WindowReply); - // - rpc Privacy(PrivacyReq) returns (PrivacyReply); -} - -// 动画效果 -message AnimateIcon { - // icon文件 - string icon = 1; - // 动效json文件 - string json = 2; -} - -// 活动入口-响应 -message EntranceReply { - // 展示图标 - string icon = 1; - // 活动名称 - string name = 2; - // 活动跳转链接 - string url = 3; - // 动画效果 - AnimateIcon animate_icon = 4; -} - -// 活动入口-请求 -message EntranceReq {} - -// -message PrivacyReply { - // - string message = 1; -} - -// -message PrivacyReq { - // - string activity_uid = 1; -} - -//首页弹窗-响应 -message WindowReply { - // 弹窗类型 - // 0:弹窗 1:普通页面 - int32 type = 1; - // 跳转链接 - string url = 2; - // 上报数据字段 - string report_data = 3; -} - -// 首页弹窗-请求 -message WindowReq {} \ No newline at end of file +syntax = "proto3"; + +package bilibili.account.fission.v1; + +// Fission裂变 +service Fission { + // 活动入口 + rpc Entrance (EntranceReq) returns (EntranceReply); + // 首页弹窗 + rpc Window (WindowReq) returns (WindowReply); + // + rpc Privacy (PrivacyReq) returns (PrivacyReply); +} + +// 动画效果 +message AnimateIcon { + // icon文件 + string icon = 1; + // 动效json文件 + string json = 2; +} + +// 活动入口-响应 +message EntranceReply { + // 展示图标 + string icon = 1; + // 活动名称 + string name = 2; + // 活动跳转链接 + string url = 3; + // 动画效果 + AnimateIcon animate_icon = 4; +} + +// 活动入口-请求 +message EntranceReq {} + +// +message PrivacyReply { + // + string message = 1; +} + +// +message PrivacyReq { + // + string activity_uid = 1; +} + +//首页弹窗-响应 +message WindowReply { + // 弹窗类型 + // 0:弹窗 1:普通页面 + int32 type = 1; + // 跳转链接 + string url = 2; + // 上报数据字段 + string report_data = 3; +} + +// 首页弹窗-请求 +message WindowReq { + +} \ No newline at end of file diff --git a/grpc_api/bilibili/api/probe/v1/probe.proto b/grpc_api/bilibili/api/probe/v1/probe.proto index eb3c2ec..93ff315 100644 --- a/grpc_api/bilibili/api/probe/v1/probe.proto +++ b/grpc_api/bilibili/api/probe/v1/probe.proto @@ -1,138 +1,192 @@ -syntax = "proto3"; - -package bilibili.api.probe.v1; - -// -service Probe { - // - rpc TestCode (CodeReq) returns (CodeReply); - // - rpc TestReq (ProbeReq) returns (ProbeReply); - // - rpc TestStream (ProbeStreamReq) returns (ProbeStreamReply); - // - rpc TestSub (ProbeSubReq) returns (ProbeSubReply); -} - -// -enum Category { - CATEGORY_UNSPECIFIED = 0; // - CATEGORY_ONE = 1; // - CATEGORY_TWO = 2; // - CATEGORY_THREE = 3; // -} - -// -message CodeReply {} - -// -message CodeReq { - // - int64 code = 1; -} - -// -message DynamicMessageUpdate { - // - SimpleMessage body = 1; -} - -// -message Embedded { - // - bool bool_val = 1; - // - int32 int32_val = 2; - // - int64 int64_val = 3; - // - float float_val = 4; - // - double double_val = 5; - // - string string_val = 6; - // - repeated int32 repeated_int32_val = 8; - // - repeated string repeated_string_val = 12; - // - map map_string_val = 13; - // - map map_error_val = 14; -} - -// -message ErrorMessage { - // - int64 code = 1; - // - string reason = 2; - // - string message = 3; -} - -// -enum ErrorReason { - PROBE_UNSPECIFIED = 0; // - PROBE_CATEGORY_NOTFOUND = 1; // -} - -// -message ProbeReply { - // - string content = 1; - // - int64 timestamp = 2; -} - -// -message ProbeReq { - // - int64 mid = 1; - // - string buvid = 2; -} - -// -message ProbeStreamReply { - // - int64 sequence = 1; - // - int64 timestamp = 2; - // - string content = 3; -} - -// -message ProbeStreamReq { - // - int64 mid = 1; - // - int64 sequence = 2; -} - -// -message ProbeSubReply { - // - int64 message_id = 1; -} - -// -message ProbeSubReq { - // - int64 buvid = 1; -} - -// -message SimpleMessage { - // - int32 id = 1; - // - int64 num = 2; - // - string lang = 3; - // - int32 cate = 4; - // - Embedded embedded = 5; -} +syntax = "proto3"; + +package bilibili.api.probe.v1; + +// 服务可用性探针 +service Probe { + // + rpc TestCode (CodeReq) returns (CodeReply); + // + rpc TestReq (ProbeReq) returns (ProbeReply); + // + rpc TestStream (ProbeStreamReq) returns (ProbeStreamReply); + // + rpc TestSub (ProbeSubReq) returns (ProbeSubReply); +} + +// 服务可用性探针 +service ProbeService { + // + rpc Echo(SimpleMessage) returns (SimpleMessage); + // + rpc EchoBody(SimpleMessage) returns (SimpleMessage); + // + rpc EchoDelete(SimpleMessage) returns (SimpleMessage); + // + rpc EchoError(ErrorMessage) returns (ErrorMessage); + // + rpc EchoPatch(DynamicMessageUpdate) returns (DynamicMessageUpdate); +} + +// +enum Category { + CATEGORY_UNSPECIFIED = 0; // + CATEGORY_ONE = 1; // + CATEGORY_TWO = 2; // + CATEGORY_THREE = 3; // + CATEGORY_FOUR = 4; // +} + +// +message CodeReply { + // + string id = 1; + // + string id1 = 2; + // + int64 code = 3; + // + string message_s = 4; +} + +// +message CodeReq { + // + int64 code = 1; +} + +// +message CreateTopic { + // + int64 id = 1; +} + +// +message CreatTask { + // + string task = 1; +} + +// +message DynamicMessageUpdate { + // + SimpleMessage body = 1; +} + +// +message Embedded { + // + bool bool_val = 1; + // + int32 int32_val = 2; + // + int64 int64_val = 3; + // + float float_val = 4; + // + double double_val = 5; + // + string string_val = 6; + // + repeated bool repeated_bool_val = 7; + // + repeated int32 repeated_int32_val = 8; + // + repeated int64 repeated_int64_val = 9; + // + repeated float repeated_float_val = 10; + // + repeated double repeated_double_val = 11; + // + repeated string repeated_string_val = 12; + // + map map_string_val = 13; + // + map map_error_val = 14; +} + +// +message ErrorMessage { + // + int64 code = 1; + // + string reason = 2; + // + string message = 3; +} + +// Deprecated +enum ErrorReason { + PROBE_UNSPECIFIED = 0; // + PROBE_CATEGORY_NOTFOUND = 1; // +} + +// +message ProbeReply { + // + string content = 1; + // + int64 timestamp = 2; +} + +// +message ProbeReq { + // + int64 mid = 1; + // + string buvid = 2; +} + +// +message ProbeStreamReply { + // + int64 sequence = 1; + // + int64 timestamp = 2; + // + string content = 3; +} + +// +message ProbeStreamReq { + // + int64 mid = 1; + // + int64 sequence = 2; +} + +// +message ProbeSubReply { + // + int64 message_id = 1; +} + +// +message ProbeSubReq { + // + string buvid = 1; +} + +// +message SimpleMessage { + // + int32 id = 1; + // + int64 num = 2; + // + string lang = 3; + // + int32 cate = 4; + // + Embedded embedded = 5; +} + +// +message Task { + // + string name = 1; + // + string author = 2; + // + bool cache = 3; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/click/v1/heartbeat.proto b/grpc_api/bilibili/app/click/v1/heartbeat.proto new file mode 100644 index 0000000..f89e82f --- /dev/null +++ b/grpc_api/bilibili/app/click/v1/heartbeat.proto @@ -0,0 +1,121 @@ +syntax = "proto3"; + +package bilibili.app.click.v1; + +service Click { + +} + +// 账户信息 +message AccountInfo { + // + uint64 mid = 1; +} + +// +message AppInfo { + // + string top_page_class = 1; + // 客户端首次启动时的毫秒时间戳 + int64 ftime = 2; + // + string did = 3; +} + +// 心跳补充信息 +message Extra { + // + string session = 1; + // + string refer = 2; +} + +message HeartBeatReply {} + +// +message HeartBeatReq { + // + string session_v2 = 1; + // + Stage stage = 2; + // 流加载失败timeout + uint64 stream_timeout = 3; + // + uint64 batch_frequency = 4; + // + float frequency = 5; + // + VideoMeta video_meta = 6; + // + AppInfo app_info = 7; + // + AccountInfo account_info = 8; + // + PreProcessResult pre_process_result = 9; + // + repeated PlayerStatus player_status = 10; + // + VideoInfo video_info = 11; +} + +// +message PlayerStatus { + // + float playback_rate = 1; + // + uint64 progress = 2; + // + PlayState play_state = 3; + // + bool is_buffering = 4; +} + +// +enum PlayState { + // + STATE_UNKNOWN = 0; + // + PREPARING = 1; + // + PREPARED = 2; + // + PLAYING = 3; + // + PAUSED = 4; + // + STOPPED = 5; + // + FAILED = 6; +} + +// +message PreProcessResult { + // + int64 vt = 1; +} + +// +enum Stage { + // + STAGE_UNKNOWN = 0; + // + START = 1; + // + END = 2; + // + SAMPLE = 3; +} + +// +message VideoInfo { + // + uint64 cid_duration = 1; +} + +// +message VideoMeta { + // + uint64 aid = 1; + // + uint64 cid = 2; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/playerunite/v1/playurl.proto b/grpc_api/bilibili/app/playerunite/v1/playerunite.proto similarity index 100% rename from grpc_api/bilibili/app/playerunite/v1/playurl.proto rename to grpc_api/bilibili/app/playerunite/v1/playerunite.proto diff --git a/grpc_api/bilibili/app/show/mixture/v1/mixture.proto b/grpc_api/bilibili/app/show/mixture/v1/mixture.proto new file mode 100644 index 0000000..1e13127 --- /dev/null +++ b/grpc_api/bilibili/app/show/mixture/v1/mixture.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; + +package bilibili.app.show.mixture.v1; + +// +service Mixture { + // + rpc Widget(WidgetReq) returns (WidgetReply); +} + +// +message RcmdReason { + // + string content = 1; + // + uint32 corner_mark = 2; +} + +// +message WidgetItem { + // + string cover = 1; + // + string view = 2; + // + RcmdReason rcmd_reason = 3; + // + string title = 4; + // + string name = 5; + // + string uri = 6; + // + string goto = 7; + // + int64 id = 8; + // + int32 view_icon = 9; +} + +// +message WidgetReply { + // + repeated WidgetItem item = 1; +} + +// +message WidgetReq { + // + string from_spmid = 1; + // + uint32 page_no = 2; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/viewunite/pgcanymodel.proto b/grpc_api/bilibili/app/viewunite/pgcanymodel.proto new file mode 100644 index 0000000..99334a5 --- /dev/null +++ b/grpc_api/bilibili/app/viewunite/pgcanymodel.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package bilibili.app.viewunite.pgcanymodel; + +// +message ViewPgcAny { + // + uint64 season_id = 1; + // + int32 season_type = 2; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/viewunite/ugcanymodel.proto b/grpc_api/bilibili/app/viewunite/ugcanymodel.proto new file mode 100644 index 0000000..0b671f9 --- /dev/null +++ b/grpc_api/bilibili/app/viewunite/ugcanymodel.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package bilibili.app.viewunite.ugcanymodel; + +// +message ViewUgcAny { + +} + +// \ No newline at end of file diff --git a/grpc_api/bilibili/app/viewunite/v1/viewunite.proto b/grpc_api/bilibili/app/viewunite/v1/viewunite.proto new file mode 100644 index 0000000..81276c8 --- /dev/null +++ b/grpc_api/bilibili/app/viewunite/v1/viewunite.proto @@ -0,0 +1,539 @@ +syntax = "proto3"; + +package bilibili.app.viewunite.v1; + +import "bilibili/app/archive/middleware/v1/preload.proto"; + +import "google/protobuf/any.proto"; + +// 统一视频信息接口(7.23启用) +service View { + // + rpc View(ViewRequest) returns (ViewReply); + // + rpc ViewProgress(ViewProgressRequest) returns (ViewProgressReply); +} + +// 业务类型 +enum ArcType { + // + UNKNOWN = 0; + // + PAGES = 1; + // + SERIES = 2; + // + POSITIVE = 3; + // + SECTION = 4; + // + RELATE = 5; + // + PUGV = 6; +} + +// +message AttentionCard { + // + repeated ShowTime show_time = 1; +} + +// +message BadgeType { + // + string text = 1; + // + string text_color = 2; + // + string text_color_night = 3; + // + string bg_color = 4; + // + string bg_color_night = 5; + // + string border_color = 6; + // + string border_color_night = 7; + // + int32 bg_style = 8; +} + +// +message BizFollowVideoParam { + // + int64 season_id = 1; +} + +// +message BizJumpLinkParam { + // + string url = 1; +} + +// +message BizReserveActivityParam { + // + int64 activity_id = 1; + // + string from = 2; + // + string type = 3; + // + int64 oid = 4; + // + int64 reserve_id = 5; +} + +// +message BizReserveGameParam { + // + int64 game_id = 1; +} + +// +enum BizType { + // + BizTypeNone = 0; + // + BizTypeFollowVideo = 1; + // + BizTypeReserveActivity = 2; + // + BizTypeJumpLink = 3; + // + BizTypeFavSeason = 4; + // + BizTypeReserveGame = 5; +} + +// +message Chronos { + // + string md5 = 1; + // + string file = 2; + // + string sign = 3; +} + +// +message ChronosParam { + // + string engine_version = 1; + // + string message_protocol = 2; + // + string service_key = 3; +} + +// +message CommandDm { + // + int64 id = 1; + // + int64 oid = 2; + // + int64 mid = 3; + // + string command = 4; + // + string content = 5; + // + int32 progress = 6; + // + string ctime = 7; + // + string mtime = 8; + // + string extra = 9; + // + string id_str = 10; +} + +// 视频播放时弹出的卡片 +message ContractCard { + // 在第几秒弹出 + float display_progress = 1; + // + int64 display_accuracy = 2; + // 弹出后停留的时间 + int64 display_duration = 3; + // 展示方式, 暂未知对应关系 + int32 show_mode = 4; + // 页面类型, 暂未知对应关系 + int32 page_type = 5; + // + UpperInfos upper = 6; + // + int32 is_follow_display = 7; + // 卡片的文字说明信息 + ContractText text = 8; + // + int64 follow_display_end_duration = 9; + // + int32 is_play_display = 10; + // + int32 is_interact_display = 11; +} + +// 视频播放时弹出的卡片的文字说明信息 +message ContractText { + // + string title = 1; + // + string subtitle = 2; + // + string inline_title = 3; +} + +// +message Dimension { + // + int64 width = 1; + // + int64 height = 2; + // + int64 rotate = 3; +} + +// +message DmResource { + // + repeated CommandDm command_dms = 1; + // + AttentionCard attention = 2; + // + repeated OperationCard cards = 3; +} + +// 素材详情 +message Material { + // + string icon = 1; + // + string text = 2; + // + string url = 3; + // + MaterialBizType type = 4; + // + string param = 5; + // + string static_icon = 6; + // + string bg_color = 7; + // + string bg_pic = 8; + // + int32 jump_type = 9; + // + PageType page_type = 10; + // + bool need_login = 11; +} + +// 素材类型 +enum MaterialBizType { + // + NONE = 0; + // + ACTIVITY = 1; + // + BGM = 2; + // + EFFECT = 3; + // + SHOOT_SAME = 4; + // + SHOOT_TOGETHER = 5; + // + ACTIVITY_ICON = 6; + // + NEW_BGM = 7; +} + +// 素材来源 +enum MaterialSource { + // + UNKNOWN = 0; + // 必剪素材 + BIJIAN = 1; +} + +// +message OperationCard { + // + int64 id = 1; + // + int32 from = 2; + // + int32 to = 3; + // + bool status = 4; + // + BizType biz_type = 5; + // + OperationCardContent content = 6; + // + BizFollowVideoParam follow = 7; + // + BizReserveActivityParam reserve = 8; + // + BizJumpLinkParam jump = 9; + // + BizReserveGameParam game = 10; +} + +// +message OperationCardContent { + // + string title = 1; + // + string subtitle = 2; + // + string icon = 3; + // + string button_title = 4; + // + string button_selected_title = 5; + // + bool show_selected = 6; +} + +// +enum PageCategory { + // + COMMON_PAGE = 0; + // + ACTIVITY_PAGE = 1; +} + +// 页面类型 +enum PageType { + // H5页面(Webview) + H5 = 0; + // 原生页面(native) + NA = 1; +} + +// 播放策略 +message PlayStrategy { + // + repeated string strategies = 1; + // + int32 recommend_show_strategy = 2; + // 自动播放时的提示语 + string auto_play_toast = 3; +} + +// +message PointMaterial { + // + string url = 1; + // + MaterialSource material_source = 2; +} + +// +message Selection { + // + string title = 1; + // + repeated SelectionItem item = 2; + // + ArcType arc_type = 3; + // + SelectionType selection_type = 4; +} + +// +message SelectionItem { + // + uint64 aid = 1; + // + uint64 cid = 2; + // + BadgeType badge_type = 4; + // + string title = 5; + // + string long_title = 6; + // + Dimension dimension = 7; +} + +// +message SelectionModule { + // + repeated Selection selection = 1; + // + repeated SerialSeason serial_season = 2; + // + PlayStrategy play_strategy = 3; +} + +// +enum SelectionType { + // + LONGTITLE = 0; + // + SHORTTITLE = 1; +} + +// +message SerialSeason { + // + uint32 season_id = 1; + // + string season_title = 2; +} + +// +message ShowTime { + // + int32 start_time = 1; + // + int32 end_time = 2; + // + double pos_x = 3; + // + double pos_y = 4; +} + +// +enum UnionType { + // + UGC = 0; + // + OGV = 1; +} + +// UP主信息(可是Upper这个... 程序员英文不过关吧? ) +message UpperInfos { + // 粉丝数 + uint64 fans_count = 1; + // 过去半年内的稿件数 + uint64 arc_count_last_half_year = 2; + // + int64 first_up_dates = 3; + // UP稿件总播放数 + uint64 total_play_count = 4; +} + +// +message VideoGuide { + // + repeated Material material = 1; + // + VideoViewPoint video_point = 2; + // + ContractCard contract_card = 3; +} + +// +message VideoPoint { + // + int32 type = 1; + // + int64 from = 2; + // + int64 to = 3; + // + string content = 4; + // + string cover = 5; + // + string logo_url = 6; +} + +// +message VideoShot { + // + string pv_data = 1; + // + int32 img_x_len = 2; + // + int32 imd_x_size = 3; + // + int32 img_y_len = 4; + // + int32 img_y_size = 5; + // + repeated string image = 6; +} + +// +message VideoViewPoint { + // + repeated VideoPoint points = 1; + // + PointMaterial point_material = 2; + // + bool point_permanent = 3; +} + +// +message ViewBase { + // + UnionType union_type = 1; + // + PageType page_type = 2; +} + +// +message ViewProgressReq { + // + uint64 aid = 1; + // + uint64 cid = 2; + // + uint64 up_mid = 3; + // + ChronosParam chronos_param = 4; + // + UnionType type = 5; +} + +// +message ViewProgressReply { + // + VideoGuide video_guide = 1; + // + Chronos chronos = 2; + // + VideoShot arc_shot = 3; + // + DmResource dm = 4; +} + +// +message ViewReq { + // + uint64 aid = 1; + // + string bvid = 2; + // + string from = 3; + // + string spmid = 4; + // + string from_spmid = 5; + // + string session_id = 6; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 7; + // + string track_id = 8; + // + map extra_content = 9; +} + +// +message ViewReply { + // + ViewBase view_base = 1; + // + SelectionModule selection_module = 3; + // 使用 pgcanymodel / ugcanymodel 进行proto any转换成对应业务码结构体 + google.protobuf.Any supplement = 4; +} \ No newline at end of file diff --git a/grpc_api/bilibili/render/render.proto b/grpc_api/bilibili/render/render.proto index 0ffdd02..1fa0204 100644 --- a/grpc_api/bilibili/render/render.proto +++ b/grpc_api/bilibili/render/render.proto @@ -1 +1,17 @@ -// TODO \ No newline at end of file +syntax = "proto3"; + +package bilibili.render; + +import "google/protobuf/any.proto"; + +// +message Render { + // + int64 code = 1; + // + string message = 2; + // + string ttl = 3; + // + google.protobuf.Any data = 4; +} \ No newline at end of file From fcbbdfe125a2b13a93a0dc5f0d5b0c4ca51d62e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AF=92=E5=BD=A4?= <70561268+cxw620@users.noreply.github.com> Date: Wed, 29 Mar 2023 20:21:48 -0600 Subject: [PATCH 006/159] add: grpc proto distribution (#646) --- .../app/distribution/setting/download.proto | 11 ++ .../app/distribution/setting/dynamic.proto | 17 ++ .../distribution/setting/experimental.proto | 65 ++++++++ .../distribution/setting/internaldevice.proto | 11 ++ .../app/distribution/setting/night.proto | 11 ++ .../app/distribution/setting/other.proto | 25 +++ .../app/distribution/setting/pegasus.proto | 41 +++++ .../app/distribution/setting/play.proto | 58 +++++++ .../app/distribution/setting/privacy.proto | 20 +++ .../app/distribution/setting/search.proto | 19 +++ .../app/distribution/v1/distribution.proto | 156 ++++++++++++++++++ 11 files changed, 434 insertions(+) create mode 100644 grpc_api/bilibili/app/distribution/setting/download.proto create mode 100644 grpc_api/bilibili/app/distribution/setting/dynamic.proto create mode 100644 grpc_api/bilibili/app/distribution/setting/experimental.proto create mode 100644 grpc_api/bilibili/app/distribution/setting/internaldevice.proto create mode 100644 grpc_api/bilibili/app/distribution/setting/night.proto create mode 100644 grpc_api/bilibili/app/distribution/setting/other.proto create mode 100644 grpc_api/bilibili/app/distribution/setting/pegasus.proto create mode 100644 grpc_api/bilibili/app/distribution/setting/play.proto create mode 100644 grpc_api/bilibili/app/distribution/setting/privacy.proto create mode 100644 grpc_api/bilibili/app/distribution/setting/search.proto create mode 100644 grpc_api/bilibili/app/distribution/v1/distribution.proto diff --git a/grpc_api/bilibili/app/distribution/setting/download.proto b/grpc_api/bilibili/app/distribution/setting/download.proto new file mode 100644 index 0000000..e738e99 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/download.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.download; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// +message DownloadSettingsConfig { + // + bilibili.app.distribution.v1.BoolValue enable_download_auto_start = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/distribution/setting/dynamic.proto b/grpc_api/bilibili/app/distribution/setting/dynamic.proto new file mode 100644 index 0000000..96abf58 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/dynamic.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.dynamic; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// +message DynamicAutoPlay { + // + bilibili.app.distribution.v1.Int64Value value = 1; +} + +// +message DynamicDeviceConfig { + // + DynamicAutoPlay auto_play = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/distribution/setting/experimental.proto b/grpc_api/bilibili/app/distribution/setting/experimental.proto new file mode 100644 index 0000000..eaf9a67 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/experimental.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.experimental; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// +message DynamicSelect { + // + bilibili.app.distribution.v1.BoolValue fold = 1; +} + +// +message Exp { + // + bilibili.app.distribution.v1.Int64Value id = 1; + // + bilibili.app.distribution.v1.Int32Value bucket = 2; +} + +// +message ExperimentalConfig { + // + bilibili.app.distribution.v1.StringValue flag = 1; + // + repeated Exp exps = 2; +} + +// +message MultipleTusConfig { + // + TopLeft top_left = 1; + // + DynamicSelect dynamic_select = 2; +} + +// APP首页头像跳转信息 +message TopLeft { + // + bilibili.app.distribution.v1.StringValue url = 1; + // + bilibili.app.distribution.v1.StringValue story_foreground_image = 2; + // + bilibili.app.distribution.v1.StringValue story_background_image = 3; + // + bilibili.app.distribution.v1.StringValue listen_foreground_image = 4; + // + bilibili.app.distribution.v1.StringValue listen_background_image = 5; + // + bilibili.app.distribution.v1.StringValue ios_story_foreground_image = 6; + // + bilibili.app.distribution.v1.StringValue ios_story_background_image = 7; + // + bilibili.app.distribution.v1.StringValue ios_listen_foreground_image = 8; + // + bilibili.app.distribution.v1.StringValue ios_listen_background_image = 9; + // + bilibili.app.distribution.v1.StringValue goto = 10; + // + bilibili.app.distribution.v1.StringValue url_v2 = 11; + // + bilibili.app.distribution.v1.Int64Value goto_v2 = 12; + // + bilibili.app.distribution.v1.StringValue badge = 13; +} diff --git a/grpc_api/bilibili/app/distribution/setting/internaldevice.proto b/grpc_api/bilibili/app/distribution/setting/internaldevice.proto new file mode 100644 index 0000000..76c95b9 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/internaldevice.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.internaldevice; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// +message InternalDeviceConfig { + // 首次启动时间 + bilibili.app.distribution.v1.Int64Value fts = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/distribution/setting/night.proto b/grpc_api/bilibili/app/distribution/setting/night.proto new file mode 100644 index 0000000..6d811aa --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/night.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.night; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// +message NightSettingsConfig { + // + bilibili.app.distribution.v1.BoolValue is_night_follow_system = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/distribution/setting/other.proto b/grpc_api/bilibili/app/distribution/setting/other.proto new file mode 100644 index 0000000..4da3a59 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/other.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.other; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// +message OtherSettingsConfig { + // + bilibili.app.distribution.v1.Int64Value watermark_type = 1; + // + bilibili.app.distribution.v1.Int64Value web_image_quality_type = 2; + // + bilibili.app.distribution.v1.BoolValue enable_read_pasteboard = 3; + // + bilibili.app.distribution.v1.BoolValue paste_auto_jump = 4; + // + bilibili.app.distribution.v1.BoolValue mini_screen_play_when_back = 5; + // + bilibili.app.distribution.v1.BoolValue enable_resume_playing = 6; + // + bilibili.app.distribution.v1.BoolValue enable_wifi_auto_update = 7; + // + bilibili.app.distribution.v1.BoolValue enable_guide_screenshot_share = 8; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/distribution/setting/pegasus.proto b/grpc_api/bilibili/app/distribution/setting/pegasus.proto new file mode 100644 index 0000000..a15f455 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/pegasus.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.pegasus; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// +message FeedModeValue { + // + bilibili.app.distribution.v1.Int64Value value = 1; +} + +// +message PegasusAutoPlay { + // + bilibili.app.distribution.v1.Int64Value single = 1; + // + bilibili.app.distribution.v1.Int64Value double = 2; + // + bilibili.app.distribution.v1.BoolValue single_affected_by_server_side = 3; + // + bilibili.app.distribution.v1.BoolValue double_affected_by_server_side = 4; +} + +// +message PegasusColumnValue { + // + bilibili.app.distribution.v1.Int64Value value = 1; + // + bilibili.app.distribution.v1.BoolValue affected_by_server_side = 2; +} + +// +message PegasusDeviceConfig { + // + PegasusColumnValue column = 1; + // + FeedModeValue mode = 2; + // + PegasusAutoPlay auto_play = 3; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/distribution/setting/play.proto b/grpc_api/bilibili/app/distribution/setting/play.proto new file mode 100644 index 0000000..a972fc8 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/play.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.play; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// 云端保存的播放器配置 +message CloudPlayConfig { + // 启用杜比全景声 + bilibili.app.distribution.v1.BoolValue enable_panorama = 1; + // 启用杜比音效 + bilibili.app.distribution.v1.BoolValue enable_dolby = 2; + // 启用震动 + bilibili.app.distribution.v1.BoolValue enable_shake = 3; + // 启用后台播放 + bilibili.app.distribution.v1.BoolValue enable_background = 4; + // 启用HIRES + bilibili.app.distribution.v1.BoolValue enable_loss_less = 5; +} + +// 播放器策略配置 +message PlayConfig { + // + bilibili.app.distribution.v1.BoolValue should_auto_play = 1; + // + bilibili.app.distribution.v1.BoolValue should_auto_fullscreen = 2; + // + bilibili.app.distribution.v1.BoolValue enable_playurl_https = 3; + // + bilibili.app.distribution.v1.BoolValue enable_danmaku_interaction = 4; + // + bilibili.app.distribution.v1.Int64Value small_screen_status = 5; + // + bilibili.app.distribution.v1.Int64Value player_codec_mode_key = 6; + // + bilibili.app.distribution.v1.BoolValue enable_gravity_rotate_screen = 7; + // + bilibili.app.distribution.v1.BoolValue enable_danmaku_monospaced = 8; + // + bilibili.app.distribution.v1.BoolValue enable_edit_subtitle = 9; + // + bilibili.app.distribution.v1.BoolValue enable_subtitle = 10; + // + bilibili.app.distribution.v1.Int64Value color_filter = 11; + // + bilibili.app.distribution.v1.BoolValue should_auto_story = 12; + // + bilibili.app.distribution.v1.BoolValue landscape_auto_story = 13; + // + bilibili.app.distribution.v1.BoolValue volume_balance = 14; +} + +// 灰度测试特殊功能? +message SpecificPlayConfig { + // + bilibili.app.distribution.v1.BoolValue enable_segmented_section = 1; +} + diff --git a/grpc_api/bilibili/app/distribution/setting/privacy.proto b/grpc_api/bilibili/app/distribution/setting/privacy.proto new file mode 100644 index 0000000..7e34cf8 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/privacy.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.privacy; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// +message MidPrivacySettingsConfig { + // + bilibili.app.distribution.v1.BoolValue recommend_to_known = 1; +} + +// +message PrivacySettingsConfig { + // + bilibili.app.distribution.v1.BoolValue ad_recommand_store = 1; + // 传感器权限 + bilibili.app.distribution.v1.BoolValue sensor_access = 2; + +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/distribution/setting/search.proto b/grpc_api/bilibili/app/distribution/setting/search.proto new file mode 100644 index 0000000..fc02d63 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/setting/search.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package bilibili.app.distribution.setting.search; + +import "bilibili/app/distribution/v1/distribution.proto"; + +// +message SearchAutoPlay { + // + bilibili.app.distribution.v1.Int64Value value = 1; + // + bilibili.app.distribution.v1.BoolValue affected_by_server_side = 2; +} + +// +message SearchDeviceConfig { + // + SearchAutoPlay auto_play = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/distribution/v1/distribution.proto b/grpc_api/bilibili/app/distribution/v1/distribution.proto new file mode 100644 index 0000000..87972f3 --- /dev/null +++ b/grpc_api/bilibili/app/distribution/v1/distribution.proto @@ -0,0 +1,156 @@ +syntax = "proto3"; + +package bilibili.app.distribution.v1; + +// APP配置 +service Distribution { + // 获取云端储存的用户偏好 + rpc GetUserPreference (GetUserPreferenceReq) returns (GetUserPreferenceReply); + // 设定用户偏好 + rpc SetUserPreference (SetUserPreferenceReq) returns (SetUserPreferenceReply); + // 获取云控配置 + rpc UserPreference (UserPreferenceReq) returns (UserPreferenceReply); +} + +// +message GetUserPreferenceReq { + // + repeated string type_url = 1; + // + map extra_context = 2; +} + +// +message GetUserPreferenceReply { + // 对应 GetUserPreferenceReq 的请求的类型 + repeated google.protobuf.Any value = 1; +} + +// +message SetUserPreferenceReq { + // + repeated google.protobuf.Any preference = 1; + // + map extra_context = 2; +} + +// +message SetUserPreferenceReply {} + +// +message UserPreferenceReq {} + +// 云控配置下发 +message UserPreferenceReply { + // 具体解码需要根据实际请求 type_url 来判断 + repeated google.protobuf.Any preference = 1; +} + +// +message BoolValue { + // + bool value = 1; + // + int64 last_modified = 2; + // + bool default_value = 3; + // + string exp = 4; +} + +// +message BytesValue { + // + bytes value = 1; + // + int64 last_modified = 2; + // + bytes default_value = 3; + // + string exp = 4; +} + +// +message DoubleValue { + // + double value = 1; + // + int64 last_modified = 2; + // + double default_value = 3; + // + string exp = 4; +} + +// +message FloatValue { + // + float value = 1; + // + int64 last_modified = 2; + // + float default_value = 3; + // + string exp = 4; +} + +// +message Int32Value { + // + int32 value = 1; + // + int64 last_modified = 2; + // + int32 default_value = 3; + // + string exp = 4; +} + +// +message Int64Value { + // + int64 value = 1; + // + int64 last_modified = 2; + // + int64 default_value = 3; + // + string exp = 4; +} + +// +message StringValue { + // + string value = 1; + // + int64 last_modified = 2; + // + string default_value = 3; + // + string exp = 4; +} + +// +message UInt32Value { + // + uint32 value = 1; + // + int64 last_modified = 2; + // + uint32 default_value = 3; + // + string exp = 4; +} + +// +message UInt64Value { + // + uint64 value = 1; + // + int64 last_modified = 2; + // + uint64 default_value = 3; + // + string exp = 4; +} + From b1152018b4a4049d85e0ef7112925616994b66cc Mon Sep 17 00:00:00 2001 From: Sheep-realms <38580457+sheep-realms@users.noreply.github.com> Date: Thu, 20 Apr 2023 21:30:32 +0800 Subject: [PATCH 007/159] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=89=A7=E9=9B=86?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=9F=A5=E8=AF=A2=E4=B8=AD=E7=9A=84=20paymen?= =?UTF-8?q?t=20=E5=92=8C=20pay=5Ftype=20=E5=AF=B9=E8=B1=A1=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=20(#651)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 更新 payment 和 pay_type 对象信息 - 补充 `payment` 对象描述。 - 新增 `payment` 对象中的 `vip_price` 字段。 - 移除 `payment` 中不再使用的 `tip` 字段。 - 新增 `pay_type` 对象描述。 * 修正描述 --- docs/bangumi/info.md | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/docs/bangumi/info.md b/docs/bangumi/info.md index 72d8a96..6857cd3 100644 --- a/docs/bangumi/info.md +++ b/docs/bangumi/info.md @@ -251,16 +251,27 @@ curl -G 'https://api.bilibili.com/pgc/review/user' \ `result`中的`payment`对象: -| 字段 | 类型 | 内容 | 备注 | -| ------------------- | ---- | ---- | ---- | -| discount | num | | | -| pay_type | obj | | | -| price | str | | | -| promotion | str | | | -| tip | str | | | -| vip_discount | num | | | -| vip_first_promotion | str | | | -| vip_promotion | str | | | +| 字段 | 类型 | 内容 | 备注 | +| ------------------- | ---- | ------------ | -------- | +| discount | num | 折扣 | 100为原价 | +| pay_type | obj | 支付相关 | | +| price | str | 售价 | | +| promotion | str | 推广信息 | | +| vip_discount | num | 大会员折扣 | | +| vip_first_promotion | str | | | +| vip_price | str | 大会员售价 | | +| vip_promotion | str | 大会员推广信息 | | + +`payment`中的`pay_type`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------------------- | ---- | ------------- | ------------------------- | +| allow_discount | num | 启用折扣 | 0:否
1:是
下同 | +| allow_pack | num | | | +| allow_ticket | num | 启用票券 | | +| allow_time_limit | num | 启用时间限制 | | +| allow_vip_discount | num | 启用大会员折扣 | | +| forbid_bb | num | 禁止使用B币券 | | `result`中的`positive`对象: @@ -1019,4 +1030,4 @@ curl -L -X GET 'https://api.bilibili.com/pgc/web/season/section?season_id=42290' } ``` - \ No newline at end of file + From 956b874da98b70fb8fff3487cf1f8f72b6139d89 Mon Sep 17 00:00:00 2001 From: Jianhui Yuan Xu <107997665+NeumoNeumo@users.noreply.github.com> Date: Sun, 30 Apr 2023 17:52:22 +0800 Subject: [PATCH 008/159] Update videostream_url.md (#655) --- docs/video/videostream_url.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/video/videostream_url.md b/docs/video/videostream_url.md index 7dd7a95..37595d6 100644 --- a/docs/video/videostream_url.md +++ b/docs/video/videostream_url.md @@ -109,7 +109,8 @@ | session | str | | 非必要 | 从视频播放页的 HTML 中获取 | | otype | str | | 非必要 | 固定为`json` | | type | str | | 非必要 | 目前为空 | -| platform | str | | 非必要 | pc:web播放(默认值,视频流存在 referer鉴权)
html5:移动端 HTML5 播放(仅支持 MP4 格式,清晰度最高 360P,无 referer 鉴权可以直接使用`video`标签播放) | +| platform | str | | 非必要 | pc:web播放(默认值,视频流存在 referer鉴权)
html5:移动端 HTML5 播放(仅支持 MP4 格式,无 referer 鉴权可以直接使用`video`标签播放) | +| high_quality | num | 是否高画质 | 非必要 | platform=html5时,此值为1可使画质为1080p | **json回复:** From f402c6b7f41014ffbc43c03a0206651351204cd7 Mon Sep 17 00:00:00 2001 From: Sheep-realms <38580457+sheep-realms@users.noreply.github.com> Date: Mon, 15 May 2023 02:12:11 +0800 Subject: [PATCH 009/159] =?UTF-8?q?=E8=A1=A5=E5=85=85=20Official=20?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E4=B8=AD=E7=9A=84=E8=AE=A4=E8=AF=81=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=BF=A1=E6=81=AF=20(#666)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 更新 payment 和 pay_type 对象信息 - 补充 `payment` 对象描述。 - 新增 `payment` 对象中的 `vip_price` 字段。 - 移除 `payment` 中不再使用的 `tip` 字段。 - 新增 `pay_type` 对象描述。 * 修正描述 * Update README.md * Update get_dynamic_detail.md * Update login_info.md * Update info.md * Add files via upload * Update info.md * Update README.md --- README.md | 1 + docs/dynamic/get_dynamic_detail.md | 2 +- docs/login/login_info.md | 4 ++-- docs/user/info.md | 6 +++--- docs/user/official_role.md | 12 ++++++++++++ docs/video/info.md | 2 +- 6 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 docs/user/official_role.md diff --git a/README.md b/README.md index 4f791f1..c9604a3 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ B站 API 采用 C/S 结构,大多数接口为 REST API 和 gRPC,少部分接 - [ ] [个人空间](docs/user/space.md) - [x] [检查昵称是否可注册](docs/user/check_nickname.md) - [x] [用户注册](docs/user/register.md) + - [x] [用户认证类型一览](docs/user/official_role.md) - [ ] [大会员](docs/vip) - [ ] [大会员基本信息](docs/vip/info.md) - [ ] [大会员中心](docs/vip/center.md) diff --git a/docs/dynamic/get_dynamic_detail.md b/docs/dynamic/get_dynamic_detail.md index 0b8490e..e6182ab 100644 --- a/docs/dynamic/get_dynamic_detail.md +++ b/docs/dynamic/get_dynamic_detail.md @@ -273,7 +273,7 @@ curl -G 'https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/get_dynamic_deta | 字段 | 类型 | 内容 | 备注 | | ----- | --- | ---- | ------------------------------------- | -| role | num | 认证类型 | 0:无
1 2 7:个人认证
3 4 5 6:机构认证 | +| role | num | 认证类型 | 见[用户认证类型一览](../user/official_role.md) | | title | str | 认证信息 | 无为空 | | desc | str | 认证备注 | 无为空 | | type | num | 是否认证 | -1:无
0:认证 | diff --git a/docs/login/login_info.md b/docs/login/login_info.md index e9873a7..57925c3 100644 --- a/docs/login/login_info.md +++ b/docs/login/login_info.md @@ -65,7 +65,7 @@ | 字段 | 类型 | 内容 | 备注 | | ----- | ---- | -------- | ------------------------------------------------- | -| role | num | 认证类型 | 0:无
1 2 7:个人认证
3 4 5 6:机构认证 | +| role | num | 认证类型 | 见[用户认证类型一览](../user/official_role.md) | | title | str | 认证信息 | 无为空 | | desc | str | 认证备注 | 无为空 | | type | num | 是否认证 | -1:无
0:认证 | @@ -558,4 +558,4 @@ curl 'https://account.bilibili.com/site/getCoin' \ } ``` - \ No newline at end of file + diff --git a/docs/user/info.md b/docs/user/info.md index db7ebe2..42fbbd0 100644 --- a/docs/user/info.md +++ b/docs/user/info.md @@ -110,7 +110,7 @@ | 字段 | 类型 | 内容 | 备注 | |-------|-----|------|-----------------------------------------| -| role | num | 认证类型 | 0:无
1 2 7 9:个人认证
3 4 5 6:机构认证 | +| role | num | 认证类型 | 见[用户认证类型一览](official_role.md) | | title | str | 认证信息 | 无为空 | | desc | str | 认证备注 | 无为空 | | type | num | 是否认证 | -1:无
0:个人认证
1:机构认证 | @@ -623,7 +623,7 @@ https://i0.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png | 字段 | 类型 | 内容 | 备注 | | ----- | ---- | -------- | ------------------------------------------------- | -| role | num | 认证类型 | 0:无
1 2 7:个人认证
3 4 5 6:机构认证 | +| role | num | 认证类型 | 见[用户认证类型一览](official_role.md) | | title | str | 认证信息 | 无为空 | | desc | str | 认证备注 | 无为空 | | type | num | 是否认证 | -1:无
0:认证 | @@ -850,7 +850,7 @@ curl -G 'api.bilibili.com/x/web-interface/card' \ | 字段 | 类型 | 内容 | 备注 | | ----- | ---- | -------- | ------------------------------------------------- | -| role | num | 认证类型 | 0:无
1 2 7:个人认证
3 4 5 6:机构认证 | +| role | num | 认证类型 | 见[用户认证类型一览](official_role.md) | | title | str | 认证信息 | 无为空 | | desc | str | 认证备注 | 无为空 | | type | num | 是否认证 | -1:无
0:认证 | diff --git a/docs/user/official_role.md b/docs/user/official_role.md new file mode 100644 index 0000000..fb70aac --- /dev/null +++ b/docs/user/official_role.md @@ -0,0 +1,12 @@ +# 用户认证类型一览 +| ID | 认证类型 | 详细类型 | +| -- | ------- | ------- | +| 0 | 无 | | +| 1 | 个人认证 | 知名UP主 | +| 2 | 个人认证 | 大V达人 | +| 3 | 机构认证 | 企业 | +| 4 | 机构认证 | 组织 | +| 5 | 机构认证 | 媒体 | +| 6 | 机构认证 | 政府 | +| 7 | 个人认证 | 高能主播 | +| 9 | 个人认证 | 社会知名人士 | \ No newline at end of file diff --git a/docs/video/info.md b/docs/video/info.md index decb4b1..60c5e83 100644 --- a/docs/video/info.md +++ b/docs/video/info.md @@ -237,7 +237,7 @@ | 字段 | 类型 | 内容 | 备注 | |-------|-----|--------|---------------------------------------| -| role | num | 成员认证级别 | 0:无
1 2 7:个人认证
3 4 5 6:机构认证 | +| role | num | 成员认证级别 | 见[用户认证类型一览](../user/official_role.md) | | title | str | 成员认证名 | 无为空 | | desc | str | 成员认证备注 | 无为空 | | type | num | 成员认证类型 | -1:无
0:有 | From 06e8343031c77b39b97206542b9556d44ea64014 Mon Sep 17 00:00:00 2001 From: zine_yu <46991452+zine0@users.noreply.github.com> Date: Mon, 15 May 2023 02:25:58 +0800 Subject: [PATCH 010/159] fix(docs/other/bvid_desc.md) (#663) --- docs/other/bvid_desc.md | 97 ++++++++++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 36 deletions(-) diff --git a/docs/other/bvid_desc.md b/docs/other/bvid_desc.md index 25bb0e1..d3da777 100644 --- a/docs/other/bvid_desc.md +++ b/docs/other/bvid_desc.md @@ -25,13 +25,15 @@ ## 算法概述 -算法以及程序主要参考[知乎@mcfx的回答](https://www.zhihu.com/question/381784377/answer/1099438784) +~~算法以及程序主要参考[知乎@mcfx的回答](https://www.zhihu.com/question/381784377/answer/1099438784)~~ +实际上该算法并不完整,新的算法参考自[【揭秘】av号转bv号的过程](https://www.bilibili.com/video/BV1N741127Tj) ### av->bv算法 注:本算法及示例程序仅能编解码`avid < 29460791296`,且暂无法验证`avid >= 29460791296`的正确性 +再注:本人不清楚新算法能否编解码`avid >= 29460791296` -1. a = (avid ⊕ 177451812) + 8728348608 +1. a = (avid ⊕ 177451812) + 100618342136696320 2. 以 i 为循环变量循环 6 次 b[i] = (a / 58 ^ i) % 58 3. 将 b[i] 中各个数字转换为以下码表中的字符 @@ -39,23 +41,31 @@ > fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF -4. 初始化字符串 b[i]=`BV1 4 1 7 ` +4. 初始化字符串 b[i]=` ` 5. 按照以下字符顺序编码表编码并填充至 b[i] 字符顺序编码表: -> 0 -> 11 +> 0 -> 9 > -> 1 -> 10 +> 1 -> 8 > -> 2 -> 3 +> 2 -> 1 > -> 3 -> 8 +> 3 -> 6 > -> 4 -> 4 +> 4 -> 2 > -> 5 -> 6 +> 5 -> 4 +> +> 6 -> 0 +> +> 7 -> 7 +> +> 8 -> 3 +> +> 9 -> 5 ### bv->av算法 @@ -66,41 +76,56 @@ 使用 Python、C、TypeScript、Java、Kotlin 以及 Golang 等语言作为示例,欢迎社区提交更多例程 +注: 新算法只提供了Python版本 ### Python ```python -table = 'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF' # 码表 -tr = {} # 反查码表 -# 初始化反查码表 -for i in range(58): - tr[table[i]] = i -s = [11, 10, 3, 8, 4, 6] # 位置编码表 -XOR = 177451812 # 固定异或值 -ADD = 8728348608 # 固定加法值 +XOR = 177451812 +ADD = 100618342136696320 +TABLE = "fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF" +MAP = { + 0:9, + 1:8, + 2:1, + 3:6, + 4:2, + 5:4, + 6:0, + 7:7, + 8:3, + 9:5 +} +def av2bv(av): + av = (av ^ XOR) + ADD + bv = [""]*10 + for i in range(10): + bv[MAP[i]] = TABLE[(av//58**i)%58] + return "".join(bv) -def bv2av(x): - r = 0 - for i in range(6): - r += tr[x[s[i]]] * 58 ** i - return (r - ADD) ^ XOR +def bv2av(bv): + av = [""]*10 + s = 0 + for i in range(10): + s += TABLE.find(bv[MAP[i]])*58**i + av=(s-ADD)^XOR -def av2bv(x): - x = (x ^ XOR) + ADD - r = list('BV1 4 1 7 ') - for i in range(6): - r[s[i]] = table[x // 58 ** i % 58] - return ''. join(r) + return(av) -print(av2bv(170001)) -print(bv2av('BV17x411w7KC')) +def main(): + while True: + mod = input("1.AV2BV\n2.BV2AV\n3.Exit\n你的选择:") + if mod == "1": + print("BV号是: BV"+av2bv(int(input("AV号是:")))) + elif mod == "2": + print("AV号是 AV"+str(bv2av(input("BV号是")))) + elif mod == "3": + break + else: + print("输入错误请重新输入") + +main() ``` -输出为: - -``` -BV17x411w7KC -170001 -``` ### C From 16d455ff098f46502eca2bafc7b96a2959a82f1b Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Mon, 15 May 2023 02:28:41 +0800 Subject: [PATCH 011/159] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E6=9D=A1=E7=9B=AE=E4=B8=AD=E5=9B=BE=E7=89=87=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=20(#660)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/comment/readme.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/comment/readme.md b/docs/comment/readme.md index 09f0b62..469b19e 100644 --- a/docs/comment/readme.md +++ b/docs/comment/readme.md @@ -228,6 +228,7 @@ | emote | obj | 需要渲染的表情转义 | 评论内容无表情则无此项 | | jump_url | obj | 需要高亮的超链转义 | | | max_line | num | 6 | 收起最大行数 | +| pictures | array | 评论图片数组 | | `content`中的`members`数组: @@ -285,6 +286,15 @@ | appPackageName | str | (?) | | | clickReport | str | 上报 id | | +`content`中的`pictures`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ---- | -------- | -------- | +| img_src | str | 图片地址 | | +| img_width | num | 图片宽度 | | +| img_height | num | 图片高度 | | +| img_size | num | 图片大小 | 单位KB | + `评论条目`中的`replies`数组: | 项 | 类型 | 内容 | 备注 | From f8a8f8a245c18a157c246246090f1e948b25fbab Mon Sep 17 00:00:00 2001 From: stackinspector Date: Tue, 16 May 2023 02:56:18 +0800 Subject: [PATCH 012/159] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Rust=E7=89=88?= =?UTF-8?q?=E6=9C=ACbvid=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/other/bvid_desc.md | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/docs/other/bvid_desc.md b/docs/other/bvid_desc.md index d3da777..264f897 100644 --- a/docs/other/bvid_desc.md +++ b/docs/other/bvid_desc.md @@ -74,9 +74,9 @@ ## 编程实现 -使用 Python、C、TypeScript、Java、Kotlin 以及 Golang 等语言作为示例,欢迎社区提交更多例程 +使用 [Python](#Python) [C](#C) [TypeScript](#TypeScript) [Java](#Java) [Kotlin](#Kotlin) [Golang](#Golang) [Rust](#Rust) 等语言作为示例,欢迎社区提交更多例程 -注: 新算法只提供了Python版本 +注: 新算法只提供了 [Python](#Python) 和 [Rust](#Rust) 版本 ### Python ```python @@ -385,3 +385,40 @@ func main() { BV17x411w7KC 170001 ``` +### Rust +crate: https://github.com/stackinspector/bvid +```rust +// Copyright (c) 2023 stackinspector. MIT license. + +const XORN: u64 = 177451812; +const ADDN: u64 = 100618342136696320; +const TABLE: [u8; 58] = *b"fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF"; +const MAP: [usize; 10] = [9, 8, 1, 6, 2, 4, 0, 7, 3, 5]; +const REV_TABLE: [u8; 74] = [ + 13, 12, 46, 31, 43, 18, 40, 28, 5, 0, 0, 0, 0, 0, 0, 0, 54, 20, 15, 8, + 39, 57, 45, 36, 0, 38, 51, 42, 49, 52, 0, 53, 7, 4, 9, 50, 10, 44, 34, 6, + 25, 1, 0, 0, 0, 0, 0, 0, 26, 29, 56, 3, 24, 0, 47, 27, 22, 41, 16, 0, + 11, 37, 2, 35, 21, 17, 33, 30, 48, 23, 55, 32, 14, 19, +]; +const POW58: [u64; 10] = [ + 1, 58, 3364, 195112, 11316496, 656356768, 38068692544, + 2207984167552, 128063081718016, 7427658739644928, +]; + +pub fn av2bv(avid: u64) -> [u8; 10] { + let a = (avid ^ XORN) + ADDN; + let mut bvid = [0; 10]; + for i in 0..10 { + bvid[MAP[i]] = TABLE[(a / POW58[i]) as usize % 58]; + } + bvid +} + +pub fn bv2av(bvid: [u8; 10]) -> u64 { + let mut a = 0; + for i in 0..10 { + a += REV_TABLE[bvid[MAP[i]] as usize - 49] as u64 * POW58[i]; + } + (a - ADDN) ^ XORN +} +``` From dc5c527a1fe46d1d787d77d49e907e1ef7b03e67 Mon Sep 17 00:00:00 2001 From: stackinspector Date: Tue, 16 May 2023 03:38:27 +0800 Subject: [PATCH 013/159] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Rust=E7=89=88?= =?UTF-8?q?=E6=9C=ACbvid=E7=AE=97=E6=B3=95=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/other/bvid_desc.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/other/bvid_desc.md b/docs/other/bvid_desc.md index 264f897..1c4e7c4 100644 --- a/docs/other/bvid_desc.md +++ b/docs/other/bvid_desc.md @@ -405,7 +405,7 @@ const POW58: [u64; 10] = [ 2207984167552, 128063081718016, 7427658739644928, ]; -pub fn av2bv(avid: u64) -> [u8; 10] { +fn av2bv(avid: u64) -> [u8; 10] { let a = (avid ^ XORN) + ADDN; let mut bvid = [0; 10]; for i in 0..10 { @@ -414,11 +414,14 @@ pub fn av2bv(avid: u64) -> [u8; 10] { bvid } -pub fn bv2av(bvid: [u8; 10]) -> u64 { +fn bv2av(bvid: [u8; 10]) -> u64 { let mut a = 0; for i in 0..10 { a += REV_TABLE[bvid[MAP[i]] as usize - 49] as u64 * POW58[i]; } (a - ADDN) ^ XORN } + +// assert_eq!(*b"17x411w7KC", av2bv(170001)); +// assert_eq!(170001, bv2av(*b"17x411w7KC")); ``` From 894c802ac57c468e4ce62f419b455917c1040673 Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Wed, 17 May 2023 08:37:50 +0800 Subject: [PATCH 014/159] update QQ group link --- .vuepress/config.js | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vuepress/config.js b/.vuepress/config.js index cd61a73..e5ba1e3 100644 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -19,7 +19,7 @@ module.exports = { { text: '相关社群', items: [ - {text: 'QQ交流群', link: 'https://jq.qq.com/?_wv=1027&k=s1M0LCcu'}, + {text: 'QQ交流群', link: 'http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=2rRJXK3zgU5yi3e_4rNLeJYUjMLzw_Jj&authKey=L%2FN3EfZXo3QFjEuHq4ifTgh%2F384UmrYpjl7dbYPhYHtznhfJWxkymxQKObQunmEQ&noverify=0&group_code=560304737'}, {text: 'Telegram交流群', link: 'https://t.me/bilibili_API_collect_community'} ] }, diff --git a/README.md b/README.md index c9604a3..c1f2983 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ protobuf 序列格式:[传送门](https://www.jianshu.com/p/a24c88c0526a ) ⚠注意:开源社群欢迎交流探讨,**拒绝**咨询、**不支持**合作,**黑产号**一经发现立即拉黑并举报相关 SRC -- QQ 交流群:[邀请链接](https://jq.qq.com/?_wv=1027&k=s1M0LCcu) +- QQ 交流群:[邀请链接](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=2rRJXK3zgU5yi3e_4rNLeJYUjMLzw_Jj&authKey=L%2FN3EfZXo3QFjEuHq4ifTgh%2F384UmrYpjl7dbYPhYHtznhfJWxkymxQKObQunmEQ&noverify=0&group_code=560304737) - Telegram 交流群:[@bilibili_API_collect_community](https://t.me/bilibili_API_collect_community) ## 🧋发电 From 87d56b66e7ce375029bccf9efda5314964b0528d Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Wed, 17 May 2023 09:42:12 +0800 Subject: [PATCH 015/159] =?UTF-8?q?update=20=E3=80=90danmaku=20thumbup=20l?= =?UTF-8?q?ist=E3=80=91=20APIDoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docs/danmaku/action.md | 112 +++++----------------------------- docs/danmaku/danmaku_proto.md | 63 ++++++++++--------- docs/danmaku/thumbup.md | 104 +++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+), 125 deletions(-) create mode 100644 docs/danmaku/thumbup.md diff --git a/README.md b/README.md index c1f2983..8e59c88 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ B站 API 采用 C/S 结构,大多数接口为 REST API 和 gRPC,少部分接 - [ ] 智能防挡弹幕 - [x] [弹幕个人配置修改](docs/danmaku/config.md) - [x] [名词解释](docs/danmaku/buzzword.md) + - [x] [点赞查询](docs/danmaku/thumbup.md) - [x] [视频笔记](docs/note) - [x] [笔记列表](docs/note/list.md) - [x] [笔记详细信息](docs/note/info.md) diff --git a/docs/danmaku/action.md b/docs/danmaku/action.md index 309f5e0..1b26a3b 100644 --- a/docs/danmaku/action.md +++ b/docs/danmaku/action.md @@ -483,88 +483,6 @@ curl -G 'https://api.bilibili.com/x/dm/adv/state' \ -## 查询弹幕点赞数 - -> https://api.bilibili.com/x/v2/dm/thumbup/stats - -*请求方式:GET* - -认证方式:Cookie(SESSDATA)或APP - -**url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | ------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| oid | num | 视频cid | 必要 | | -| ids | nums | 弹幕dmid列表 | 必要 | 多个id之间用`,`分隔 | - -**json回复** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | --------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| -------- | ---- | ---------------- | --------------------------------- | -| {弹幕id} | obj | 弹幕id对应的信息 | id分别对应请求参数中的`ids`,下同 | -| …… | obj | 弹幕id对应的信息 | | - -`{弹幕id}`对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------- | ---- | -------- | ------------------------------------------------------------ | -| likes | num | 点赞数 | | -| user_like | num | 是否点赞 | 0:未点赞
1:已点赞
需要登录(Cookie或APP)
未登录恒为0 | -| id_str | str | 弹幕dmid | | - -**示例** - -查询`cid=236871317`下的弹幕`35600074482384899`、`38880975220375559`、`39052528418553863`点赞数 - -```shell -curl -G 'https://api.bilibili.com/x/v2/dm/thumbup/stats' \ ---data-urlencode 'oid=236871317' \ ---data-urlencode 'ids=39019145405661191,38880975220375559,39052528418553863' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "38880975220375559": { - "likes": 1, - "user_like": 1, - "id_str": "38880975220375559" - }, - "39019145405661191": { - "likes": 3, - "user_like": 1, - "id_str": "39019145405661191" - }, - "39052528418553863": { - "likes": 2, - "user_like": 0, - "id_str": "39052528418553863" - } - } -} -``` - -
- ## 点赞弹幕 > https://api.bilibili.com/x/v2/dm/thumbup/add @@ -573,16 +491,18 @@ curl -G 'https://api.bilibili.com/x/v2/dm/thumbup/stats' \ 认证方式:Cookie(SESSDATA)或APP +查询指定弹幕点赞状态参阅文档 [弹幕点赞查询](thumbup.md) + **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------------------ | -------------- | ------------------------ | -| access_key | str | APP登录Token | APP方式必要 | | -| dmid | num | 弹幕dmid | 必要 | | -| oid | num | 视频cid | 必要 | | -| op | num | 操作 | 必要 | 1:点赞
2:取消点赞 | -| platform | str | 平台 | 非必要 | | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | ------------------------- | --------------- | ------------------------------------------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| dmid | num | 目标弹幕 dmid | 必要 | | +| oid | num | 目标弹幕所在视频 cid | 必要 | | +| op | num | 操作 | 必要 | 1:点赞
2:取消点赞 | +| platform | str | 平台标识 | 非必要 | web_player:web 播放器
android:安卓端 | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | **json回复:** @@ -600,12 +520,12 @@ curl -G 'https://api.bilibili.com/x/v2/dm/thumbup/stats' \ ```shell curl 'https://api.bilibili.com/x/v2/dm/thumbup/add' \ ---data-urlencode 'dmid=35600074482384899' \ ---data-urlencode 'oid=145928946' \ ---data-urlencode 'op=1' \ ---data-urlencode 'platform=web_player' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'dmid=35600074482384899' \ + --data-urlencode 'oid=145928946' \ + --data-urlencode 'op=1' \ + --data-urlencode 'platform=web_player' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
diff --git a/docs/danmaku/danmaku_proto.md b/docs/danmaku/danmaku_proto.md index 4835202..b3171bf 100644 --- a/docs/danmaku/danmaku_proto.md +++ b/docs/danmaku/danmaku_proto.md @@ -1,8 +1,8 @@ # protobuf弹幕 -2020年5月23日,哔哩哔哩网页端及移动端启用了新的默认弹幕api,网页端弹幕显示的上限变为原弹幕池上限的两倍。 +2020年5月23日,哔哩哔哩网页端及移动端启用了新的默认弹幕 API,网页端弹幕显示的上限变为原弹幕池上限的两倍。 -新的api是以6分钟为一个单位加载,即每次加载6分钟内的弹幕 +新的 API 是以 6min 为一个单位加载,即每次加载 6min 内的弹幕 ## 获取实时弹幕 @@ -18,26 +18,29 @@ 只能返回普通弹幕(`pool=1` `mode=1-7`)和代码弹幕(`pool=2` `mode=8`),BAS弹幕(`pool=2` `mode=9`)请从[弹幕元数据](danmaku_view_proto.md)中获取 -互动弹幕(UP主头像弹幕、关联视频、内嵌关注按钮)也不存在这个接口,请从[弹幕元数据](danmaku_view_proto.md)中获取 +互动弹幕(UP 主头像弹幕、关联视频、内嵌关注按钮)也不存在这个接口,请从[弹幕元数据](danmaku_view_proto.md)中获取 -**注:仅获取6min的整数倍时间内的弹幕,6min内最多弹幕数为6000条(如第一包中弹幕`progress`值域为0-360000)** +**注:仅获取 6min 的整数倍时间内的弹幕,6min 内最多弹幕数为 6000 条(如第一包中弹幕`progress`值域为0-360000)** **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------------- | ---- | -------- | ------ | ----------- | -| type | num | 弹幕类 | 必要 | 1:视频弹幕 | -| oid | num | 视频cid | 必要 | | -| pid | num | 稿件avid | 非必要 | | -| segment_index | num | 分包 | 必要 | 6分钟一包 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------------- | ---- | --------- | ------ | ---------------------------- | +| type | num | 弹幕类 | 必要 | 1:视频弹幕
2:漫画弹幕 | +| oid | num | 视频 cid | 必要 | | +| pid | num | 稿件 avid | 非必要 | | +| segment_index | num | 分包 | 必要 | 6min 一包 | +| pull_mode | num | (?) | 非必要 | | +| ps | num | (?) | 非必要 | | +| pe | num | (?) | 非必要 | | **proto回复:** -proto定义见:[bilibili.community.service.dm.v1.DmSegMobileReply](../grpc_api/bilibili/community/service/dm/v1/dm.proto) +proto定义见:[bilibili.community.service.dm.v1.DmSegMobileReply](../../grpc_api/bilibili/community/service/dm/v1/dm.proto) -- [protogen.marcgravell](https://protogen.marcgravell.com/): 在线编译protogen工具, 无需再安装本地编译器(生成文件需加后缀‘_pb2.py‘才可使用) +- [protogen.marcgravell](https://protogen.marcgravell.com/): 在线编译 protogen 工具, 无需再安装本地编译器(生成文件需加后缀`_pb2.py`才可使用) -- [protobuf pip](https://pypi.org/project/protobuf/): 可一键安装的python的protogen解析库 +- [protobuf pip](https://pypi.org/project/protobuf/): 可一键安装的 Python 的 protogen 解析库 消息`DmSegMobileReply`: @@ -47,26 +50,28 @@ proto定义见:[bilibili.community.service.dm.v1.DmSegMobileReply](../grpc_api 消息`DanmakuElem`: -| 名称 | 类型 | 含义 | 备注 | -| -------- | ------ | ------------------ | ------------------------------------------------------------ | -| id | int64 | 弹幕dmid | 唯一 可用于操作参数 | -| progress | int32 | 视频内弹幕出现时间 | 毫秒 | -| mode | int32 | 弹幕类型 | 1 2 3:普通弹幕
4:底部弹幕
5:顶部弹幕
6:逆向弹幕
7:高级弹幕
8:代码弹幕
9:BAS弹幕(仅限于特殊弹幕专包) | -| fontsize | int32 | 弹幕字号 | 18:小
25:标准
36:大 | -| color | uint32 | 弹幕颜色 | 十进制RGB888值 | -| midHash | string | 发送者mid的HASH | 用于屏蔽用户和查看用户发送的所有弹幕 也可反查用户id | -| content | string | 弹幕内容 | utf-8编码 | -| ctime | int64 | 弹幕发送时间 | 时间戳 | -| weight | int32 | 权重 | 用于智能屏蔽,根据弹幕语义及长度通过AI识别得出
范围:[0-10]
值越大权重越高 | -| action | string | 动作? | 作用尚不明确 | -| pool | int32 | 弹幕池 | 0:普通池
1:字幕池
2:特殊池(代码/BAS弹幕) | -| idStr | string | 弹幕dmid | 字串形式
唯一 可用于操作参数 | +| 名称 | 类型 | 含义 | 备注 | +| --------- | ------ | ------------------ | ------------------------------------------------------------ | +| id | int64 | 弹幕 dmid | 唯一 可用于操作参数 | +| progress | int32 | 视频内弹幕出现时间 | 毫秒 | +| mode | int32 | 弹幕类型 | 1 2 3:普通弹幕
4:底部弹幕
5:顶部弹幕
6:逆向弹幕
7:高级弹幕
8:代码弹幕
9:BAS 弹幕(仅限于特殊弹幕专包) | +| fontsize | int32 | 弹幕字号 | 18:小
25:标准
36:大 | +| color | uint32 | 弹幕颜色 | 十进制 RGB888 值 | +| midHash | string | 发送者 mid 的 HASH | 用于屏蔽用户和查看用户发送的所有弹幕,也可反查用户id | +| content | string | 弹幕内容 | utf-8编码 | +| ctime | int64 | 弹幕发送时间 | 时间戳 | +| weight | int32 | 权重 | 用于智能屏蔽,根据弹幕语义及长度通过AI识别得出
范围:[0-10]
值越大权重越高 | +| action | string | 动作? | | +| pool | int32 | 弹幕池 | 0:普通池
1:字幕池
2:特殊池(代码/BAS弹幕) | +| idStr | string | 弹幕 dmid | 字串形式
唯一 可用于操作参数 | +| attr | int32 | 弹幕属性位 | bit0:保护
bit1:直播
bit2:高赞 | +| animation | string | 动画? | | **示例:** -获取视频`av810872(cid=1176840)`(炮姐)的实时弹幕分包1 +获取视频`av810872(cid=1176840)`(炮姐)的实时弹幕分包 1 -**注:[proto定义](../grpc_api/bilibili/community/service/dm/v1/dm.proto)需要编译,`bilibili.community.service.dm.v1.dm_pb2`并非通过pypi安装** +**注:以下[proto定义](../grpc_api/bilibili/community/service/dm/v1/dm.proto)需要编译,`bilibili.community.service.dm.v1.dm_pb2`并非通过 pypi 安装** ```python import requests diff --git a/docs/danmaku/thumbup.md b/docs/danmaku/thumbup.md new file mode 100644 index 0000000..0d59ff9 --- /dev/null +++ b/docs/danmaku/thumbup.md @@ -0,0 +1,104 @@ +# 弹幕点赞查询 + +## 查询指定dmid的点赞数 + +> https://api.bilibili.com/x/v2/dm/thumbup/stats + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------------- | ------ | --------------------- | +| oid | num | 视频 cid | 必要 | | +| ids | nums | 欲查询的弹幕 dmid | 必要 | 多个 id 之间用`,`分隔 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------------------------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 弹幕 id 与之对应数据的 Map | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | -------------------------- | ---- | +| {弹幕 dmid} | obj | {弹幕 dmid} 对应的点赞信息 | | + +`{弹幕 dmid}`对象: + +| 字段 | 类型 | 内容 | 备注 | +| -------------------- | ---- | ---------------------- | ------------------------------------------------------- | +| likes | num | 对应弹幕所获得的点赞数 | | +| user_like | num | 当前用户是否点赞 | 0:未点赞
1:已点赞
需要登录(Cookie 或 APP) | +| id_str | str | 弹幕 dmid 字符串形式 | | +| show_threshold | num | (?) | | +| reply_count | num | (?) | | +| gray_release_control | obj | (?) | | + +`gray_release_control`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------------- | ---- | ------ | ---- | +| show_dm_reply | bool | (?) | | + +**示例:** + +获取视频 BV1AP411d7Qa 1P(cid=1131648710)下的几个弹幕 dmid`1318231376180646144,1318231518484950784,1318231736680887808` + +```bash +curl -G 'https://api.bilibili.com/x/v2/dm/thumbup/stats' \ + --data-urlencode 'oid=1131648710' \ + --data-urlencode 'ids=1318231376180646144,1318231518484950784,1318231736680887808' \ + -b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "1318231376180646144": { + "likes": 0, + "user_like": 0, + "id_str": "1318231376180646144", + "show_threshold": 10, + "reply_count": 0, + "gray_release_control": { + "show_dm_reply": false + } + }, + "1318231518484950784": { + "likes": 0, + "user_like": 0, + "id_str": "1318231518484950784", + "show_threshold": 10, + "reply_count": 0, + "gray_release_control": { + "show_dm_reply": false + } + }, + "1318231736680887808": { + "likes": 0, + "user_like": 0, + "id_str": "1318231736680887808", + "show_threshold": 10, + "reply_count": 0, + "gray_release_control": { + "show_dm_reply": false + } + } + } +} +``` + +
From 37727fe6dc6af0cc624fe4940df324a7ab63d7a7 Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Wed, 17 May 2023 11:10:06 +0800 Subject: [PATCH 016/159] update 404 manga url --- docs/web_widget/404_manga.md | 132 +++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/docs/web_widget/404_manga.md b/docs/web_widget/404_manga.md index d6426ae..3cab064 100644 --- a/docs/web_widget/404_manga.md +++ b/docs/web_widget/404_manga.md @@ -30,6 +30,8 @@ ## dynamic类型 +以下内容爬取自接口`https://api.bilibili.com/x/activity/operation/list?source_id=630edcfddbd0b39ca7371ad2&pn=1&ps=5`且进行去重 + [https://i0.hdslb.com/bfs/activity-plat/cover/20171215/o6y3r7or6z.png](https://i0.hdslb.com/bfs/activity-plat/cover/20171215/o6y3r7or6z.png) [https://i0.hdslb.com/bfs/activity-plat/cover/20171215/2978n4wwpj.png](https://i0.hdslb.com/bfs/activity-plat/cover/20171215/2978n4wwpj.png) @@ -187,3 +189,133 @@ [https://i0.hdslb.com/bfs/activity-plat/cover/20170511/122k3z3lp3.png](https://i0.hdslb.com/bfs/activity-plat/cover/20170511/122k3z3lp3.png) [https://i0.hdslb.com/bfs/activity-plat/cover/20170511/w44xw6r98w.png](https://i0.hdslb.com/bfs/activity-plat/cover/20170511/w44xw6r98w.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/moCBusxHG2.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/moCBusxHG2.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/LJjOhuzi2l.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/LJjOhuzi2l.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/fzjTcKtbOA.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/fzjTcKtbOA.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/PEXod21DmE.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/PEXod21DmE.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/5NYt7b0jWy.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/5NYt7b0jWy.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/I6DotAbsU0.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/I6DotAbsU0.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/VZkCQV3H8N.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/VZkCQV3H8N.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/pMst3j1Wh2.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/pMst3j1Wh2.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/FFBsId9kkU.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/FFBsId9kkU.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/j8PQollWgb.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/j8PQollWgb.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/CvPAnLwfLB.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/CvPAnLwfLB.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/86Og1GMuE6.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/86Og1GMuE6.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/4gKxYMNEd7.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/4gKxYMNEd7.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/VUahg7oVIp.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/VUahg7oVIp.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/0Wp3GSTqa2.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/0Wp3GSTqa2.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/GI167h1ubu.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/GI167h1ubu.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/abiv2iRJiN.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/abiv2iRJiN.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/vocgKB4Bjl.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/vocgKB4Bjl.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/6cLRxO9RkR.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/6cLRxO9RkR.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/aoqhUIvZ3x.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/aoqhUIvZ3x.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/zRespfCkmo.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/zRespfCkmo.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/3wdVaSoWjI.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/3wdVaSoWjI.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/XywNN8KlpA.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/XywNN8KlpA.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/Yg8QV17GKZ.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/Yg8QV17GKZ.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/h4ytfrWZID.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/h4ytfrWZID.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/J8BB0k7uKM.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/J8BB0k7uKM.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/i8sLpoa4Wn.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/i8sLpoa4Wn.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/XHhqvtddUA.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/XHhqvtddUA.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/hr97jf0KpZ.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/hr97jf0KpZ.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/DUmMBOlW5E.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/DUmMBOlW5E.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/dKua3o3HRw.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/dKua3o3HRw.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/f1BYK2oCwp.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/f1BYK2oCwp.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/els4Nwd0F6.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/els4Nwd0F6.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/PSI3OAv9Hs.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/PSI3OAv9Hs.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/JGrXDA8RKH.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/JGrXDA8RKH.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/wT6pn2O18p.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/wT6pn2O18p.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/Okx4iJ1PLv.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/Okx4iJ1PLv.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/8Ri6Xlk826.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/8Ri6Xlk826.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/nNEBpbZlI0.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/nNEBpbZlI0.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/HtPXYfpuXU.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/HtPXYfpuXU.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/Wwzw0XTwUl.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/Wwzw0XTwUl.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/E738vcDvd3.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/E738vcDvd3.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/dFQfkypPWA.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/dFQfkypPWA.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/hinEAw6Abq.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/hinEAw6Abq.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/KNH7Hz104m.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/KNH7Hz104m.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/2ETVB2F8Pq.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/2ETVB2F8Pq.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/Bk5vekQZoa.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/Bk5vekQZoa.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/IcRizWqXCq.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/IcRizWqXCq.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/jvNq7sSxAT.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/jvNq7sSxAT.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/laYMWQCnnY.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/laYMWQCnnY.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/I2ep6rPv8i.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/I2ep6rPv8i.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/HKynZO2AxL.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/HKynZO2AxL.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/dtYHFq8LIq.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/dtYHFq8LIq.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/egQQvfxwvY.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/egQQvfxwvY.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/duwQurWqyy.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/duwQurWqyy.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/wqP0BMH8vp.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/wqP0BMH8vp.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/00FlTw9i50.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/00FlTw9i50.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/V8wFvnEm3T.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/V8wFvnEm3T.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/VrYZXfmehY.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/VrYZXfmehY.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/QBchCuhVFr.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/QBchCuhVFr.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/hJo8sPKDkj.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/hJo8sPKDkj.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/JnqnvZTKxf.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/JnqnvZTKxf.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/0gu9qonH7t.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/0gu9qonH7t.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/aA5e4coXVQ.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/aA5e4coXVQ.png) + +[https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/UM9bnucVhq.png](https://i0.hdslb.com/bfs/activity-plat/static/2cf2b9af5d3c5781d611d6e36f405144/UM9bnucVhq.png) \ No newline at end of file From 410e8d8d35341687252d74471bbae3beb2d10276 Mon Sep 17 00:00:00 2001 From: Sheep-realms <38580457+sheep-realms@users.noreply.github.com> Date: Wed, 17 May 2023 16:45:08 +0800 Subject: [PATCH 017/159] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=B6=85=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E9=83=A8=E5=88=86=E6=8F=8F=E8=BF=B0=20(#673)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 更新获取视频超详细信息中的vip对象描述 * view_addit 对象新增3项作用不明的字段 * 更新用户认证信息描述 * 更新示例 --- docs/video/info.md | 49 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/docs/video/info.md b/docs/video/info.md index 60c5e83..e83c03b 100644 --- a/docs/video/info.md +++ b/docs/video/info.md @@ -653,7 +653,7 @@ https://i1.hdslb.com/bfs/archive/ea0dd34bf41e23a68175680a00e3358cd249105f.jpg | 字段 | 类型 | 内容 | 备注 | |-------|-----|------|---------------------------------------| -| role | num | 认证类型 | 0:无
1 2 7:个人认证
3 4 5 6:机构认证 | +| role | num | 认证类型 | 见[用户认证类型一览](../user/official_role.md) | | title | str | 认证信息 | 无为空 | | desc | str | 认证备注 | 无为空 | | type | num | 是否认证 | -1:无
0:认证 | @@ -667,14 +667,37 @@ https://i1.hdslb.com/bfs/archive/ea0dd34bf41e23a68175680a00e3358cd249105f.jpg `card`中的`vip`对象: -| 字段 | 类型 | 内容 | 备注 | -|---------------|-----|-------|----------------------------------| -| vipType | num | 大会员类型 | 0:无
1:月度大会员
2:年度及以上大会员 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | -| vipStatus | num | 大会员状态 | 0:无
1:有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| theme_type | num | 0 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +|----------------------|-----|-----------|----------------------------------------------| +| type | num | 会员类型 | 0:无
1:月大会员
2:年度及以上大会员 | +| status | num | 会员状态 | 0:无
1:有 | +| due_date | num | 会员过期时间 | Unix时间戳(毫秒) | +| vip_pay_type | num | 支付类型 | 0:未支付(常见于官方账号)
1:已支付(以正常渠道获取的大会员均为此值) | +| theme_type | num | 0 | 作用尚不明确 | +| label | obj | 会员标签 | | +| avatar_subscript | num | 是否显示会员图标 | 0:不显示
1:显示 | +| nickname_color | str | 会员昵称颜色 | 颜色码,一般为`#FB7299`,曾用于愚人节改变大会员配色 | +| role | num | 大角色类型 | 1:月度大会员
3:年度大会员
7:十年大会员
15:百年大会员 | +| avatar_subscript_url | str | 大会员角标地址 | | +| tv_vip_status | num | 电视大会员状态 | 0:未开通 | +| tv_vip_pay_type | num | 电视大会员支付类型 | | + +`vip`中的`label`对象: + +| 字段 | 类型 | 内容 | 备注 | +|---------------------------|------|----------|------------------------------------------------------------------------------------------------------------------------------| +| path | str | 空 | 作用尚不明确 | +| text | str | 会员类型文案 | `大会员` `年度大会员` `十年大会员` `百年大会员` `最强绿鲤鱼` | +| label_theme | str | 会员标签 | vip:大会员
annual_vip:年度大会员
ten_annual_vip:十年大会员
hundred_annual_vip:百年大会员
fools_day_hundred_annual_vip:最强绿鲤鱼 | +| text_color | str | 会员标签 | | +| bg_style | num | 1 | | +| bg_color | str | 会员标签背景颜色 | 颜色码,一般为`#FB7299`,曾用于愚人节改变大会员配色 | +| border_color | str | 会员标签边框颜色 | 未使用 | +| use_img_label | bool | `true` | | +| img_label_uri_hans | str | `空串` | | +| img_label_uri_hant | str | `空串` | | +| img_label_uri_hans_static | str | 大会员牌子图片 | 简体版 | +| img_label_uri_hant_static | str | 大会员牌子图片 | 繁体版 `Card`中的`space`对象: @@ -716,6 +739,9 @@ https://i1.hdslb.com/bfs/archive/ea0dd34bf41e23a68175680a00e3358cd249105f.jpg |-----|------|-------|--------| | 63 | bool | false | 作用尚不明确 | | 64 | bool | false | 作用尚不明确 | +| 69 | bool | false | 作用尚不明确 | +| 71 | bool | false | 作用尚不明确 | +| 72 | bool | false | 作用尚不明确 | **示例:** @@ -3161,7 +3187,10 @@ curl -G 'https://api.bilibili.com/x/web-interface/view/detail' \ "recommend": null, "view_addit": { "63": false, - "64": false + "64": false, + "69": false, + "71": false, + "72": false } } } From 09c167af4512c40d26002a1d9b173b33da6fd9df Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Thu, 18 May 2023 11:58:50 +0800 Subject: [PATCH 018/159] =?UTF-8?q?update=E3=80=90=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=8A=95=E7=A8=BF=E3=80=91APIDoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/user/space.md | 128 ++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 65 deletions(-) diff --git a/docs/user/space.md b/docs/user/space.md index ba6852f..2e53826 100644 --- a/docs/user/space.md +++ b/docs/user/space.md @@ -2624,38 +2624,37 @@ curl -L -X GET 'https://api.bilibili.com/x/space/like/video?vmid=15858903' > https://api.bilibili.com/x/space/wbi/arc/search -> https://api.bilibili.com/x/space/arc/search (旧) - -PS:旧 api 存在一些不同,比如某些情况下,例如 mid=2 时如果没有设置 Cookie 则出现非法访问(-401),但新 api 不会。 +> ~~https://api.bilibili.com/x/space/arc/search (旧 API,现已不可用)~~ +PS:旧 API 现已不可使用,活返回`code=-799` *请求方式:GET* **header字段:** -必须要有 `user-agent`,且不能为 `空字符串`,以及含有 `python`、`node`、`curl` 等的字符串。 +必须要有 `user-agent`,且不能为 `空字符串`,以及含有 `python`、`node`、`curl` 等的字符串 **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|---------|-----|---------|-----|-------------------------------------------------------------| -| mid | num | 目标用户mid | 必要 | | -| order | str | 排序方式 | 非必要 | 默认为pubdate
最新发布:pubdate
最多播放:click
最多收藏:stow | -| tid | num | 筛选目标分区 | 非必要 | 默认为0
0:不进行分区筛选
分区tid为所筛选的分区 | -| keyword | str | 关键词筛选 | 非必要 | 用于使用关键词搜索该UP主视频稿件 | -| pn | num | 页码 | 非必要 | | -| ps | num | 每页项数 | 非必要 | 最小1,最大50,默认30 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------- | ---- | ------------ | ------ | ------------------------------------------------------------ | +| mid | num | 目标用户mid | 必要 | | +| order | str | 排序方式 | 非必要 | 默认为pubdate
最新发布:pubdate
最多播放:click
最多收藏:stow | +| tid | num | 筛选目标分区 | 非必要 | 默认为0
0:不进行分区筛选
分区tid为所筛选的分区 | +| keyword | str | 关键词筛选 | 非必要 | 用于使用关键词搜索该UP主视频稿件 | +| pn | num | 页码 | 非必要 | | +| ps | num | 每页项数 | 非必要 | 最小 1,最大 50,默认 30 | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|----------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-400:请求错误
-412:请求被拦截
-1200:被降级过滤的请求(一种意义不明的偶发状况) | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-400:请求错误
-412:请求被拦截
-1200:被降级过滤的请求(一种意义不明的偶发状况) | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | `data`对象: @@ -2677,55 +2676,55 @@ PS:旧 api 存在一些不同,比如某些情况下,例如 mid=2 时如果 `list`中的`tlist`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-----|--------|--------------| -| {tid} | obj | 该分区的详情 | 字段名为存在的分区tid | -| …… | obj | …… | 向下扩展 | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | ------------ | ---------------------- | +| {tid} | obj | 该分区的详情 | 字段名为存在的分区 tid | +| …… | obj | …… | 向下扩展 | `tlist`中的`{tid}`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-----|------------|-----| -| count | num | 投稿至该分区的视频数 | | -| name | str | 该分区名称 | | -| tid | num | 该分区tid | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | -------------------- | ---- | +| count | num | 投稿至该分区的视频数 | | +| name | str | 该分区名称 | | +| tid | num | 该分区 tid | | `list`中的`vlist`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|-----------|-----| -| 0 | obj | 投稿视频1 | | -| n | obj | 投稿视频(n+1) | | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | ---- | +| 0 | obj | 投稿视频 1 | | +| n | obj | 投稿视频(n+1) | | +| …… | obj | …… | …… | `list`中的`vlist`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|------------------|------|----------|--------------------------------------------------------------------------------| -| aid | num | 稿件avid | | -| author | str | 视频UP主 | 不一定为目标用户(合作视频) | -| bvid | str | 稿件bvid | | -| comment | num | 视频评论数 | | -| copyright | str | 空 | 作用尚不明确 | -| created | num | 投稿时间 | 时间戳 | -| description | str | 视频简介 | | -| hide_click | bool | false | 作用尚不明确 | -| is_pay | num | 0 | 作用尚不明确 | -| is_union_video | num | 是否为合作视频 | 0:否
1:是 | -| length | str | 视频长度 | MM:SS | -| mid | num | 视频UP主mid | 不一定为目标用户(合作视频) | -| pic | str | 视频封面 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------------- | ---- | -------------- | ------------------------------------------------------------ | +| aid | num | 稿件 avid | | +| author | str | 视频 UP 主 | 不一定为目标用户(合作视频) | +| bvid | str | 稿件 bvid | | +| comment | num | 视频评论数 | | +| copyright | str | 稿件类型 | 1:原创
2:转载 | +| created | num | 投稿时间 | 时间戳 | +| description | str | 视频简介 | | +| hide_click | bool | false | 作用尚不明确 | +| is_pay | num | 0 | 作用尚不明确 | +| is_union_video | num | 是否为合作视频 | 0:否
1:是 | +| length | str | 视频长度 | MM:SS | +| mid | num | 视频 UP 主 mid | 不一定为目标用户(合作视频) | +| pic | str | 视频封面 | | | play | num | 视频播放次数 | 如果视频基本信息API对应的状态为-403视频访问权限不足,数据类型将变为str,如("play": "--",),于mid79发表的av5132474可见 | -| review | num | 0 | 作用尚不明确 | -| subtitle | str | 空 | 作用尚不明确 | -| title | str | 视频标题 | | -| typeid | num | 视频分区tid | | -| video_review | num | 视频弹幕数 | | -| is_steins_gate | num | 0 | | -| is_live_playback | num | 0 | | -| meta | | | | -| is_avoided | num | 0 | | -| attribute | num | 0 | | +| review | num | 0 | 作用尚不明确 | +| subtitle | str | 空 | 作用尚不明确 | +| title | str | 视频标题 | | +| typeid | num | 视频分区 tid | | +| video_review | num | 视频弹幕数 | | +| is_steins_gate | num | 0 | | +| is_live_playback | num | 0 | | +| meta | | | | +| is_avoided | num | 0 | | +| attribute | num | 0 | | `data`中的`page`对象: @@ -2737,10 +2736,10 @@ PS:旧 api 存在一些不同,比如某些情况下,例如 mid=2 时如果 `data`中的`episodic_button`对象: -| 字段 | 类型 | 内容 | 备注 | -|------|-----|----------|-----| -| text | str | 按钮文字 | | -| uri | str | 全部播放页url | | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | -------------- | ---- | +| text | str | 按钮文字 | | +| uri | str | 全部播放页 url | | **示例:** @@ -2750,10 +2749,9 @@ PS:旧 api 存在一些不同,比如某些情况下,例如 mid=2 时如果 ```shell curl -G 'https://api.bilibili.com/x/space/wbi/arc/search' \ ---data-urlencode 'mid=53456' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ ---user-agent 'go' + --data-urlencode 'mid=53456' \ + --data-urlencode 'ps=2' \ + --data-urlencode 'pn=1' ```
From 48402b2fadee6bc62cc036ccf3a3a873c98f123e Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Thu, 18 May 2023 18:38:22 +0800 Subject: [PATCH 019/159] =?UTF-8?q?add=E3=80=90music=20rank=E3=80=91APIDoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- docs/audio/rank.md | 1160 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1161 insertions(+), 1 deletion(-) create mode 100644 docs/audio/rank.md diff --git a/README.md b/README.md index 8e59c88..ed15709 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ B站 API 采用 C/S 结构,大多数接口为 REST API 和 gRPC,少部分接 - [ ] [状态数](docs/audio/status_number.md) - [ ] [投币 & 收藏](docs/audio/action.md) - [x] [播放 & 下载地址(音频流)](docs/audio/musicstream_url.md) - - [ ] 音频榜单 + - [x] [音频榜单](docs/audio/rank.md) - [ ] [排行榜 & 最新视频](docs/video_ranking) - [ ] [排行榜](docs/video_ranking/ranking.md) - [ ] [热门视频](docs/video_ranking/popular.md) diff --git a/docs/audio/rank.md b/docs/audio/rank.md new file mode 100644 index 0000000..0798565 --- /dev/null +++ b/docs/audio/rank.md @@ -0,0 +1,1160 @@ +# 音频榜单 + +以下接口均来自页面 https://music.bilibili.com/pc/rank + +## 获取音频榜单每期列表 + +> https://api.bilibili.com/x/copyright-music-publicity/toplist/all_period + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| --------- | ---- | ------------------------ | ------ | ---------------------- | +| list_type | num | 榜单类型 | 必要 | 1:热榜
2:原创榜 | +| csrf | str | CSRF Token(位于cookie) | 非必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | -------- | ---- | +| list | obj | 年份索引 | | + +`data`中的`list`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------ | ----- | ---------------------- | ---- | +| {年份} | array | 对应年份索引的每期信息 | | +| …… | array | …… | | + +`list`中的`{年份}`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ---------------- | ---- | +| 0 | obj | 该年中的单期数据 | | +| …… | obj | …… | …… | + +`{年份}`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------------ | ---- | -------- | -------- | +| ID | num | 榜单 id | | +| priod | num | 榜单期数 | | +| publish_time | num | 发布时间 | 秒时间戳 | + +**示例:** + +```bash +curl -G 'https://api.bilibili.com/x/copyright-music-publicity/toplist/all_period' \ + --data-urlencode 'list_type=1' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "list": { + "2022": [ + { + "ID": 38, + "priod": 29, + "publish_time": 1672394399 + }, + { + "ID": 36, + "priod": 28, + "publish_time": 1671789599 + }, + { + "ID": 34, + "priod": 27, + "publish_time": 1671184800 + }, + { + "ID": 32, + "priod": 26, + "publish_time": 1670579999 + }, + { + "ID": 30, + "priod": 25, + "publish_time": 1669976540 + }, + { + "ID": 28, + "priod": 24, + "publish_time": 1669370757 + }, + { + "ID": 26, + "priod": 23, + "publish_time": 1668766987 + }, + { + "ID": 22, + "priod": 22, + "publish_time": 1668163419 + }, + { + "ID": 21, + "priod": 21, + "publish_time": 1667558276 + }, + { + "ID": 20, + "priod": 20, + "publish_time": 1666951199 + }, + { + "ID": 19, + "priod": 19, + "publish_time": 1666346399 + }, + { + "ID": 18, + "priod": 18, + "publish_time": 1665741599 + }, + { + "ID": 17, + "priod": 17, + "publish_time": 1665136799 + }, + { + "ID": 16, + "priod": 16, + "publish_time": 1664531999 + }, + { + "ID": 15, + "priod": 15, + "publish_time": 1663927199 + }, + { + "ID": 14, + "priod": 14, + "publish_time": 1663322399 + }, + { + "ID": 13, + "priod": 13, + "publish_time": 1662717599 + }, + { + "ID": 12, + "priod": 12, + "publish_time": 1662113559 + }, + { + "ID": 11, + "priod": 11, + "publish_time": 1661508657 + }, + { + "ID": 10, + "priod": 10, + "publish_time": 1660903199 + }, + { + "ID": 9, + "priod": 9, + "publish_time": 1660298400 + }, + { + "ID": 8, + "priod": 8, + "publish_time": 1659693599 + }, + { + "ID": 7, + "priod": 7, + "publish_time": 1659088799 + }, + { + "ID": 6, + "priod": 6, + "publish_time": 1658483999 + }, + { + "ID": 5, + "priod": 5, + "publish_time": 1657879200 + }, + { + "ID": 4, + "priod": 4, + "publish_time": 1657274399 + }, + { + "ID": 3, + "priod": 3, + "publish_time": 1656669600 + }, + { + "ID": 2, + "priod": 2, + "publish_time": 1656064800 + }, + { + "ID": 1, + "priod": 1, + "publish_time": 1655460091 + } + ], + "2023": [ + { + "ID": 76, + "priod": 48, + "publish_time": 1683885696 + }, + { + "ID": 74, + "priod": 47, + "publish_time": 1683281010 + }, + { + "ID": 72, + "priod": 46, + "publish_time": 1682675999 + }, + { + "ID": 70, + "priod": 45, + "publish_time": 1682071442 + }, + { + "ID": 68, + "priod": 44, + "publish_time": 1681466400 + }, + { + "ID": 66, + "priod": 43, + "publish_time": 1680861599 + }, + { + "ID": 64, + "priod": 42, + "publish_time": 1680256799 + }, + { + "ID": 62, + "priod": 41, + "publish_time": 1679652088 + }, + { + "ID": 60, + "priod": 40, + "publish_time": 1679047199 + }, + { + "ID": 58, + "priod": 39, + "publish_time": 1678442399 + }, + { + "ID": 56, + "priod": 38, + "publish_time": 1677837600 + }, + { + "ID": 54, + "priod": 37, + "publish_time": 1677232800 + }, + { + "ID": 52, + "priod": 36, + "publish_time": 1676628000 + }, + { + "ID": 50, + "priod": 35, + "publish_time": 1676023199 + }, + { + "ID": 48, + "priod": 34, + "publish_time": 1675418399 + }, + { + "ID": 46, + "priod": 33, + "publish_time": 1674813599 + }, + { + "ID": 44, + "priod": 32, + "publish_time": 1674208799 + }, + { + "ID": 42, + "priod": 31, + "publish_time": 1673603999 + }, + { + "ID": 40, + "priod": 30, + "publish_time": 1672999199 + } + ] + } + } +} +``` + +
+ +## 查询音频榜单单期信息 + +> https://api.bilibili.com/x/copyright-music-publicity/toplist/detail + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------- | ---- | ------------------------ | ------ | ------------------------------------------------ | +| list_id | num | 榜单 id | 必要 | 见 [获取音频榜单每期列表](#获取音频榜单每期列表) | +| csrf | str | CSRF Token(位于cookie) | 非必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------------ | ---- | ----------------------- | ------------------------------------------------------------ | +| listen_fid | num | 畅听版歌单收藏夹原始 id | 非真实收藏夹 mlid
需要在后方拼接用户 mid 的后两位,如`16484498`->`1648449844` | +| all_fid | num | 完整版歌单收藏夹原始 id | 非真实收藏夹 mlid
算法同上 | +| fav_mid | num | 绑定收藏夹用户的 mid | 例如`1164440244`([音乐热榜bot](https://space.bilibili.com/1164440244)账号) | +| cover_url | str | 榜单封面 url | | +| is_subscribe | bool | 是否已订阅榜单 | `true`:已订阅
`false`:未订阅
需要登录(Cookie 或 APP),未登录恒为`false` | +| listen_count | num | 平台有版权音频的数量 | | + +**示例:** + +查询 [第 48 期音频榜单](https://music.bilibili.com/pc/rank?list_id=76)(id=76) 信息 + +```bash +curl -G 'https://api.bilibili.com/x/copyright-music-publicity/toplist/detail' \ + --data-urlencode 'list_id=76' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "listen_fid": 23317138, + "all_fid": 23672948, + "fav_mid": 1164440244, + "cover_url": "http://i0.hdslb.com/bfs/music-publicity/d8509dc6ee94dd5cc4658a2cbca4f525b4396df5.png", + "is_subscribe": false, + "listen_count": 5 + } +} +``` + +
+ +## 获取音频榜单单期内容 + +> https://api.bilibili.com/x/copyright-music-publicity/toplist/music_list + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------- | ---- | ------------------------ | ------ | ------------------------------------------------ | +| list_id | num | 榜单 id | 必要 | 见 [获取音频榜单每期列表](#获取音频榜单每期列表) | +| csrf | str | CSRF Token(位于cookie) | 非必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ----- | -------- | ---- | +| list | array | 内容列表 | | + +`data`中的`list`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------------- | ---- | +| 0 | obj | 榜单内容 1 | | +| n | obj | 榜单内容 (n+1) | | +| …… | obj | …… | …… | + +`list`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----------------- | ----- | ------------------ | ------------------------------------------- | +| music_id | str | 音频 MAID | 例如`MA409252256362326366` | +| music_title | str | 音频标题 | | +| singer | str | 音频作者 | | +| album | str | 音频专辑 | | +| mv_aid | num | 音频 MV 的 avid | 若该音频无 MV 则该字段为 0 | +| mv_bvid | str | 音频 MV 的 bvid | | +| mv_cover | str | 音频封面 url | | +| heat | num | 热度值 | | +| rank | num | 排序值 | 1 为最高排序,DESC 方式 | +| can_listen | bool | 平台是否有版权 | `true`:平台有版权
`false`:平台无版权 | +| recommendation | str | (?) | | +| creation_aid | num | 关联稿件 avid | | +| creation_bvid | str | 关联稿件 bvid | | +| creation_cover | str | 关联稿件封面 url | | +| creation_title | str | 关联稿件标题 | | +| creation_up | num | 关联稿件 UP 主 mid | | +| creation_nickname | str | 关联稿件 UP 主昵称 | | +| creation_duration | num | 关联稿件时长 | 单位为秒 | +| creation_play | num | 关联稿件播放量 | | +| creation_reason | str | 关联稿件二级分区名 | | +| achievements | array | 获得成就 | | +| material_id | num | (?) | | +| material_use_num | num | (?) | | +| material_duration | num | (?) | | +| material_show | num | (?) | | +| song_type | num | (?) | | + +`list`数组中的对象中的`achievements`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------------- | ---- | +| 0 | str | 成就文案 1 | | +| n | str | 成就文案 (n+1) | | +| …… | str | …… | …… | + +**示例:** + +查询 [第 48 期音频榜单](https://music.bilibili.com/pc/rank?list_id=76)(id=76) 榜单内容列表 + +```bash +curl -G 'https://api.bilibili.com/x/copyright-music-publicity/toplist/music_list' \ + --data-urlencode 'list_id=76' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "list": [ + { + "music_id": "MA409252256362326366", + "music_title": "極楽浄土", + "singer": "GARNiDELiA", + "album": "約束 -Promise code-", + "mv_aid": 28361833, + "mv_bvid": "BV1us41137Fd", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/07e0d9826c574e37df25387cab6df062.jpg", + "heat": 5328979, + "rank": 1, + "can_listen": true, + "recommendation": "", + "creation_aid": 910787823, + "creation_bvid": "BV1HM4y1b79Z", + "creation_cover": "http://i1.hdslb.com/bfs/archive/5780a05437ec9880301ed093537d6af97b0f8bdb.jpg", + "creation_title": "【MARiA】乘风2023初舞台!《极乐净土》,虽迟但到!", + "creation_up": 110352985, + "creation_nickname": "GARNiDELiA", + "creation_duration": 100, + "creation_play": 13487670, + "creation_reason": "官方现场", + "achievements": [ + "重回榜单", + "最高排名1" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA456045402056087707", + "music_title": "アイドル", + "singer": "YOASOBI", + "album": "アイドル", + "mv_aid": 227499491, + "mv_bvid": "BV17h411u7sb", + "mv_cover": "http://i0.hdslb.com/bfs/station_src/music_metadata/4bf2fe90e9d2361c3c4ddf59064c6e69.jpg", + "heat": 1856277, + "rank": 2, + "can_listen": false, + "recommendation": "", + "creation_aid": 952765045, + "creation_bvid": "BV1Ws4y1A7fS", + "creation_cover": "http://i0.hdslb.com/bfs/archive/8326350bab039ffee9274d7e1f94240d170fa096.jpg", + "creation_title": "【中文字幕】我推的孩子「アイドル」官方MV(4K 60帧/Hi-Res)", + "creation_up": 11585165, + "creation_nickname": "爱莉丝青贝尔克", + "creation_duration": 226, + "creation_play": 3742892, + "creation_reason": "音乐MV", + "achievements": [ + "本期排名持平", + "最高排名1" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA458652518440821364", + "music_title": "野火wildfire", + "singer": "HOYO- Mix,Jonathan Steingard", + "album": "雪融于烬", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/e0825a2cfee22ce77f02d4d80826a1d9.jpg", + "heat": 1767135, + "rank": 3, + "can_listen": false, + "recommendation": "", + "creation_aid": 355732312, + "creation_bvid": "BV1ZX4y117Dx", + "creation_cover": "http://i0.hdslb.com/bfs/archive/c98bd629876e8b7b4c056d39bcfeaabe7327e996.jpg", + "creation_title": "这首“野火”神曲,我还能再听亿遍!!!", + "creation_up": 394861137, + "creation_nickname": "Hanserのcece", + "creation_duration": 219, + "creation_play": 2158925, + "creation_reason": "动画创作", + "achievements": [ + "本期排名↑1", + "最高排名3" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA459088929228874460", + "music_title": "不问别离", + "singer": "指尖笑", + "album": "不问别离", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "http://i0.hdslb.com/bfs/station_src/music_metadata/b1507c1649500a0dcf0295b4b68e4b15.jpg", + "heat": 1576823, + "rank": 4, + "can_listen": false, + "recommendation": "", + "creation_aid": 740818022, + "creation_bvid": "BV1Sk4y1E7qH", + "creation_cover": "http://i2.hdslb.com/bfs/archive/5301b2fee7ad520c8946b5eb92888cf8be563a80.jpg", + "creation_title": "日推歌单 | \"我叹那春花秋月不问别离 长风起孤城笛声里全是你\" |《不问ciaga》", + "creation_up": 550445292, + "creation_nickname": "peach63", + "creation_duration": 164, + "creation_play": 274898, + "creation_reason": "音乐MV", + "achievements": [ + "本期排名↑10", + "最高排名4" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA459819223808501000", + "music_title": "Spicy", + "singer": "aespa", + "album": "MY WORLD - The 3rd Mini Album", + "mv_aid": 570920682, + "mv_bvid": "BV1qz4y1a7m8", + "mv_cover": "http://i0.hdslb.com/bfs/station_src/music_metadata/6455687e7d72dd838ffd2aa753fd7761.jpg", + "heat": 1441365, + "rank": 5, + "can_listen": false, + "recommendation": "", + "creation_aid": 570920682, + "creation_bvid": "BV1qz4y1a7m8", + "creation_cover": "http://i2.hdslb.com/bfs/archive/cd5456735bd645343a51b8df9b4a91236b08e657.jpg", + "creation_title": "aespa《Spicy》MV", + "creation_up": 3493085782739496, + "creation_nickname": "SMTOWN", + "creation_duration": 205, + "creation_play": 2363321, + "creation_reason": "官方MV", + "achievements": [ + "新晋上榜", + "最高排名5" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA458946536466866804", + "music_title": "UNFORGIVEN (feat. Nile Rodgers)", + "singer": "LE SSERAFIM,Nile Rodgers", + "album": "UNFORGIVEN", + "mv_aid": 528370662, + "mv_bvid": "BV1LM41137Pc", + "mv_cover": "http://i0.hdslb.com/bfs/station_src/music_metadata/47e6685cfe44185ec4daab5e765e3b26.jpg", + "heat": 1362593, + "rank": 6, + "can_listen": true, + "recommendation": "", + "creation_aid": 698312930, + "creation_bvid": "BV1wm4y1y76i", + "creation_cover": "http://i1.hdslb.com/bfs/archive/4f097f5067fc3408118f7d59b2c36d8278660dd9.jpg", + "creation_title": "假如让金采源唱全曲......", + "creation_up": 496743369, + "creation_nickname": "YuueFriloeyyy_", + "creation_duration": 183, + "creation_play": 319267, + "creation_reason": "歌曲演唱", + "achievements": [ + "本期排名↑3", + "最高排名6" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA451591354456234292", + "music_title": "雪 Distance", + "singer": "Capper,罗言", + "album": "Uniconfication", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/5899008cea7ed157b8bdb6f9b89dd7ff.jpg", + "heat": 1233174, + "rank": 7, + "can_listen": false, + "recommendation": "", + "creation_aid": 355903423, + "creation_bvid": "BV1QX4y127jq", + "creation_cover": "http://i2.hdslb.com/bfs/archive/e3542cf8d7cf7cc58268c840d845bb12d4c52662.jpg", + "creation_title": "⚡️“可是雪啊,埋进土里”⚡️", + "creation_up": 22169833, + "creation_nickname": "寒了个羽", + "creation_duration": 158, + "creation_play": 2622705, + "creation_reason": "音乐创作", + "achievements": [ + "本期排名↓1", + "最高排名3" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA460246447678301091", + "music_title": "Ghost Face (鬼脸) (LIVE版)", + "singer": "法老", + "album": "中国说唱巅峰对决2023 第一期", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/0d4050feb7cac1a568849832d5fa9f67.jpg", + "heat": 1163291, + "rank": 8, + "can_listen": false, + "recommendation": "", + "creation_aid": 355995337, + "creation_bvid": "BV1qX4y1y78r", + "creation_cover": "http://i0.hdslb.com/bfs/archive/f5e7a51dbe1f48441042dad1e45148c400a3f9fe.jpg", + "creation_title": "【法老Pharaoh】虽迟但到!说唱巅峰对决《Ghost Face》live", + "creation_up": 12807175, + "creation_nickname": "法老爷爷", + "creation_duration": 79, + "creation_play": 885856, + "creation_reason": "官方现场", + "achievements": [ + "新晋上榜", + "最高排名8" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA458974797167092444", + "music_title": "F*ck My Life", + "singer": "SEVENTEEN", + "album": "SEVENTEEN 10th Mini Album 'FML'", + "mv_aid": 313423265, + "mv_bvid": "BV1tP41117mv", + "mv_cover": "http://i0.hdslb.com/bfs/station_src/music_metadata/6723df38fcca9b2ab85b564e3809426e.jpg", + "heat": 735517, + "rank": 9, + "can_listen": true, + "recommendation": "", + "creation_aid": 313423265, + "creation_bvid": "BV1tP41117mv", + "creation_cover": "http://i1.hdslb.com/bfs/archive/38377552bd74cc32851d6466343dc3a26983c3b6.jpg", + "creation_title": "SEVENTEEN 'F*ck My Life' Official MV", + "creation_up": 692206640, + "creation_nickname": "SEVENTEEN", + "creation_duration": 220, + "creation_play": 1008830, + "creation_reason": "官方MV", + "achievements": [ + "新晋上榜", + "最高排名9" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA460247474041267107", + "music_title": "Control's Wishes", + "singer": "Steven Grove,塞壬唱片-MSR", + "album": "孤星OST", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "http://i0.hdslb.com/bfs/station_src/music_metadata/6068f2c64c6796f68b8dae7772f891ac.jpg", + "heat": 628233, + "rank": 10, + "can_listen": false, + "recommendation": "", + "creation_aid": 740625544, + "creation_bvid": "BV1ck4y1E7KJ", + "creation_cover": "http://i1.hdslb.com/bfs/archive/11381997120391d655c91b19bc08e110ca8201e5.jpg", + "creation_title": "【小提琴/钢琴】明日方舟四周年孤星PV曲《Control's Wishes》", + "creation_up": 2016022052, + "creation_nickname": "-桑榆墨景-", + "creation_duration": 193, + "creation_play": 37881, + "creation_reason": "器乐演奏", + "achievements": [ + "新晋上榜", + "最高排名10" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA459266635128138957", + "music_title": "花园种花(在小小的花园里种小小的花)", + "singer": "桃子老师花开富贵", + "album": "花园种花", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "http://i0.hdslb.com/bfs/station_src/music_metadata/fb1d6a44bb8337edf6c9d32c421e9c89.jpg", + "heat": 623604, + "rank": 11, + "can_listen": false, + "recommendation": "", + "creation_aid": 398216313, + "creation_bvid": "BV1uo4y1x7UF", + "creation_cover": "http://i0.hdslb.com/bfs/archive/9562b126010376f7dcfedf0397170696eb1a19c5.jpg", + "creation_title": "姬子老师:开拓者家长们,路上有点堵车,这节挖呀挖呀挖课来晚了", + "creation_up": 391636983, + "creation_nickname": "动漫跳舞姬", + "creation_duration": 33, + "creation_play": 566777, + "creation_reason": "动画创作", + "achievements": [ + "新晋上榜", + "最高排名11" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA455203227252613620", + "music_title": "Cupid", + "singer": "FIFTY FIFTY", + "album": "The Beginning: Cupid", + "mv_aid": 226830843, + "mv_bvid": "BV1sh41137rs", + "mv_cover": "http://i0.hdslb.com/bfs/station_src/music_metadata/e91891c4e2573f4d4ada329db9a86b30.jpg", + "heat": 562273, + "rank": 12, + "can_listen": false, + "recommendation": "", + "creation_aid": 485862497, + "creation_bvid": "BV19T411b7nE", + "creation_cover": "http://i2.hdslb.com/bfs/archive/ece27463e3eb13f9fbbcb799436375495a795e3c.jpg", + "creation_title": "挑战在cp29和一百位coser比心!", + "creation_up": 1477074, + "creation_nickname": "菌儿rikushi", + "creation_duration": 148, + "creation_play": 1216246, + "creation_reason": "COSPLAY创作", + "achievements": [ + "重回榜单", + "最高排名12" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA457806074590836885", + "music_title": "星间旅行", + "singer": "HOYO-MiX,茶理理理子", + "album": "崩坏星穹铁道-星间旅行 Interstellar Journ", + "mv_aid": 612992200, + "mv_bvid": "BV1rh4y1n77f", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/20ddff696bbbd7f00fc8b76f7b5334f7.jpg", + "heat": 515238, + "rank": 13, + "can_listen": false, + "recommendation": "", + "creation_aid": 995418876, + "creation_bvid": "BV1vs4y197gt", + "creation_cover": "http://i0.hdslb.com/bfs/archive/2d6997320bd2bb20f50b363a894033f325fed871.jpg", + "creation_title": "《星穹铁道玩家现状》", + "creation_up": 551188239, + "creation_nickname": "企鹅带带北极熊", + "creation_duration": 88, + "creation_play": 1570181, + "creation_reason": "音乐创作", + "achievements": [ + "本期排名↓10", + "最高排名2" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA434298821720206219", + "music_title": "可愛くてごめん (feat. かぴ)", + "singer": "HoneyWorks,かぴ", + "album": "告白実行委員会 -FLYING SONGS- 恋してる", + "mv_aid": 779733306, + "mv_bvid": "BV1iy4y1Z7Ri", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/45ce3f52d31386741589a3a5ca9a420c.jpg", + "heat": 438720, + "rank": 14, + "can_listen": true, + "recommendation": "", + "creation_aid": 862702118, + "creation_bvid": "BV1gG4y117nV", + "creation_cover": "http://i1.hdslb.com/bfs/archive/38d94515fe5f6294bf7712d8b26eb049ec3cf627.jpg", + "creation_title": "这么可爱真是抱歉!❤️(*/∇\*)天台宅舞", + "creation_up": 434476793, + "creation_nickname": "优联酱uu", + "creation_duration": 140, + "creation_play": 1199819, + "creation_reason": "舞蹈创作", + "achievements": [ + "重回榜单", + "最高排名2" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA440555130794857381", + "music_title": "阳光开朗大男孩", + "singer": "卦者灵风", + "album": "阳光开朗大男孩", + "mv_aid": 421697247, + "mv_bvid": "BV1z341187Y9", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/220c674ca22acb91114f6e0705d0f426.jpg", + "heat": 371851, + "rank": 15, + "can_listen": true, + "recommendation": "", + "creation_aid": 995281134, + "creation_bvid": "BV1as4y1d7QR", + "creation_cover": "http://i0.hdslb.com/bfs/archive/4628837eb5baf879a2be79b16836c90e0466dd6c.jpg", + "creation_title": "【灵能手书】阳光开朗大男孩", + "creation_up": 8504036, + "creation_nickname": "kipoki", + "creation_duration": 81, + "creation_play": 627123, + "creation_reason": "动画创作", + "achievements": [ + "重回榜单", + "最高排名1" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA406539170333366962", + "music_title": "此生不换", + "singer": "青鸟飞鱼", + "album": "仙剑奇侠传三 电视剧原声带", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "http://i0.hdslb.com/bfs/station_src/music_metadata/450bd04688ef6a691b1adb816ace6155.jpg", + "heat": 361410, + "rank": 16, + "can_listen": false, + "recommendation": "", + "creation_aid": 545438082, + "creation_bvid": "BV1Cq4y1J7Ge", + "creation_cover": "http://i1.hdslb.com/bfs/archive/1b8b80f7ba9dccaf648cfb641b40e1d38965a4a4.jpg", + "creation_title": "开口爷青回!男生宿舍回忆向翻唱仙剑3插曲《此生不换》|我和室友的翻唱日常.", + "creation_up": 346782115, + "creation_nickname": "陈家淇_B11", + "creation_duration": 258, + "creation_play": 2976435, + "creation_reason": "歌曲演唱", + "achievements": [ + "重回榜单", + "最高排名15" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA444928930235832050", + "music_title": "太空电梯", + "singer": "阿鲲", + "album": "流浪地球2电影原声大碟", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/c64c10b911ace04ae45b3172abe3a1d8.jpg", + "heat": 352572, + "rank": 17, + "can_listen": false, + "recommendation": "", + "creation_aid": 269421756, + "creation_bvid": "BV1ic41157cc", + "creation_cover": "http://i0.hdslb.com/bfs/archive/39a27b9d804750325b260f6bc69a3afa8c01a1dc.jpg", + "creation_title": "都说是涂装问题了,看,这战斗力不就上来了吗!", + "creation_up": 478832800, + "creation_nickname": "大刀王五EP", + "creation_duration": 87, + "creation_play": 706377, + "creation_reason": "动画创作", + "achievements": [ + "重回榜单", + "最高排名1" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA400017093531020491", + "music_title": "兰亭序", + "singer": "周杰伦", + "album": "魔杰座", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/a03f7d174c3b01e4c6b3907a115c5434.jpg", + "heat": 347017, + "rank": 18, + "can_listen": false, + "recommendation": "", + "creation_aid": 825572396, + "creation_bvid": "BV1kg4y1L7v6", + "creation_cover": "http://i0.hdslb.com/bfs/archive/59e8436511ff45402e3d5dcf2c01feeb94897103.jpg", + "creation_title": "无关风月我题序等你回《兰亭序》", + "creation_up": 628615890, + "creation_nickname": "qqq还在梦里", + "creation_duration": 125, + "creation_play": 522133, + "creation_reason": "歌曲演唱", + "achievements": [ + "重回榜单", + "最高排名6" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA457811156946443719", + "music_title": "I'll Do It", + "singer": "Heidi Montag", + "album": "Superficial", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/e1d95f62257da69db1dc36e949f789f5.jpg", + "heat": 345773, + "rank": 19, + "can_listen": false, + "recommendation": "", + "creation_aid": 313275936, + "creation_bvid": "BV1XP411y7UD", + "creation_cover": "http://i1.hdslb.com/bfs/archive/c42e54074a50ee1eaddbd5495091c2152aad8ecf.jpg", + "creation_title": "“嗨,老婆” 【崩坏星穹铁道】", + "creation_up": 14158002, + "creation_nickname": "Ishi丶", + "creation_duration": 61, + "creation_play": 103542, + "creation_reason": "动画创作", + "achievements": [ + "本期排名↓12", + "最高排名6" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + }, + { + "music_id": "MA409255441550338398", + "music_title": "失恋阵线联盟", + "singer": "草蜢", + "album": "失恋阵线联盟", + "mv_aid": 0, + "mv_bvid": "", + "mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/5d6b27035d5f7c0e7781b779871aca04.jpg", + "heat": 337176, + "rank": 20, + "can_listen": false, + "recommendation": "", + "creation_aid": 415864088, + "creation_bvid": "BV1QV411b7CT", + "creation_cover": "http://i1.hdslb.com/bfs/archive/8735563d73f86ef7073ed580a41e12c409bd2a5b.jpg", + "creation_title": "年会舞蹈《失恋阵线联盟》完整版", + "creation_up": 451425930, + "creation_nickname": "舞大师舞蹈工作室", + "creation_duration": 135, + "creation_play": 5336890, + "creation_reason": "舞蹈创作", + "achievements": [ + "重回榜单", + "最高排名20" + ], + "material_id": 0, + "material_use_num": 0, + "material_duration": 0, + "material_show": 1, + "song_type": 2 + } + ] + } +} +``` + +
+ +## 订阅或退订榜单 + +> https://api.bilibili.com/x/copyright-music-publicity/toplist/subscribe/update + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +**正文参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------- | ---- | ------------------------ | --------------- | ------------------------------------------------ | +| state | num | 操作代码 | 必要 | 1:订阅
2:退订 | +| list_id | num | 榜单 id | 非必要 | 见 [获取音频榜单每期列表](#获取音频榜单每期列表) | +| csrf | str | CSRF Token(位于cookie) | Cookie 方式必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf 验证失败
400:请求错误 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | + +**示例:** + +```bash +curl 'https://api.bilibili.com/x/copyright-music-publicity/toplist/subscribe/update' \ + --data-urlencode 'state=1' \ + --data-urlencode 'state=76' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
From a46f140fde73530868ce9db5f613deed8d5c645e Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Fri, 19 May 2023 16:08:08 +0800 Subject: [PATCH 020/159] =?UTF-8?q?add=E3=80=90web=E7=AB=AFCookie=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E3=80=91APIDoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docs/audio/rank.md | 2 +- docs/login/cookie_refresh.md | 407 +++++++++++++++++++++++++++++++++++ 3 files changed, 409 insertions(+), 1 deletion(-) create mode 100644 docs/login/cookie_refresh.md diff --git a/README.md b/README.md index ed15709..9a74ea0 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ B站 API 采用 C/S 结构,大多数接口为 REST API 和 gRPC,少部分接 - [ ] [个人中心](docs/login/member_center.md) - [ ] [注销登录](docs/login/exit.md) - [x] [登录记录](docs/login/login_notice.md) + - [x] [Web 端 Coookie 刷新](docs/login/cookie_refresh.md) - [ ] [消息中心](docs/message) - [ ] [通知类消息](docs/message/msg.md) - [ ] [私信](docs/message/private_msg.md) diff --git a/docs/audio/rank.md b/docs/audio/rank.md index 0798565..ff2a809 100644 --- a/docs/audio/rank.md +++ b/docs/audio/rank.md @@ -1118,7 +1118,7 @@ curl -G 'https://api.bilibili.com/x/copyright-music-publicity/toplist/music_list 认证方式:Cookie(SESSDATA) -**正文参数:** +**正文参数(application/x-www-form-urlencoded):** | 参数名 | 类型 | 内容 | 必要性 | 备注 | | ------- | ---- | ------------------------ | --------------- | ------------------------------------------------ | diff --git a/docs/login/cookie_refresh.md b/docs/login/cookie_refresh.md new file mode 100644 index 0000000..582bea2 --- /dev/null +++ b/docs/login/cookie_refresh.md @@ -0,0 +1,407 @@ +# Web端Cookie刷新 + +自从 2023 以来,社区反馈似乎 Web 端的 Cookie 会随着一些敏感接口的访问逐渐失效,而在 Web 页面上会判断 Cookie是否需要刷新,如需刷新则会以动态加载 iframe 方式实现,同时登录(二维码 / 密码 / 短信验证码等)接口会返回`refresh_token`字段,用以持久化保存,是一种官方的风控机制实现 + +感谢 [#524](https://github.com/SocialSisterYi/bilibili-API-collect/issues/524) 提供相关研究报告以及逆向工程结果 + +> 编辑到最前面:cookie 不会主动刷新的,只要他没有调用下面的刷新接口就不会刷新。也就是说,你只要不再打开浏览器,或者直接把 localStorage 的 ac_time_value 字段删除了。那么 cookie 在真的失效前(登录过期、账号风控等强制下线)都是不变化的。 + +## 刷新步骤(伪代码) + +```python +cookie, refresh_token = 进行登录操作() # can be 二维码 / 密码 / 短信验证码 + +while True: + if 每日第一次访问接口: + if 检查是否需要刷新(cookie): + CorrespondPath = 生成CorrespondPath(当前毫秒时间戳) + refresh_csrf = 获取refresh_csrf(CorrespondPath, cookie) + refresh_token_old = refresh_token # 这一步必须保存旧的 refresh_token 备用 + cookie, refresh_token = 刷新Cookie(refresh_token, refresh_csrf, cookie) + 确认更新(refresh_token_old, cookie) # 这一步需要新的 Cookie 以及旧的 refresh_token + SSO站点跨域登录(cookie) + do_somethings(cookie) # 其他业务逻辑处理 +``` + +## 检查是否需要刷新 + +> https://passport.bilibili.com/x/passport-login/web/cookie/info + +*请求方式:GET* + +鉴权方式:Cookie + +**url 参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------- | ------ | ---- | +| csrf | str | CSRF Token(位于 cookie) | 非必要 | | + +**json 回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ----------------------------- | +| code | num | 返回值 | 0:成功
-101:账号未登录 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| --------- | ---- | ------------------- | ----------------------------------------------------- | +| refresh | bool | 是否应该刷新 cookie | `true`:需要刷新 Cookie
`false`:无需刷新 Cookie | +| timestamp | num | 当前毫秒时间戳 | 用于获取 refresh_csrf | + +**示例:** + +```bash +curl -G 'https://passport.bilibili.com/x/passport-login/web/cookie/info' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "refresh": false, + "timestamp": 1684466082562 + } +} +``` + +
+ +## 生成CorrespondPath算法 + +该算法逆向于以下 wasm 以及 JavaScript bind 接口,抓取于官方 web 首页中,感谢 [#524](https://github.com/SocialSisterYi/bilibili-API-collect/issues/524) 提供 + +https://s1.hdslb.com/bfs/static/jinkela/long/wasm/wasm_rsa_encrypt_bg.wasm + +https://s1.hdslb.com/bfs/static/jinkela/long/wasm/wasm_ras_umd.js + +### 算法细节 + +将`refresh_${timestamp}`作为消息体(`timestamp`为当前毫秒时间戳),用以下方 PubKey 进行 [RSA-OAEP](https://datatracker.ietf.org/doc/html/rfc3447#section-7.1) 算法加密,之后密文通过 Base16 小写编码为字符串 + +JWK 格式: + +> { +> "kty": "RSA", +> "n": "y4HdjgJHBlbaBN04VERG4qNBIFHP6a3GozCl75AihQloSWCXC5HDNgyinEnhaQ_4-gaMud_GF50elYXLlCToR9se9Z8z433U3KjM-3Yx7ptKkmQNAMggQwAVKgq3zYAoidNEWuxpkY_mAitTSRLnsJW-NCTa0bqBFF6Wm1MxgfE", +> "e": "AQAB" +> } + +PEM 格式: + +> -----BEGIN PUBLIC KEY----- +> MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLgd2OAkcGVtoE3ThUREbio0Eg +> Uc/prcajMKXvkCKFCWhJYJcLkcM2DKKcSeFpD/j6Boy538YXnR6VhcuUJOhH2x71 +> nzPjfdTcqMz7djHum0qSZA0AyCBDABUqCrfNgCiJ00Ra7GmRj+YCK1NJEuewlb40 +> JNrRuoEUXpabUzGB8QIDAQAB +> -----END PUBLIC KEY----- + +### 相关Demo + +该 Demo 提供 JavaScript、Python 以及 vercel 云函数,感谢 [#524](https://github.com/SocialSisterYi/bilibili-API-collect/issues/524) 提供 + +#### JavaScript + +```javascript +const publicKey = await crypto.subtle.importKey( + "jwk", + { + kty: "RSA", + n: "y4HdjgJHBlbaBN04VERG4qNBIFHP6a3GozCl75AihQloSWCXC5HDNgyinEnhaQ_4-gaMud_GF50elYXLlCToR9se9Z8z433U3KjM-3Yx7ptKkmQNAMggQwAVKgq3zYAoidNEWuxpkY_mAitTSRLnsJW-NCTa0bqBFF6Wm1MxgfE", + e: "AQAB", + }, + { name: "RSA-OAEP", hash: "SHA-256" }, + true, + ["encrypt"], +) + +async function getCorrespondPath(timestamp) { + const data = new TextEncoder().encode(`refresh_${timestamp}`); + const encrypted = new Uint8Array(await crypto.subtle.encrypt({ name: "RSA-OAEP" }, publicKey, data)) + return encrypted.reduce((str, c) => str + c.toString(16).padStart(2, "0"), "") +} + +const ts = Date.now() +console.log(await getCorrespondPath(ts)) +``` + +``` +b77f21ab5b7ce7879c410b2311dd6e7ea1a2cd1cd941073db067f4c3279fdabca3a06dfa744168ee14ad050b9f4889bd4edb8e76eb597fdd18c16804d82566b55c6dba8e225d838aa93d8e5b31cf7c56720db8244d92373f4944e0561f6ca5bf721a36ac079786060fc853605ccd1ddcb33f54617de6aedd44e3b9850d13b45f +``` + +#### Python + +依赖`pycryptodome` + +```python +from Crypto.Cipher import PKCS1_OAEP +from Crypto.PublicKey import RSA +from Crypto.Hash import SHA256 +import binascii +import time + +key = RSA.importKey('''\ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLgd2OAkcGVtoE3ThUREbio0Eg +Uc/prcajMKXvkCKFCWhJYJcLkcM2DKKcSeFpD/j6Boy538YXnR6VhcuUJOhH2x71 +nzPjfdTcqMz7djHum0qSZA0AyCBDABUqCrfNgCiJ00Ra7GmRj+YCK1NJEuewlb40 +JNrRuoEUXpabUzGB8QIDAQAB +-----END PUBLIC KEY-----''') + +def getCorrespondPath(ts): + cipher = PKCS1_OAEP.new(key, SHA256) + encrypted = cipher.encrypt(f'refresh_{ts}'.encode()) + return binascii.b2a_hex(encrypted).decode() + +ts = round(time.time() * 1000) +print(getCorrespondPath(ts)) +``` + +``` +47bbd615f333d6a2c597bbb46ad47a6e59752a305a2f545d3ba5d49ca055309347796f80d257613696d36170c57443a0e9dea2b47f83b0b4224d431e46124fadd9a24c8fa468147e8bf2d2501eaacae43310e19bf58fc4a728d80c90b9401afcfc1536ba9a2f6438ea53c0b2652f8b8d01c87355dd5a5da51de998b1a35d519a +``` + +#### vercel云函数 + +```bash +curl -G 'https://wasm-rsa.vercel.app/api/rsa' \ + --data-urlencode "t=$((`date '+%s'`*1000+`date '+%N'`/1000000))" +``` + +```json +{ + "timestamp": "1684468084078", + "hash": "a768efe5114ef8610f9ed9ebc28c00827375f4a3448ec4ab17958cacc4fde9898e5b7aa27f649426bba1acae4aa222aafaff7d528669b15249de0b2b60d86618557d8dc90684db4ec68e8d98e41d94f1c97d1d431c288e595ceb522d033822442a9e1ee150b32771a83fbf65c13329e9fda080fbe3bc85c49c1de7ab148d228f", + "code": 0 +} +``` + +## 获取refresh_csrf + +> https://www.bilibili.com/correspond/1/{correspondPath} + +*请求方式:GET* + +鉴权方式:Cookie + +**path 参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| -------------- | ---- | ---------------------------- | ------ | --------------------------------------------------------- | +| correspondPath | str | 使用当前毫秒时间戳生成的密文 | 必要 | 由 [生成CorrespondPath算法](#生成CorrespondPath算法) 获得 | + +将参数`correspondPath`拼接在 https://www.bilibili.com/correspond/1/ 后进行请求,例如 + +> https://www.bilibili.com/correspond/1/0248397e5139a8b878894cae46f8d6742ef7c728e46403706452b5dda90fe248e58e73bd6c2da0dba515c53af107dc1ecda757ce843579bcf197fcd7800586126e9b896b646cc94c23183a5a067642e96f7b6e803880e1d3cceabc9f1dc52a121b5e3ba5619e008f6b6dcb65a09d7864084ac114f4ec9ccf6218776fe4f2fa95 + +请求该 url 会返回一个 html 页面,通常由 iframe 方式加载,它通过 SSR 范式返回刷新一个实时刷新口令`refresh_csrf`,并在 Client 端通过 js 请求 RestAPI 完成一些列的提交刷新、确认、SSO 站点登录等操作 + +如果参数`correspondPath`错误或过期,则返回一个 404 Page + +以下为返回的参数: + +| 标签 id | 内容 | xpath | 备注 | +| ------- | ------------ | ------------------------- | --------------------------------- | +| 1-name | refresh_csrf | //div[id='1-name']/text() | 实时刷新口令
用于更新 Cookie | + +**示例:** + +```bash +correspondPath='0248397e5139a8b878894cae46f8d6742ef7c728e46403706452b5dda90fe248e58e73bd6c2da0dba515c53af107dc1ecda757ce843579bcf197fcd7800586126e9b896b646cc94c23183a5a067642e96f7b6e803880e1d3cceabc9f1dc52a121b5e3ba5619e008f6b6dcb65a09d7864084ac114f4ec9ccf6218776fe4f2fa95' + +curl -G "https://www.bilibili.com/correspond/1/$correspondPath" \ + -b 'SESSDATA=xxx' +``` + +```html + + + + + + + +Correspond + + + +
b0cc8411ded2f9db2cff2edb3123acac
+
+ + + + + + +``` + +所以当前账号的实时刷新口令`refresh_csrf`为`b0cc8411ded2f9db2cff2edb3123acac` + +## 刷新Cookie + +> https://passport.bilibili.com/x/passport-login/web/cookie/refresh + +*请求方式:POST* + +鉴权方式:Cookie + +刷新成功后会设置以下 Cookie 项: + +`sid`、`DedeUserID`、`DedeUserID__ckMd5`、`SESSDATA`、`bili_jct` + +**正文参数 (application/x-www-form-urlencoded)或 url 参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------------- | ---- | -------------- | ------ | ------------------------------------------------------------ | +| csrf | str | CSRF Token | 必要 | 位于 Cookie 中的`bili_jct`字段 | +| refresh_csrf | str | 实时刷新口令 | 必要 | 通过 [获取refresh_csrf](#获取refresh_csrf) 获得 | +| source | str | 访问来源? | 必要 | 一般为`main_web` | +| refresh_token | str | 持久化刷新口令 | 必要 | localStorage 中的`ac_time_value`字段,在登录成功后返回并保存 | + +**json 回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf 校验失败
86095:refresh_csrf 错误或 refresh_token 与 cookie 不匹配 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------------- | ---- | ------------------ | ----------------------------------------------------------- | +| status | num | 0 | | +| message | str | 空 | | +| refresh_token | str | 新的持久化刷新口令 | 将存储于 localStorage 中的`ac_time_value`字段,以便下次使用 | + +**示例:** + +```bash +curl -i 'https://passport.bilibili.com/x/passport-login/web/cookie/refresh' \ + --data-urlencode 'csrf=f610640a37f51f6266f6b83cfc5eedbb' \ + --data-urlencode 'refresh_csrf=b0cc8411ded2f9db2cff2edb3123acac' \ + --data-urlencode 'source=main_web' \ + --data-urlencode 'refresh_token=45240a041836905fe953e3b98b83d751' \ + -b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +http 响应(关键信息已做脱敏处理): + +```http +HTTP/2 200 +date: Fri, 19 May 2023 07:34:11 GMT +content-type: application/json; charset=utf-8 +content-length: 116 +bili-status-code: 0 +bili-trace-id: 17f4251365646726 +set-cookie: SESSDATA=***; Path=/; Domain=bilibili.com; Expires=Wed, 15 Nov 2023 07:34:10 GMT; HttpOnly; Secure +set-cookie: bili_jct=***; Path=/; Domain=bilibili.com; Expires=Wed, 15 Nov 2023 07:34:10 GMT +set-cookie: DedeUserID=***; Path=/; Domain=bilibili.com; Expires=Wed, 15 Nov 2023 07:34:10 GMT +set-cookie: DedeUserID__ckMd5=***; Path=/; Domain=bilibili.com; Expires=Wed, 15 Nov 2023 07:34:10 GMT +set-cookie: sid=***; Path=/; Domain=bilibili.com; Expires=Wed, 15 Nov 2023 07:34:10 GMT +x-bili-trace-id: 3f6f6174aaa087b517f4251365646726 +expires: Fri, 19 May 2023 07:34:10 GMT +cache-control: no-cache +x-cache-webcdn: BYPASS from blzone03 + +{"code":0,"message":"0","ttl":1,"data":{"status":0,"message":"","refresh_token":"ae1bd1149b56af9743ffe7bbbeff3e51"}} +``` + +JSON Payload: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "status": 0, + "message": "", + "refresh_token": "ae1bd1149b56af9743ffe7bbbeff3e51" + } +} +``` + +
+ +## 确认更新 + +> https://passport.bilibili.com/x/passport-login/web/confirm/refresh + +*请求方式:POST* + +鉴权方式:Cookie + +该步操作将让旧的`refresh_token`对应的 Cookie 失效 + +**正文参数 (application/x-www-form-urlencoded)或 url 参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------------- | ---- | ------------------------- | ------ | ------------------------------------------------------------ | +| csrf | str | CSRF Token(位于 cookie) | 必要 | 从新的 cookie 中获取 | +| refresh_token | str | 旧的持久化刷新口令 | 必要 | 在刷新前 localStorage 中的`ac_time_value`获取,**并非刷新后返回的值** | + +**json 回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf 校验失败
-400:请求错误 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | + +**示例:** + +```bash +curl 'https://passport.bilibili.com/x/passport-login/web/confirm/refresh' \ + --data-urlencode 'csrf=1e9658858e6da76be64bd92cdc0fa324' \ + --data-urlencode 'refresh_token=45240a041836905fe953e3b98b83d751' \ + -b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
From cefb7e7c403b2a2ee24ac55d628e3dc67c97a2a6 Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Fri, 19 May 2023 23:49:19 +0800 Subject: [PATCH 021/159] fix typo --- docs/login/cookie_refresh.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/login/cookie_refresh.md b/docs/login/cookie_refresh.md index 582bea2..76e4801 100644 --- a/docs/login/cookie_refresh.md +++ b/docs/login/cookie_refresh.md @@ -1,10 +1,10 @@ # Web端Cookie刷新 -自从 2023 以来,社区反馈似乎 Web 端的 Cookie 会随着一些敏感接口的访问逐渐失效,而在 Web 页面上会判断 Cookie是否需要刷新,如需刷新则会以动态加载 iframe 方式实现,同时登录(二维码 / 密码 / 短信验证码等)接口会返回`refresh_token`字段,用以持久化保存,是一种官方的风控机制实现 +自从 2023 以来,社区反馈似乎 Web 端的 Cookie 会随着一些敏感接口的访问逐渐失效,而在 Web 页面上会判断 Cookie 是否需要刷新,如需刷新则会以动态加载 iframe 方式实现,同时登录(二维码 / 密码 / 短信验证码等)接口也会返回`refresh_token`字段,需要持久化保存,是一种官方的风控机制实现 感谢 [#524](https://github.com/SocialSisterYi/bilibili-API-collect/issues/524) 提供相关研究报告以及逆向工程结果 -> 编辑到最前面:cookie 不会主动刷新的,只要他没有调用下面的刷新接口就不会刷新。也就是说,你只要不再打开浏览器,或者直接把 localStorage 的 ac_time_value 字段删除了。那么 cookie 在真的失效前(登录过期、账号风控等强制下线)都是不变化的。 +> cookie 不会主动刷新的,只要他没有调用下面的刷新接口就不会刷新。也就是说,你只要不再打开浏览器,或者直接把 localStorage 的 ac_time_value 字段删除了。那么 cookie 在真的失效前(登录过期、账号风控等强制下线)都是不变化的。 ## 刷新步骤(伪代码) @@ -35,7 +35,7 @@ while True: | 参数名 | 类型 | 内容 | 必要性 | 备注 | | ------ | ---- | ------------------------- | ------ | ---- | -| csrf | str | CSRF Token(位于 cookie) | 非必要 | | +| csrf | str | CSRF Token(位于 Cookie) | 非必要 | | **json 回复:** @@ -52,7 +52,7 @@ while True: | 字段 | 类型 | 内容 | 备注 | | --------- | ---- | ------------------- | ----------------------------------------------------- | -| refresh | bool | 是否应该刷新 cookie | `true`:需要刷新 Cookie
`false`:无需刷新 Cookie | +| refresh | bool | 是否应该刷新 Cookie | `true`:需要刷新 Cookie
`false`:无需刷新 Cookie | | timestamp | num | 当前毫秒时间戳 | 用于获取 refresh_csrf | **示例:** @@ -82,7 +82,7 @@ curl -G 'https://passport.bilibili.com/x/passport-login/web/cookie/info' \ ## 生成CorrespondPath算法 -该算法逆向于以下 wasm 以及 JavaScript bind 接口,抓取于官方 web 首页中,感谢 [#524](https://github.com/SocialSisterYi/bilibili-API-collect/issues/524) 提供 +该算法逆向于以下 wasm 以及 JavaScript bind 接口,抓取于官方 Web 首页中,感谢 [#524](https://github.com/SocialSisterYi/bilibili-API-collect/issues/524) 提供 https://s1.hdslb.com/bfs/static/jinkela/long/wasm/wasm_rsa_encrypt_bg.wasm @@ -90,7 +90,7 @@ https://s1.hdslb.com/bfs/static/jinkela/long/wasm/wasm_ras_umd.js ### 算法细节 -将`refresh_${timestamp}`作为消息体(`timestamp`为当前毫秒时间戳),用以下方 PubKey 进行 [RSA-OAEP](https://datatracker.ietf.org/doc/html/rfc3447#section-7.1) 算法加密,之后密文通过 Base16 小写编码为字符串 +将`refresh_${timestamp}`作为消息体(参数`timestamp`为当前毫秒时间戳),用下方 PubKey 进行 [RSA-OAEP](https://datatracker.ietf.org/doc/html/rfc3447#section-7.1) 算法加密,之后密文通过小写 Base16 编码为字符串 JWK 格式: @@ -111,7 +111,7 @@ PEM 格式: ### 相关Demo -该 Demo 提供 JavaScript、Python 以及 vercel 云函数,感谢 [#524](https://github.com/SocialSisterYi/bilibili-API-collect/issues/524) 提供 +该 Demo 提供 [JavaScript](#JavaScript)、[Python](#Python) 以及 [Vercel 云函数](#vercel云函数),感谢 [#524](https://github.com/SocialSisterYi/bilibili-API-collect/issues/524) 提供 #### JavaScript @@ -144,7 +144,7 @@ b77f21ab5b7ce7879c410b2311dd6e7ea1a2cd1cd941073db067f4c3279fdabca3a06dfa744168ee #### Python -依赖`pycryptodome` +需要`pycryptodome`依赖 ```python from Crypto.Cipher import PKCS1_OAEP @@ -199,17 +199,17 @@ curl -G 'https://wasm-rsa.vercel.app/api/rsa' \ **path 参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| -------------- | ---- | ---------------------------- | ------ | --------------------------------------------------------- | -| correspondPath | str | 使用当前毫秒时间戳生成的密文 | 必要 | 由 [生成CorrespondPath算法](#生成CorrespondPath算法) 获得 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| -------------- | ---- | ---------------------------- | ------ | ------------------------------------------------------------ | +| correspondPath | str | 使用当前毫秒时间戳生成的签名 | 必要 | 由 [生成CorrespondPath算法](#生成CorrespondPath算法) 加密获得 | 将参数`correspondPath`拼接在 https://www.bilibili.com/correspond/1/ 后进行请求,例如 > https://www.bilibili.com/correspond/1/0248397e5139a8b878894cae46f8d6742ef7c728e46403706452b5dda90fe248e58e73bd6c2da0dba515c53af107dc1ecda757ce843579bcf197fcd7800586126e9b896b646cc94c23183a5a067642e96f7b6e803880e1d3cceabc9f1dc52a121b5e3ba5619e008f6b6dcb65a09d7864084ac114f4ec9ccf6218776fe4f2fa95 -请求该 url 会返回一个 html 页面,通常由 iframe 方式加载,它通过 SSR 范式返回刷新一个实时刷新口令`refresh_csrf`,并在 Client 端通过 js 请求 RestAPI 完成一些列的提交刷新、确认、SSO 站点登录等操作 +请求该 url 会返回一个 html 页面,通常由 iframe 方式加载,它通过 SSR 方式返回一个实时刷新口令`refresh_csrf`存放于 html 标签中,并在 Client 端通过 js 请求 RestAPI 完成一些列的提交刷新、确认、SSO 站点登录等操作 -如果参数`correspondPath`错误或过期,则返回一个 404 Page +若参数`correspondPath`错误或过期,则返回一个 404 Page 以下为返回的参数: From 05ac3d5e2a9e28be3bf129ae8c78ffdbebaa161c Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Tue, 23 May 2023 09:38:21 +0800 Subject: [PATCH 022/159] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E3=80=90Wbi=20=E6=8E=A5=E5=8F=A3=E7=AD=BE=E5=90=8D=E3=80=91?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 +- docs/login/login_info.md | 204 ++++++++++++++--------- docs/{other => misc}/bvid_desc.md | 0 docs/{other => misc}/errcode.md | 0 docs/{other => misc}/picture.md | 0 docs/misc/sign/APP.md | 65 ++++++++ docs/misc/sign/APPKey.md | 54 +++++++ docs/misc/sign/wbi.md | 250 +++++++++++++++++++++++++++++ docs/{other => misc}/time_stamp.md | 0 docs/other/API_sign.md | 93 ----------- 10 files changed, 509 insertions(+), 173 deletions(-) rename docs/{other => misc}/bvid_desc.md (100%) rename docs/{other => misc}/errcode.md (100%) rename docs/{other => misc}/picture.md (100%) create mode 100644 docs/misc/sign/APP.md create mode 100644 docs/misc/sign/APPKey.md create mode 100644 docs/misc/sign/wbi.md rename docs/{other => misc}/time_stamp.md (100%) delete mode 100644 docs/other/API_sign.md diff --git a/README.md b/README.md index 9a74ea0..d12eeaa 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,14 @@ B站 API 采用 C/S 结构,大多数接口为 REST API 和 gRPC,少部分接 计划整理分类 & 目录:(文档已完结请选中 checkbox) -- [x] [API 签名](docs/other/API_sign.md) -- [x] [公共错误码](docs/other/errcode.md) -- [x] [图片格式化](docs/other/picture.md) -- [x] [bvid 说明](docs/other/bvid_desc.md) +- [ ] [接口签名与验证](docs/misc/sign) + - [x] [APP API 签名](docs/misc/sign/APP.md)(`appkey`与`sign`) + - [x] [已知的 APPKey](docs/misc/sign/APPKey.md) + - [x] [Wbi 签名](docs/misc/sign/wbi.md)(`wts`与`w_rid`) + +- [x] [公共错误码](docs/misc/errcode.md) +- [x] [图片格式化](docs/misc/picture.md) +- [x] [bvid 说明](docs/misc/bvid_desc.md) - [ ] [gRPC API 接口定义](grpc_api) - [ ] [登录](docs/login) - [x] [登录操作 (人机认证)](docs/login/login_action) @@ -234,8 +238,8 @@ B站 API 采用 C/S 结构,大多数接口为 REST API 和 gRPC,少部分接 - [ ] [终端网络查询](docs/clientinfo) - [x] [基于ip的地理位置查询](docs/clientinfo/ip.md) - [x] [终端信息查询](docs/clientinfo/client_info.md) -- [ ] [其他](docs/other) - - [x] [获取当前时间戳](docs/other/time_stamp.md) +- [ ] [其他](docs/misc) + - [x] [获取当前时间戳](docs/misc/time_stamp.md) - [ ] [web端组件](docs/web_widget) - [x] [分区当日投稿数](docs/web_widget/zone_upload.md) - [x] [404 页漫画收集](docs/web_widget/404_manga.md) diff --git a/docs/login/login_info.md b/docs/login/login_info.md index 57925c3..c48b705 100644 --- a/docs/login/login_info.md +++ b/docs/login/login_info.md @@ -27,30 +27,33 @@ | -------------------- | ---- | ---------------- | ------------------------------------------------- | | isLogin | bool | 是否已登录 | false:未登录
true:已登录 | | email_verified | num | 是否验证邮箱地址 | 0:未验证
1:已验证 | -| face | str | 用户头像url | | +| face | str | 用户头像 url | | | level_info | obj | 等级信息 | | -| mid | num | 用户mid | | +| mid | num | 用户 mid | | | mobile_verified | num | 是否验证手机号 | 0:未验证
1:已验证 | | money | num | 拥有硬币数 | | | moral | num | 当前节操值 | 上限为70 | | official | obj | 认证信息 | | -| officialVerify | obj | 认证信息2 | | +| officialVerify | obj | 认证信息 2 | | | pendant | obj | 头像框信息 | | -| scores | num | 0 | 作用尚不明确 | +| scores | num | (?) | | | uname | str | 用户昵称 | | | vipDueDate | num | 会员到期时间 | 毫秒 时间戳 | | vipStatus | num | 会员开通状态 | 0:无
1:有 | | vipType | num | 会员类型 | 0:无
1:月度大会员
2:年度及以上大会员 | | vip_pay_type | num | 会员开通状态 | 0:无
1:有 | -| vip_theme_type | num | 0 | 作用尚不明确 | +| vip_theme_type | num | (?) | | | vip_label | obj | 会员标签 | | | vip_avatar_subscript | num | 是否显示会员图标 | 0:不显示
1:显示 | | vip_nickname_color | str | 会员昵称颜色 | 颜色码 | | wallet | obj | B币钱包信息 | | | has_shop | bool | 是否拥有推广商品 | false:无
true:有 | -| shop_url | str | 商品推广页面url | | -| allowance_count | num | 0 | 作用尚不明确 | -| answer_status | num | 0 | 作用尚不明确 | +| shop_url | str | 商品推广页面 url | | +| allowance_count | num | (?) | | +| answer_status | num | (?) | | +| is_senior_member | num | 是否硬核会员 | 0:非硬核会员
1:硬核会员 | +| wbi_img | obj | Wbi 签名实时口令 | 该字段即使用户未登录也存在 | +| is_jury | bool | (?) | | `data`中的`level_info`对象: @@ -79,35 +82,42 @@ `data`中的`pendant`对象: -| 字段 | 类型 | 内容 | 备注 | -| ------ | ---- | ----------- | ------------ | -| pid | num | 挂件id | | -| name | str | 挂件名称 | | -| image | str | 挂件图片url | | -| expire | num | 0 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ------ | ---- | ----------- | ---- | +| pid | num | 挂件id | | +| name | str | 挂件名称 | | +| image | str | 挂件图片url | | +| expire | num | (?) | | `data`中的`vip_label`对象: | 字段 | 类型 | 内容 | 备注 | | ----------- | ---- | -------- | ------------------------------------------------------------ | -| path | str | 空 | 作用尚不明确 | +| path | str | (?) | | | text | str | 会员名称 | | | label_theme | str | 会员标签 | vip:大会员
annual_vip:年度大会员
ten_annual_vip:十年大会员
hundred_annual_vip:百年大会员 | `data`中的`wallet`对象: -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ---- | ------------- | ------------ | -| mid | num | 登录用户mid | | -| bcoin_balance | num | 拥有B币数 | | -| coupon_balance | num | 每月奖励B币数 | | -| coupon_due_time | num | 0 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| --------------- | ---- | ------------- | ---- | +| mid | num | 登录用户mid | | +| bcoin_balance | num | 拥有B币数 | | +| coupon_balance | num | 每月奖励B币数 | | +| coupon_due_time | num | (?) | | + +`data`中的`wbi_img`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | ------------------------------- | ---------------------------------------- | +| img_url | str | Wbi 签名参数 `imgKey`的伪装 url | 详见文档 [Wbi 签名](../misc/sign/wbi.md) | +| sub_url | str | Wbi 签名参数 `subKey`的伪装 url | 详见文档 [Wbi 签名](../misc/sign/wbi.md) | **示例:** ```shell curl 'https://api.bilibili.com/nav' \ --b 'SESSDATA=xxx' + -b 'SESSDATA=xxx' ```
@@ -115,64 +125,110 @@ curl 'https://api.bilibili.com/nav' \ ```json { - "code":0, - "message":"0", - "ttl":1, - "data":{ - "isLogin":true, - "email_verified":1, - "face":"http://i1.hdslb.com/bfs/face/aebb2639a0d47f2ce1fec0631f412eaf53d4a0be.jpg", - "level_info":{ - "current_level":5, - "current_min":10800, - "current_exp":17065, - "next_exp":28800 + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "isLogin": true, + "email_verified": 1, + "face": "https://i0.hdslb.com/bfs/face/aebb2639a0d47f2ce1fec0631f412eaf53d4a0be.jpg", + "face_nft": 0, + "face_nft_type": 0, + "level_info": { + "current_level": 6, + "current_min": 28800, + "current_exp": 52689, + "next_exp": "--" }, - "mid":293793435, - "mobile_verified":1, - "money":33.4, - "moral":70, - "official":{ - "role":0, - "title":"", - "desc":"", - "type":-1 + "mid": 293793435, + "mobile_verified": 1, + "money": 172.4, + "moral": 70, + "official": { + "role": 0, + "title": "", + "desc": "", + "type": -1 }, - "officialVerify":{ - "type":-1, - "desc":"" + "officialVerify": { + "type": -1, + "desc": "" }, - "pendant":{ - "pid":0, - "name":"", - "image":"", - "expire":0, - "image_enhance":"" + "pendant": { + "pid": 2511, + "name": "初音未来13周年", + "image": "https://i0.hdslb.com/bfs/garb/item/4f8f3f1f2d47f0dad84f66aa57acd4409ea46361.png", + "expire": 0, + "image_enhance": "https://i0.hdslb.com/bfs/garb/item/fe0b83b53e2342b16646f6e7a9370d8a867decdb.webp", + "image_enhance_frame": "https://i0.hdslb.com/bfs/garb/item/127c507ec8448be30cf5f79500ecc6ef2fd32f2c.png" }, - "scores":0, - "uname":"社会易姐QwQ", - "vipDueDate":1612454400000, - "vipStatus":1, - "vipType":2, - "vip_pay_type":1, - "vip_theme_type":0, - "vip_label":{ - "path":"", - "text":"年度大会员", - "label_theme":"annual_vip" + "scores": 0, + "uname": "社会易姐QwQ", + "vipDueDate": 1707494400000, + "vipStatus": 1, + "vipType": 2, + "vip_pay_type": 0, + "vip_theme_type": 0, + "vip_label": { + "path": "", + "text": "年度大会员", + "label_theme": "annual_vip", + "text_color": "#FFFFFF", + "bg_style": 1, + "bg_color": "#FB7299", + "border_color": "", + "use_img_label": true, + "img_label_uri_hans": "", + "img_label_uri_hant": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png" }, - "vip_avatar_subscript":1, - "vip_nickname_color":"#FB7299", - "wallet":{ - "mid":293793435, - "bcoin_balance":8, - "coupon_balance":5, - "coupon_due_time":0 + "vip_avatar_subscript": 1, + "vip_nickname_color": "#FB7299", + "vip": { + "type": 2, + "status": 1, + "due_date": 1707494400000, + "vip_pay_type": 0, + "theme_type": 0, + "label": { + "path": "", + "text": "年度大会员", + "label_theme": "annual_vip", + "text_color": "#FFFFFF", + "bg_style": 1, + "bg_color": "#FB7299", + "border_color": "", + "use_img_label": true, + "img_label_uri_hans": "", + "img_label_uri_hant": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png" + }, + "avatar_subscript": 1, + "nickname_color": "#FB7299", + "role": 3, + "avatar_subscript_url": "", + "tv_vip_status": 0, + "tv_vip_pay_type": 0, + "tv_due_date": 1640793600 }, - "has_shop":false, - "shop_url":"", - "allowance_count":0, - "answer_status":0 + "wallet": { + "mid": 293793435, + "bcoin_balance": 5, + "coupon_balance": 5, + "coupon_due_time": 0 + }, + "has_shop": true, + "shop_url": "https://gf.bilibili.com?msource=main_station", + "allowance_count": 0, + "answer_status": 0, + "is_senior_member": 1, + "wbi_img": { + "img_url": "https://i0.hdslb.com/bfs/wbi/653657f524a547ac981ded72ea172057.png", + "sub_url": "https://i0.hdslb.com/bfs/wbi/6e4909c702f846728e64f6007736a338.png" + }, + "is_jury": false } } ``` diff --git a/docs/other/bvid_desc.md b/docs/misc/bvid_desc.md similarity index 100% rename from docs/other/bvid_desc.md rename to docs/misc/bvid_desc.md diff --git a/docs/other/errcode.md b/docs/misc/errcode.md similarity index 100% rename from docs/other/errcode.md rename to docs/misc/errcode.md diff --git a/docs/other/picture.md b/docs/misc/picture.md similarity index 100% rename from docs/other/picture.md rename to docs/misc/picture.md diff --git a/docs/misc/sign/APP.md b/docs/misc/sign/APP.md new file mode 100644 index 0000000..b2cc7c2 --- /dev/null +++ b/docs/misc/sign/APP.md @@ -0,0 +1,65 @@ +# APP API 签名与鉴权 + +## APP API 签名特性 + +部分客户端专用的 REST API 存在基于参数签名的鉴权,需要使用规定的`appkey`及其对应的`appsec`与原始请求参数进行签名计算,部分`AppKey`及与之对应的`AppSec`已经被公开:见该文档 [APPKey](APPKey.md) + +- 不同 `appkey` 对应不同的 app (如客户端、概念版、必剪、漫画、bililink等) + +- 不同平台同 app 也会存在不同的 `appkey` (如安卓端、ios端、TV端等) + +- 同平台同 app 下不同功能也会存在不同的 `appkey`(如登录专用、取流专用等) + +- 不同版本的客户端的 `appkey` 也可能不同 + +- **appkey与appsec一一对应** + +## APP API 签名算法 + +1. 首先为参数中添加`appkey`字段 +2. 然后按照参数的 Key 重新排序 +3. 再对这个 Key-Value 进行 url query 序列化,并拼接与之对应的`appsec` (盐) 进行 **md5 Hash 运算**(32-bit 字符小写),该 hash 便是 API 签名 +4. 最后在参数尾部增添`sign`字段,它的 Value 为上一步计算所得的 hash,一并作为表单或 Query 提交 + +## Demo + +该 Demo 提供 [Python](#Python) 语言例程 + +使用 appkey = `1d8b6e7d45233436`, appsec = `560c52ccd288fed045859ed18bffd973` 对如下 `params` 参数进行签名 + +上述示例`appkey`、`AppSec`均来自文档 [APPKey](APPKey.md) + +### Python + +```python +import hashlib +import urllib.parse + +def appsign(params, appkey, appsec): + '为请求参数进行 APP 签名' + params.update({'appkey': appkey}) + params = dict(sorted(params.items())) # 按照 key 重排参数 + query = urllib.parse.urlencode(params) # 序列化参数 + sign = hashlib.md5((query+appsec).encode()).hexdigest() # 计算 api 签名 + params.update({'sign':sign}) + return params + +appkey = '1d8b6e7d45233436' +appsec = '560c52ccd288fed045859ed18bffd973' +params = { + 'id':114514, + 'str':'1919810', + 'test':'いいよ,こいよ', +} +signed_params = appsign(params, appkey, appsec) +query = urllib.parse.urlencode(signed_params) +print(signed_params) +print(query) +``` + +输出内容分别是进行 APP 签名的后参数的 key-Value 以及 url query 形式 + +``` +{'appkey': '1d8b6e7d45233436', 'id': 114514, 'str': '1919810', 'test': 'いいよ,こいよ', 'sign': '01479cf20504d865519ac50f33ba3a7d'} +appkey=1d8b6e7d45233436&id=114514&str=1919810&test=%E3%81%84%E3%81%84%E3%82%88%EF%BC%8C%E3%81%93%E3%81%84%E3%82%88&sign=01479cf20504d865519ac50f33ba3a7d +``` diff --git a/docs/misc/sign/APPKey.md b/docs/misc/sign/APPKey.md new file mode 100644 index 0000000..ae64461 --- /dev/null +++ b/docs/misc/sign/APPKey.md @@ -0,0 +1,54 @@ +# APIKey + +以下为已知的 APPkey / APPSec,及部分使用场景参数信息,均来自抓包与逆向工程 + +| APPKEY | APPSEC | platform2 | APP类型 | neuronAppId1 | mobi_app2 | 备注 | +| :--------------: | :------------------------------: | :------------------: | :----------------: | :---------------------: | :------------------: | :----------------------------------------: | +| 9d5889cf67e615cd | 8fd9bb32efea8cef801fd895bef2713d | `android` | Ai4cCreatorAndroid | | | | +| 1d8b6e7d45233436 | 560c52ccd288fed045859ed18bffd973 | `android` | 粉版 | `1` | `android` | 获取资源通用 | +| 783bbb7264451d82 | 2653583c8873dea268ab9386918b1d65 | `android` | 粉版 | `1` | `android` | 仅获取用户信息时使用(7.X及更新版本) | +| 57263273bc6b67f6 | a0488e488d1567960d3a765e8d129f90 | `android` | 粉版 | `1` | `android` | 可能来自旧版 | +| 07da50c9a0bf829f | 25bdede4e1581c836cab73a48790ca6e | `android` | 概念版 | `3` | `android_b` | | +| 191c3b6b975af184 | | `android` | 概念版 | `3` | `android_b` | 新出现, 仅获取用户信息时使用. 暂未知appsec | +| 178cf125136ca8ea | 34381a26236dd1171185c0beb042e1c6 | `android` | 概念版 | `3` | `android_b` | 可能来自旧版 | +| 7d336ec01856996b | a1ce6983bc89e20a36c37f40c4f1a0dd | `android` | 概念版 | `3` | `android_b` | 可能来自旧版 | +| dfca71928277209b | b5475a8825547a4fc26c7d518eaaa02e | `android` | HD 版 | `5` | `android_hd` | | +| bb3101000e232e27 | 36efcfed79309338ced0380abd824ac1 | `android` | 白版 | `14` | `android_i` | | +| ae57252b0c09105d | c75875c596a69eb55bd119e74b07cfe3 | `android` | 白版 | `14` | `android_i` | 仅获取用户信息时使用(7.X及更新版本) | +| 8e16697a1b4f8121 | f5dd03b752426f2e623d7badb28d190a | `android` | 白版 | `14` | `android_i` | 可能来自旧版 | +| 7d089525d3611b1c | acd495b248ec528c2eed1e862d393126 | `android` | 蓝版 | `30` | `bstar_a` | | +| iVGUTjsxvpLeuDCf | aHRmhWMLkdeMuILqORnYZocwMBpMEOdt | `android` | - | - | - | 视频取流专用, 仅5.X旧版使用 | +| YvirImLGlLANCLvM | JNlZNgfNGKZEpaDTkCdPQVXntXhuiJEM | `ios` | - | - | - | 视频取流专用 | +| 27eb53fc9058f8c3 | c2ed53a74eeefe3cf99fbd01d8c9c375 | `web`/`ios`? | - | - | - | 第三方授权使用 | +| 84956560bc028eb7 | 94aba54af9065f71de72f5508f1cd42e | ? | UWP 版 | - | - | 部分API不接受此appkey, 返回-663错误 | +| 85eb6835b0a1034e | 2ad42749773c441109bdc0191257a664 | ? | UWP 版? | - | - | 部分API不接受此appkey, 返回-663错误 | +| 4ebafd7c4951b366 | 8cb98205e9b2ad3669aad0fce12a4c13 | `ios` | iPhone 客户端? | `iphone` | ? | | +| 8d23902c1688a798 | 710f0212e62bd499b8d3ac6e1db9302a | `android` | AndroidBiliThings | ? | ? | | +| 4c6e1021617d40d9 | e559a59044eb2701b7a8628c86aa12ae | `android` | AndroidMallTicket | ? | ? | | +| c034e8b74130a886 | e4e8966b1e71847dc4a3830f2d078523 | `android` | AndroidOttSdk | `7` | ? | | +| 4409e2ce8ffd12b8 | 59b43e04ad6965f34319062b478f83dd | `android` | 云视听小电视(TV版) | `9`? | `android_tv_yst`? | | +| 37207f2beaebf8d7 | e988e794d4d4b6dd43bc0e89d6e90c43 | `android` | BiliLink | ? | ? | | +| 9a75abf7de2d8947 | 35ca1c82be6c2c242ecc04d88c735f31 | `android` | BiliScan | ? | ? | | +| aae92bc66f3edfab | af125a0d5279fd576c1b4418a3e8276d | ? | PC 投稿工具 | - | ? | | +| bca7e84c2d947ac6 | 60698ba2f68e01ce44738920a0ffe768 | ? | login | - | ? | | + +注释: + +1 `neuronAppId`,产品编号,由数据平台分配,详情如下: + +- 粉(国内版)=1 +- 白(GooglePlay 版)=2 +- 蓝(东南亚版)=3 +- 直播姬=4 +- HD=5 +- 海外=6 +- OTT=7 +- 漫画=8 +- TV野版=9 +- 小视频=10 +- 网易漫画=11 +- 网易漫画lite=12 +- 网易漫画HD=13, +- 国际版=14 + +2 `platform`, `mobi_app` 仅供参考, 具体值需要抓包确定. \ No newline at end of file diff --git a/docs/misc/sign/wbi.md b/docs/misc/sign/wbi.md new file mode 100644 index 0000000..e1b1e8d --- /dev/null +++ b/docs/misc/sign/wbi.md @@ -0,0 +1,250 @@ +# Wbi签名 + +自 2023 年三月起,B站 Web 端部分接口开始使用 Wbi 鉴权方式,即一种独立于 [APP 鉴权](APP.md) 与其他 Cookie 鉴权的方式,表现在 REST API 请求时在 query 中添加了`w_rid`和`wts`字段,为一种 Web 端的风控手段 + +这些接口涵盖”用户投稿视频“、”用户投稿专栏“、”首页推送“、”推广信息“、”热搜“、”视频信息“、”视频取流“、”搜索“等待主要查询性业务接口,如果请求这些 REST API 缺失`w_rid`和`wts`字段,则会在数次请求后返回`-403:非法访问`这样的风控错误 + +感谢 [#631](https://github.com/SocialSisterYi/bilibili-API-collect/issues/631) 的研究与逆向工程 + +## Wbi签名算法 + +1. 获取实时口令 + + 从 [nav 接口](../../login/login_info.md#导航栏用户信息) 中获取`img_url`、`sub_url`两个字段的参数,并保存备用(如存入 localStorage),相关内容节选如下: + + **注:`img_url`、`sub_url`两个字段的值看似为存于 BFS 中的 png 图片 url,实则只是经过伪装的实时 Token,故无需且不能试图访问这两个 url** + + ```json + "wbi_img": { + "img_url": "https://i0.hdslb.com/bfs/wbi/653657f524a547ac981ded72ea172057.png", + "sub_url": "https://i0.hdslb.com/bfs/wbi/6e4909c702f846728e64f6007736a338.png" + }, + ``` + 这两个 Key 均为 url 中末尾路径的无扩展名的文件名,即`img_key=653657f524a547ac981ded72ea172057`,`sub_key=6e4909c702f846728e64f6007736a338` + + 这两个 Key 的值无关登录 Session 与 IP,属于全站统一使用的,但**每日都会变化**,使用时应做好**缓存和刷新**处理 + +2. 打乱重排实时口令 + + 把上一步获取到的`img_key`拼接在`sub_key`后面**(这里不是`img_url`和`sub_url`)**作为一个整体,将这个整体进行特定的顺序的字符打乱重排,再将重排后的字符串截取前 30 字符的切片,作为一个新的变量`mixin_key`,重排映射表长为 64,内容如下: + + ```javascript + const mixinKeyEncTab = [ + 46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, + 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, + 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11, + 36, 20, 34, 44, 52 + ] + ``` + + 打乱重排内容如下(以上述第 1 步的参数作为输入) + + ``` + 72136226c6a73669787ee4fd02a74c27 + ``` + +3. 将欲签名的请求参数排序后编码 + + 若下方内容为欲签名的请求参数(以 js obj 为例) + + ```javascript + { + foo: '114', + bar: '514', + baz: 1919810 + } + ``` + + 那么按照 Key 排序并进行 url query 编码后的结果应为: + + ``` + bar=514&baz=1919810&foo=114 + ``` + +4. 为参数中添加`wts`时间戳 + + `wts`字段的值应为以秒为单位的 Unix TimeStamp,如`1684746387` + + 将`wts`参数添加在参数列表最后,即: + + ``` + bar=514&baz=1919810&foo=114&wts=1684746387 + ``` + +5. 计算`w_rid`并添加在其后 + + 在上一步得出的 url query 字符串后拼接第 2 步计算得出的`mixin_key`(作为盐) + + ``` + bar=514&baz=1919810&foo=114&wts=168474638772136226c6a73669787ee4fd02a74c27 + ``` + + 对这个整体进行 **md5 Hash 运算**(32-bit 字符小写),得到的值便是 Wbi Sign,也就是参数`w_rid` + + ``` + d3cbd2a2316089117134038bf4caf442 + ``` + + 最后一步,把这个计算出的值作为参数`w_rid`添加在原始参数列表后,也就完成了一次 Wbi Sign,可以调用 REST API 进行请求了 + + ``` + bar=514&baz=1919810&foo=114&wts=1684746387&w_rid=d3cbd2a2316089117134038bf4caf442 + ``` + +## Wbi签名算法实现Demo + +该 Demo 提供 [Python](#Python)、[JavaScript](#JavaScript) 语言 + +### Python + +需要`requests`依赖 + +```python +from functools import reduce +from hashlib import md5 +import urllib.parse +import time +import requests + +mixinKeyEncTab = [ + 46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, + 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, + 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11, + 36, 20, 34, 44, 52 +] + +def getMixinKey(orig: str): + '对 imgKey 和 subKey 进行字符顺序打乱编码' + return reduce(lambda s, i: s + orig[i], mixinKeyEncTab, '')[:32] + +def encWbi(params: dict, img_key: str, sub_key: str): + '为请求参数进行 wbi 签名' + mixin_key = getMixinKey(img_key + sub_key) + curr_time = round(time.time()) + params['wts'] = curr_time # 添加 wts 字段 + params = dict(sorted(params.items())) # 按照 key 重排参数 + # 过滤 value 中的 "!'()*" 字符 + params = { + k : ''.join(filter(lambda chr: chr not in "!'()*", str(v))) + for k, v + in params.items() + } + query = urllib.parse.urlencode(params) # 序列化参数 + wbi_sign = md5((query + mixin_key).encode()).hexdigest() # 计算 w_rid + params['w_rid'] = wbi_sign + return params + +def getWbiKeys() -> tuple[str, str]: + '获取最新的 img_key 和 sub_key' + resp = requests.get('https://api.bilibili.com/x/web-interface/nav') + resp.raise_for_status() + json_content = resp.json() + img_url: str = json_content['data']['wbi_img']['img_url'] + sub_url: str = json_content['data']['wbi_img']['sub_url'] + img_key = img_url.rsplit('/', 1)[1].split('.')[0] + sub_key = sub_url.rsplit('/', 1)[1].split('.')[0] + return img_key, sub_key + +img_key, sub_key = getWbiKeys() + +signed_params = encWbi( + params={ + 'foo': '114', + 'bar': '514', + 'baz': 1919810 + }, + img_key=img_key, + sub_key=sub_key +) +query = urllib.parse.urlencode(signed_params) +print(signed_params) +print(query) +``` + +输出内容分别是进行 Wbi 签名的后参数的 key-Value 以及 url query 形式 + +``` +{'bar': '514', 'baz': '1919810', 'foo': '114', 'wts': '1684746387', 'w_rid': 'd3cbd2a2316089117134038bf4caf442'} +bar=514&baz=1919810&foo=114&wts=1684746387&w_rid=d3cbd2a2316089117134038bf4caf442 +``` + +### JavaScript + +需要`axios`、`md5`依赖 + +```javascript +import md5 from 'md5' +import axios from 'axios' + +const mixinKeyEncTab = [ + 46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, + 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, + 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11, + 36, 20, 34, 44, 52 +] + +// 对 imgKey 和 subKey 进行字符顺序打乱编码 +function getMixinKey(orig) { + let temp = '' + mixinKeyEncTab.forEach((n) => { + temp += orig[n] + }) + return temp.slice(0, 32) +} + +// 为请求参数进行 wbi 签名 +function encWbi(params, img_key, sub_key) { + const mixin_key = getMixinKey(img_key + sub_key), + curr_time = Math.round(Date.now() / 1000), + chr_filter = /[!'\(\)*]/g + let query = [] + params = Object.assign(params, {wts: curr_time}) // 添加 wts 字段 + // 按照 key 重排参数 + Object.keys(params).sort().forEach((key) => { + query.push( + encodeURIComponent(key) + + '=' + + // 过滤 value 中的 "!'()*" 字符 + encodeURIComponent(('' + params[key]).replace(chr_filter, '')) + ) + }) + query = query.join('&') + const wbi_sign = md5(query + mixin_key) // 计算 w_rid + return query + '&w_rid=' + wbi_sign +} + +// 获取最新的 img_key 和 sub_key +async function getWbiKeys() { + const resp = await axios({ + url: 'https://api.bilibili.com/x/web-interface/nav', + method: 'get', + responseType: 'json' + }), + json_content = resp.data, + img_url = json_content.data.wbi_img.img_url, + sub_url = json_content.data.wbi_img.sub_url + return { + img_key: img_url.substring(img_url.lastIndexOf('/') + 1, img_url.length).split('.')[0], + sub_key: sub_url.substring(sub_url.lastIndexOf('/') + 1, sub_url.length).split('.')[0] + } +} + +const wbi_keys = await getWbiKeys() + +const query = encWbi( + { + foo: '114', + bar: '514', + baz: 1919810 + }, + wbi_keys.img_key, + wbi_keys.sub_key +) +console.log(query) +``` + +输出内容为进行 Wbi 签名的后参数的 url query 形式 + +``` +bar=514&baz=1919810&foo=114&wts=1684805578&w_rid=bb97e15f28edf445a0e4420d36f0157e +``` diff --git a/docs/other/time_stamp.md b/docs/misc/time_stamp.md similarity index 100% rename from docs/other/time_stamp.md rename to docs/misc/time_stamp.md diff --git a/docs/other/API_sign.md b/docs/other/API_sign.md deleted file mode 100644 index 7824f97..0000000 --- a/docs/other/API_sign.md +++ /dev/null @@ -1,93 +0,0 @@ -# API 签名与鉴权 - -部分客户端专用的 RESTful API 存在基于 sign 的鉴权,需要使用规定的`appkey`及其对应的`appsec`与原始请求参数进行签名计算 - -不同 `appkey` 对应不同的 app (如客户端、概念版、必剪、漫画、bililink等) - -不同平台同 app 也会存在不同的 `appkey` (如安卓端、ios端、TV端等) - -同平台同 app 下不同功能也会存在不同的 `appkey`(如登录专用、取流专用等) - -不同版本的客户端的 `appkey` 也可能不同 - -**appkey与appsec一一对应** - -## API签名的计算方式 - -首先为参数中添加`appkey`字段,然后按照参数的 key 重新排序,再将重排序后的参数使用 url query 格式序列化拼接与该 appkey 相对应的 appsec (盐值) 进行**md5 hash计算**(32位小写),该 hash 便是 API 签名 - -为参数尾部增添`sign`字段,它的值为上一步计算所得的 hash,一并作为表单提交 - -**实例:** - -使用 appkey = `1d8b6e7d45233436`, appsec = `560c52ccd288fed045859ed18bffd973` 对如下 `params` 参数进行签名 - -```python -import hashlib -import urllib.parse - -def appsign(params, appkey, appsec): - '为请求参数进行 api 签名' - params.update({'appkey': appkey}) - params = dict(sorted(params.items())) # 重排序参数 key - query = urllib.parse.urlencode(params) # 序列化参数 - sign = hashlib.md5((query+appsec).encode()).hexdigest() # 计算 api 签名 - params.update({'sign':sign}) - return params - -appkey = '1d8b6e7d45233436' -appsec = '560c52ccd288fed045859ed18bffd973' -params = { - 'id':114514, - 'str':'1919810', - 'test':'いいよ,こいよ', -} -signed_params = appsign(params, appkey, appsec) -query = urllib.parse.urlencode(signed_params) -print(signed_params) -print(query) -``` - -输出以下内容,分别是进行 api 签名后参数的 dict 以及 url query 格式 - -``` -{'appkey': '1d8b6e7d45233436', 'id': 114514, 'str': '1919810', 'test': 'いいよ,こいよ', 'sign': '01479cf20504d865519ac50f33ba3a7d'} -appkey=1d8b6e7d45233436&id=114514&str=1919810&test=%E3%81%84%E3%81%84%E3%82%88%EF%BC%8C%E3%81%93%E3%81%84%E3%82%88&sign=01479cf20504d865519ac50f33ba3a7d -``` -## 已知的APPKEY/APPSEC, 及部分参数信息 - -| APPKEY | APPSEC | platform2 | APP类型 | neuronAppId1 | mobi_app2 | 备注 | -|:--:|:--:|:--:|:--:|:--:|:--:|:--:| -| 9d5889cf67e615cd | 8fd9bb32efea8cef801fd895bef2713d | `android` | Ai4cCreatorAndroid | -| 1d8b6e7d45233436 | 560c52ccd288fed045859ed18bffd973 | `android` | 普通版(粉版) | `1` |`android`| 获取资源通用 | -| 783bbb7264451d82 | 2653583c8873dea268ab9386918b1d65 | `android` | 普通版(粉版) | `1` | `android` | 仅获取用户信息时使用(7.X及更新版本) | -| 57263273bc6b67f6 | a0488e488d1567960d3a765e8d129f90 | `android` | 普通版(粉版) | `1` |`android`| 可能来自旧版 | -| 07da50c9a0bf829f | 25bdede4e1581c836cab73a48790ca6e | `android` | 概念版(蓝版) | `3` | `android_b` | -| 191c3b6b975af184 | ******************************** | `android` | 概念版(蓝版) | `3` | `android_b` | 新出现, 仅获取用户信息时使用. 暂未知appsec | -| 178cf125136ca8ea | 34381a26236dd1171185c0beb042e1c6 | `android` | 概念版(蓝版) | `3` | `android_b` | 可能来自旧版 | -| 7d336ec01856996b | a1ce6983bc89e20a36c37f40c4f1a0dd | `android` | 概念版(蓝版) | `3` | `android_b` | 可能来自旧版 | -| dfca71928277209b | b5475a8825547a4fc26c7d518eaaa02e | `android` | HD版 | `5` | `android_hd` | -| bb3101000e232e27 | 36efcfed79309338ced0380abd824ac1 | `android` | play版(国际版) | `14` | `android_i` | -| ae57252b0c09105d | c75875c596a69eb55bd119e74b07cfe3 | `android` | play版(国际版) | `14` | `android_i` | 仅获取用户信息时使用(7.X及更新版本) | -| 8e16697a1b4f8121 | f5dd03b752426f2e623d7badb28d190a | `android` | play版(国际版) | `14` | `android_i` | 可能来自旧版 | -| 7d089525d3611b1c | acd495b248ec528c2eed1e862d393126 | `android` | 东南亚版 | `30` | `bstar_a` | -| iVGUTjsxvpLeuDCf | aHRmhWMLkdeMuILqORnYZocwMBpMEOdt | `android` | - | - | - | 视频取流专用, 仅5.X旧版使用 | -| YvirImLGlLANCLvM | JNlZNgfNGKZEpaDTkCdPQVXntXhuiJEM | `ios` | - | - | - | 视频取流专用 | -| 27eb53fc9058f8c3 | c2ed53a74eeefe3cf99fbd01d8c9c375 | `web`/`ios`? | - | - | - | 第三方授权使用 | -| 84956560bc028eb7 | 94aba54af9065f71de72f5508f1cd42e | ? | UWP版 | - | - | 部分API不接受此appkey, 返回-663错误 | -| 85eb6835b0a1034e | 2ad42749773c441109bdc0191257a664 | ? | UWP版? | - | - | 部分API不接受此appkey, 返回-663错误 | -| 4ebafd7c4951b366 | 8cb98205e9b2ad3669aad0fce12a4c13 | `ios` | iPhone客户端? | `iphone` | ? | -| 8d23902c1688a798 | 710f0212e62bd499b8d3ac6e1db9302a | `android` | AndroidBiliThings | ? | ? | -| 4c6e1021617d40d9 | e559a59044eb2701b7a8628c86aa12ae | `android` | AndroidMallTicket | ? | ? | -| c034e8b74130a886 | e4e8966b1e71847dc4a3830f2d078523 | `android` | AndroidOttSdk | `7` | ? | -| 4409e2ce8ffd12b8 | 59b43e04ad6965f34319062b478f83dd | `android` | 云视听小电视(TV版) | `9`? | `android_tv_yst`? | -| 37207f2beaebf8d7 | e988e794d4d4b6dd43bc0e89d6e90c43 | `android` | BiliLink | ? | ? | -| 9a75abf7de2d8947 | 35ca1c82be6c2c242ecc04d88c735f31 | `android` | BiliScan | ? | ? | -| aae92bc66f3edfab | af125a0d5279fd576c1b4418a3e8276d | ? | PC 投稿工具 | - | ? | -| bca7e84c2d947ac6 | 60698ba2f68e01ce44738920a0ffe768 | ? | login | - | ? | - -注释: - -1 `neuronAppId`, 产品编号,由数据平台分配,粉=1,白=2,蓝=3,直播姬=4,HD=5,海外=6,OTT=7,漫画=8,TV野版=9,小视频=10,网易漫画=11,网易漫画lite=12,网易漫画HD=13, 国际版=14. - -2 `platform`, `mobi_app` 仅供参考, 具体值需要抓包确定. From 0e17dd421a42892efac3c23ce0f5be5771b8e24e Mon Sep 17 00:00:00 2001 From: XiaoMiku01 Date: Tue, 23 May 2023 11:52:42 +0800 Subject: [PATCH 023/159] =?UTF-8?q?[gRpc]=20=E6=B7=BB=E5=8A=A0=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=8C=BA=20At=20=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20(#681)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 增加新版动态点赞转发列表接口 * 更新包名 `interface` -> `interfaces` * 添加评论区 At 用户列表 gRPC 接口 * 添加grpc接口使用示例 --- .../bilibili/relation/interfaces/api.proto | 38 ++++++++++++++++++- grpc_api/readme.md | 26 +++++++------ 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/grpc_api/bilibili/relation/interfaces/api.proto b/grpc_api/bilibili/relation/interfaces/api.proto index 0ffdd02..6fe72cb 100644 --- a/grpc_api/bilibili/relation/interfaces/api.proto +++ b/grpc_api/bilibili/relation/interfaces/api.proto @@ -1 +1,37 @@ -// TODO \ No newline at end of file +syntax = "proto3"; + +package bilibili.relation.interface.v1; + +service RelationInterface { + // 评论区 At 用户列表 (无需登录鉴权) + rpc AtSearch (AtSearchReq) returns (AtSearchReply); +} + +message AtSearchReq { + // 可以为 1 , 但是不能为 0 或空 不知道有啥用 + int64 mid = 1; + // 用户名搜索关键词 + string keyword = 2; +} + +message AtSearchReply { + // 搜索结果分组 + repeated AtGroup items = 1; +} + +message AtGroup { + // 分组类型 2: 我的关注 4:其他 ,其他自测 + int32 group_type = 1; + // 分组名称 + string group_name = 2; + // 用户列表 + repeated AtItem items = 3; +} + +message AtItem { + int64 mid = 1; + string name = 2; + string face = 3; + int32 fans = 4; + int32 official_verify_type = 5; +} diff --git a/grpc_api/readme.md b/grpc_api/readme.md index 96d75a3..ea0e57f 100644 --- a/grpc_api/readme.md +++ b/grpc_api/readme.md @@ -1,34 +1,38 @@ -# grpc接口定义(protobuf结构体) +# grpc 接口定义(protobuf 结构体) 注: -1. proto结构体文件按照包名分类,同级放在同一目录中 +1. proto 结构体文件按照包名分类,同级放在同一目录中 2. 暂时无说明文档,稍后添加 -3. 以下文件全部来自apk的逆向工程,如有疏漏请包涵 +3. 以下文件全部来自 apk 的逆向工程,如有疏漏请包涵 -## grpc主机 +## grpc 主机 -B站客户端的grpc接口主机为以下服务器 +B 站客户端的 grpc 接口主机为以下服务器 > grpc.biliapi.net > > app.bilibili.com -## grpc鉴权 +## grpc 鉴权 -需要在请求http头部中添加`access_key`,如下 +需要在请求 http 头部中添加`access_key`,如下 ``` authorization:identify_v1 {access_key} ``` -## grpc头部 +## grpc 头部 -- [bilibili.metadata](bilibili/metadata):客户端环境参数 -- [bilibili.rpc](bilibili/rpc/status.proto):响应错误信息 +- [bilibili.metadata](bilibili/metadata):客户端环境参数 +- [bilibili.rpc](bilibili/rpc/status.proto):响应错误信息 ## 接口请求定义 -*稍后补充* \ No newline at end of file +_稍后补充_ + +## 示例 + +B 站 gRPC API Golang 封装:[XiaoMiku01/bilibili-grpc-api-go](https://github.com/XiaoMiku01/bilibili-grpc-api-go) From 44d1b3921b69322268d84963e67892fe529f82b4 Mon Sep 17 00:00:00 2001 From: Xianwei Pang Date: Fri, 26 May 2023 09:24:23 +0800 Subject: [PATCH 024/159] Update member_center.md (#687) --- docs/login/member_center.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/login/member_center.md b/docs/login/member_center.md index 34160d0..9612d60 100644 --- a/docs/login/member_center.md +++ b/docs/login/member_center.md @@ -101,9 +101,9 @@ curl 'https://api.bilibili.com/x/member/web/account' \ | watch | bool | 每日观看 | false:未完成
true:已完成
完成奖励5经验 | | coins | num | 每日投币所奖励的经验 | 上限为50
注:该值更新存在延迟
[另外一个专门API](#查询每日投币获得经验数) | | share | bool | 每日分享 | false:未完成
true:已完成
完成奖励5经验 | -| email | bool | 绑定邮箱 | false:未完成
true:已完成 | -| tel | bool | 绑定手机号 | false:未完成
true:已完成
首次完成完成奖励100经验 | -| safe_question | bool | 设置密保问题 | false:未完成
true:已完成 | +| email | bool | 绑定邮箱 | false:未完成
true:已完成
首次完成奖励20经验 | +| tel | bool | 绑定手机号 | false:未完成
true:已完成
首次完成奖励100经验 | +| safe_question | bool | 设置密保问题 | false:未完成
true:已完成
首次完成奖励30经验 | | identify_card | bool | 实名认证 | false:未完成
true:已完成
首次完成奖励50经验 | **示例:** @@ -283,7 +283,7 @@ curl 'https://api.bilibili.com/x/vip/web/user/info' \ | tel_verify | bool | 是否验证手机号 | false:未验证
true:已验证 | | mail_verify | bool | 是否验证邮箱 | false:未验证
true:已验证 | | unneeded_check | bool | 是否未设置密码 | false:已设置
true:未设置 | -| realname_certified | bool | 是否实名认证 | false:已认证
true:未认证 | +| realname_certified | bool | 是否实名认证 | false:未认证
true:已认证 | `data`中的`account_safe`对象: From 7b5ac3f50375310176709dc531d61a1761b6f5d8 Mon Sep 17 00:00:00 2001 From: THMonster Date: Fri, 26 May 2023 09:26:31 +0800 Subject: [PATCH 025/159] =?UTF-8?q?=E4=BF=AE=E6=AD=A3wbi=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E4=B8=80=E4=BA=9B=E6=8F=8F=E8=BF=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20(#684)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/misc/sign/wbi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/misc/sign/wbi.md b/docs/misc/sign/wbi.md index e1b1e8d..7c70f58 100644 --- a/docs/misc/sign/wbi.md +++ b/docs/misc/sign/wbi.md @@ -26,7 +26,7 @@ 2. 打乱重排实时口令 - 把上一步获取到的`img_key`拼接在`sub_key`后面**(这里不是`img_url`和`sub_url`)**作为一个整体,将这个整体进行特定的顺序的字符打乱重排,再将重排后的字符串截取前 30 字符的切片,作为一个新的变量`mixin_key`,重排映射表长为 64,内容如下: + 把上一步获取到的`sub_key`拼接在`img_key`后面 **(这里不是`img_url`和`sub_url`)** 作为一个整体,将这个整体进行特定的顺序的字符打乱重排,再将重排后的字符串截取前 32 字符的切片,作为一个新的变量`mixin_key`,重排映射表长为 64,内容如下: ```javascript const mixinKeyEncTab = [ From 2f9c09b4ea942f1516f118f6f89b360453e4a052 Mon Sep 17 00:00:00 2001 From: Xianwei Pang Date: Fri, 26 May 2023 10:30:19 +0800 Subject: [PATCH 026/159] Update login_info.md (#688) --- docs/login/login_info.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/login/login_info.md b/docs/login/login_info.md index c48b705..f70ce55 100644 --- a/docs/login/login_info.md +++ b/docs/login/login_info.md @@ -53,7 +53,7 @@ | answer_status | num | (?) | | | is_senior_member | num | 是否硬核会员 | 0:非硬核会员
1:硬核会员 | | wbi_img | obj | Wbi 签名实时口令 | 该字段即使用户未登录也存在 | -| is_jury | bool | (?) | | +| is_jury | bool | 是否风纪委员 | true:风纪委员
false:非风纪委员 | `data`中的`level_info`对象: From 8e2a4a9025e8fc22d6ab78f9434c2f49d7119d08 Mon Sep 17 00:00:00 2001 From: Ding Date: Fri, 26 May 2023 10:33:03 +0800 Subject: [PATCH 027/159] =?UTF-8?q?=E6=B7=BB=E5=8A=A0app=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=8E=A5=E5=8F=A3=20(#685)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update SMS.md * Update SMS.md --- docs/login/login_action/SMS.md | 201 +++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) diff --git a/docs/login/login_action/SMS.md b/docs/login/login_action/SMS.md index b359be7..21a8d53 100644 --- a/docs/login/login_action/SMS.md +++ b/docs/login/login_action/SMS.md @@ -89,6 +89,102 @@ curl 'https://passport.bilibili.com/web/generic/country/list'
+ +## 发送短信验证码_app端 + +> https://passport.bilibili.com/x/passport-login/sms/send + +*请求方式:POST* + +同手机号短信发送 CD 时间为 60s + +短信验证码 timeout 为 5min + +验证内容由第一次返回进行处理,解析recaptcha_url的params传到极验进行验证后取到验证结果入参后再次调用即可 + +**正文参数 (application/x-www-form-urlencoded):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| --- | --- | --- | --- | --- | +| cid | num | 国际冠字码 | 必要 | 可以从[获取国际冠字码](#获取国际冠字码(web端))获取 | +| tel | num | 手机号码 | 必要 | | +| login_session_id | str | 登录标识 | 必要 | uuid去掉'-'后得到 +| recaptcha_token | str | 登录 API token | 必要 | 在[申请 captcha 验证码](readme.md#申请captcha验证码)接口处获取 | +| gee_challenge | str | 极验 challenge | 必要 | 在[申请 captcha 验证码](readme.md#申请captcha验证码)接口处获取 | +| gee_validate | str | 极验 result | 必要 | 极验验证后得到 | +| gee_seccode | str | 极验 result +`\|jordan` | 必要 | 极验验证后得到 | +| channel | str | 通道? | 必要 | 一般固定值为"bili" | +| buvid | str | buvid | 必要 | 参考如下方法生成 | +| local_id | str | 同上 | 必要 | 同上 | +| statistics | str | ? | 必要 | 一般固定为{"appId":1,"platform":3,"version":"7.27.0","abtest":""},非key-value入参需要转URL编码 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------ | ---- | -------- | --------- | +| code | num | 返回值 | 0:成功
-400:请求错误
1002:手机号格式错误
86203:短信发送次数已达上限
1003:验证码已经发送
1025:该手机号在哔哩哔哩有过永久封禁记录,无法再次注册或绑定新账号
2400:登录秘钥错误
2406:验证极验服务出错 | +| message | str | 错误信息 | 成功为0 | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | -------------- | ------------------------ | +| captcha_key | str | 短信登录 token | 在下方传参时需要,请备用 | + +**示例:** + +例如手机号为`13888888888`,国际id为`1 (中国大陆)`,登录秘钥为`aabbccdd`,极验challenge为`2333`,极验结果为`666666`,进行发送短信验证码操作 + +```shell +curl 'https://passport.bilibili.com/x/passport-login/sms/send' \ +--data-urlencode 'tel=13888888888' \ +--data-urlencode 'cid=1' \ +--data-urlencode 'login_session_id=669900' \ +--data-urlencode 'recaptcha_token=aabbccdd' \ +--data-urlencode 'gee_challenge=2333' \ +--data-urlencode 'gee_validate=666666' \ +--data-urlencode 'gee_seccode=666666|jordan' \ +--data-urlencode 'channel=bili' \ +--data-urlencode 'buvid=999999' \ +--data-urlencode 'local_id=999999' \ +--data-urlencode 'statistics=%7B%22appId%22%3A1%2C%22platform%22%3A3%2C%22version%22%3A%227.27.0%22%2C%22abtest%22%3A%22%22%7D' +``` + +生成buvid方法 +``` javascript +static buvid() : string { + var mac = []; + for (let i = 0; i < 6; i++) { + var min = Math.min(0, 0xff) + var max = Math.max(0, 0xff) + var num = parseInt((Math.random() * (min - max + 1) + max).toString()).toString(16) + mac.push(num) + } + var md5 = this.md5(mac.join(':')); + var md5Arr = md5.split(''); + return "XY${md5Arr[2]}${md5Arr[12]}${md5Arr[22]}${md5}" +} +``` + +
+查看响应示例: + +```json +{"code":0, + "message":"0", + "ttl":1, + "data":{ + "captcha_key":"7542f109c3318d74847626495c68c321", + "recaptcha_url":"...." + } +} +``` + +
+ ## 发送短信验证码_web端 > https://passport.bilibili.com/x/passport-login/web/sms/send @@ -157,6 +253,111 @@ curl 'https://passport.bilibili.com/x/passport-login/web/sms/send' \
+## 使用短信验证码登录_app端 + +> https://passport.bilibili.com/x/passport-login/login/sms + +*请求方式:POST* + +验证登录成功后会返回实体内容: + + `mid` `expires_in` `access_token` `refresh_token` + +**正文参数 (application/x-www-form-urlencoded):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| --- | --- | --- | --- | --- | +| cid | num | 国际冠字码 | 必要 | 可以从[获取国际冠字码](#获取国际冠字码(web端))获取 | +| tel | num | 手机号码 | 必要 | | +| login_session_id | str | 登录标识 | 必要 | 必须与上述login_session_id保持一致 +| code | num | 短信验证码 | 必要 | timeout 为 5min | +| captcha_key | str | 短信登录 token | 必要 | 从[上述API](#发送短信验证码(web端))请求成功后返回 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| --- | --- | --- | --- | +| code | num | 返回值 | 0:成功
-400:请求错误
1006:请输入正确的短信验证码
1007:短信验证码已过期 | +| message | str | 错误信息 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| --- | --- | --- | --- | +| mid | str | 用户uid | | +| expires_in | str | 过时时间 | | +| access_token | str | 登录 token | | +| refresh_token | str | 刷新 token | | +| cookie_info | Array | cookie集合 | | + +**示例:** + +使用手机号`13888888888`,短信验证码为`123456`,进行验证登录操作 + +```shell +curl 'https://passport.bilibili.com/x/passport-login/login/sms' +--data-urlencode 'cid=1' \ +--data-urlencode 'tel=13888888888' \ +--data-urlencode 'code=123456' \ +--data-urlencode 'captcha_key=999999' \ +--data-urlencode 'login_session_id=669900' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "data": { + "token_info": { + "mid": "...", + "expires_in": "114514", + "access_token": "", + "refresh_token": "" + //... + }, + "cookie_info":[ + //... + ], + "message": "0" + } +} +``` + +
+ +**响应头部抓包信息:** + +可明显看见设置了几个cookie(填入浏览器即可成功登录) + +
+查看响应示例: + +```http +HTTP/1.1 200 OK +Date: Mon, 13 Jul 2020 09:57:33 GMT +Content-Type: application/json;charset=UTF-8 +Content-Length: 78 +Connection: keep-alive +Server: Apache-Coyote/1.1 +Set-Cookie: DedeUserID=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/ +Set-Cookie: DedeUserID__ckMd5=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/ +Set-Cookie: SESSDATA=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/; HttpOnly +Set-Cookie: bili_jct=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/ +Set-Cookie: sid=***; Domain=.bilibili.com; Expires=Sat, 18-Jul-2020 09:57:57 GMT; Path=/ +Expires: Mon, 13 Jul 2020 09:57:32 GMT +Cache-Control: no-cache +X-Cache-Webcdn: BYPASS from jd-sxhz-dx-w-01 + +``` + +
+ + ## 使用短信验证码登录_web端 > https://passport.bilibili.com/x/passport-login/web/login/sms From 252178292b943640e4943df4c12e6a0999216c02 Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Fri, 26 May 2023 12:13:49 +0800 Subject: [PATCH 028/159] =?UTF-8?q?update=E3=80=90=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E3=80=91=E3=80=90=E7=94=A8=E6=88=B7=E6=8A=95?= =?UTF-8?q?=E7=A8=BF=E8=A7=86=E9=A2=91=E3=80=91APIDoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/misc/errcode.md | 1 + docs/user/info.md | 523 ++++++++++++++++++++----------------------- docs/user/space.md | 413 ++++++++++++++++++++++------------ 3 files changed, 511 insertions(+), 426 deletions(-) diff --git a/docs/misc/errcode.md b/docs/misc/errcode.md index ad11f62..7e3d4a7 100644 --- a/docs/misc/errcode.md +++ b/docs/misc/errcode.md @@ -57,4 +57,5 @@ | -688 | 地理区域限制 | | -689 | 版权限制 | | -701 | 扣节操失败 | +| -799 | 请求过于频繁,请稍后再试 | |-8888|对不起,服务器开小差了~ (ಥ﹏ಥ)| diff --git a/docs/user/info.md b/docs/user/info.md index 42fbbd0..46c8100 100644 --- a/docs/user/info.md +++ b/docs/user/info.md @@ -4,70 +4,76 @@ ## 用户空间详细信息 -> https://api.bilibili.com/x/space/acc/info +> https://api.bilibili.com/x/space/wbi/acc/info *请求方式:GET* -认证方式:Cookie(SESSDATA) +认证方式:Cookie(SESSDATA) + +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + +~~该接口的旧版 API :https://api.bilibili.com/x/space/acc/info~~(已废弃,不建议使用) **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|-----| -| mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ------------------------------------ | +| mid | num | 目标用户mid | 必要 | | +| w_rid | str | Wbi 签名 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) | +| wts | num | 当前时间戳 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|---------------------| -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-400:请求错误
-403:访问权限不足
-404:用户不存在(如注销账号) | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|------------------|------|------------|--------------------------------------------------------------------------------------------------| -| mid | num | mid | | -| name | str | 昵称 | | -| sex | str | 性别 | 男/女/保密 | -| face | str | 头像链接 | | -| face_nft | num | 是否为 nft 头像 | `0`不是nft头像
`1`是 nft 头像 | -| face_nft_type | num | | 0,1 | -| sign | str | 签名 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------------- | ---- | ---------------- | ------------------------------------------------------------ | +| mid | num | mid | | +| name | str | 昵称 | | +| sex | str | 性别 | 男/女/保密 | +| face | str | 头像链接 | | +| face_nft | num | 是否为 NFT 头像 | 0:不是 NFT 头像
1:是 NFT 头像 | +| face_nft_type | num | NFT 头像类型? | | +| sign | str | 签名 | | | rank | num | 用户权限等级 | 目前应该无任何作用
5000:0级未答题
10000:普通会员
20000:字幕君
25000:VIP
30000:真·职人
32000:管理员 | -| level | num | 当前等级 | 0-6级 | -| jointime | num | 注册时间 | 此接口返回恒为`0` | -| moral | num | 节操值 | 此接口返回恒为`0` | -| silence | num | 封禁状态 | 0:正常
1:被封 | -| coins | num | 硬币数 | 需要登录(Cookie)
只能查看自己的
默认为0 | -| fans_badge | bool | 是否具有粉丝勋章 | false:无
true:有 | -| fans_medal | obj | 粉丝勋章信息 | | -| official | obj | 认证信息 | | -| vip | obj | 会员信息 | | -| pendant | obj | 头像框信息 | | -| nameplate | obj | 勋章信息 | | -| user_honour_info | obj | | | -| is_followed | bool | 是否关注此用户 | true:已关注
false:未关注
需要登录(Cookie)
未登录恒为false | -| top_photo | str | 主页头图链接 | | -| theme | obj | 空 | **作用尚不明确** | -| sys_notice | obj | 系统通知 | 无内容则为空对象
主要用于展示如用户争议、纪念账号等等 | -| live_room | obj | 直播间信息 | | -| birthday | str | 生日 | MM-DD
如设置隐私为空 | -| school | obj | 学校 | | -| profession | obj | 专业资质信息 | | -| tags | null | 个人标签 | | -| series | obj | | | -| is_senior_member | num | 是否为硬核会员 | 0:否
1:是 | -| mcn_info | null | | | -| gaia_res_type | num | | | -| gaia_data | null | | | -| is_risk | bool | | | -| elec | obj | 充电信息 | | -| contract | obj | 是否显示老粉计划 | | +| level | num | 当前等级 | 0-6 级 | +| jointime | num | 注册时间 | 此接口返回恒为`0` | +| moral | num | 节操值 | 此接口返回恒为`0` | +| silence | num | 封禁状态 | 0:正常
1:被封 | +| coins | num | 硬币数 | 需要登录(Cookie)
只能查看自己的
默认为`0` | +| fans_badge | bool | 是否具有粉丝勋章 | false:无
true:有 | +| fans_medal | obj | 粉丝勋章信息 | | +| official | obj | 认证信息 | | +| vip | obj | 会员信息 | | +| pendant | obj | 头像框信息 | | +| nameplate | obj | 勋章信息 | | +| user_honour_info | obj | (?) | | +| is_followed | bool | 是否关注此用户 | true:已关注
false:未关注
需要登录(Cookie)
未登录恒为`false` | +| top_photo | str | 主页头图链接 | | +| theme | obj | (?) | | +| sys_notice | obj | 系统通知 | 无内容则为空对象
主要用于展示如用户争议、纪念账号等等的小黄条 | +| live_room | obj | 直播间信息 | | +| birthday | str | 生日 | MM-DD
如设置隐私为空 | +| school | obj | 学校 | | +| profession | obj | 专业资质信息 | | +| tags | null | 个人标签 | | +| series | obj | | | +| is_senior_member | num | 是否为硬核会员 | 0:否
1:是 | +| mcn_info | null | (?) | | +| gaia_res_type | num | (?) | | +| gaia_data | null | (?) | | +| is_risk | bool | (?) | | +| elec | obj | 充电信息 | | +| contract | obj | 是否显示老粉计划 | | `rank`示例 @@ -108,29 +114,29 @@ `data`中的`official`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-----|------|-----------------------------------------| -| role | num | 认证类型 | 见[用户认证类型一览](official_role.md) | -| title | str | 认证信息 | 无为空 | -| desc | str | 认证备注 | 无为空 | -| type | num | 是否认证 | -1:无
0:个人认证
1:机构认证 | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | -------- | ---------------------------------------- | +| role | num | 认证类型 | 见 [用户认证类型一览](official_role.md) | +| title | str | 认证信息 | 无为空 | +| desc | str | 认证备注 | 无为空 | +| type | num | 是否认证 | -1:无
0:个人认证
1:机构认证 | `data`中的`vip`对象: -| 字段 | 类型 | 内容 | 备注 | -|----------------------|-----|-----------|----------------------------------------------| -| type | num | 会员类型 | 0:无
1:月大会员
2:年度及以上大会员 | -| status | num | 会员状态 | 0:无
1:有 | -| due_date | num | 会员过期时间 | Unix时间戳(毫秒) | -| vip_pay_type | num | 支付类型 | 0:未支付(常见于官方账号)
1:已支付(以正常渠道获取的大会员均为此值) | -| theme_type | num | 0 | 作用尚不明确 | -| label | obj | 会员标签 | | -| avatar_subscript | num | 是否显示会员图标 | 0:不显示
1:显示 | -| nickname_color | str | 会员昵称颜色 | 颜色码,一般为`#FB7299`,曾用于愚人节改变大会员配色 | -| role | num | 大角色类型 | 1:月度大会员
3:年度大会员
7:十年大会员
15:百年大会员 | -| avatar_subscript_url | str | 大会员角标地址 | | -| tv_vip_status | num | 电视大会员状态 | 0:未开通 | -| tv_vip_pay_type | num | 电视大会员支付类型 | | +| 字段 | 类型 | 内容 | 备注 | +| -------------------- | ---- | ------------------ | ------------------------------------------------------------ | +| type | num | 会员类型 | 0:无
1:月大会员
2:年度及以上大会员 | +| status | num | 会员状态 | 0:无
1:有 | +| due_date | num | 会员过期时间 | 毫秒时间戳 | +| vip_pay_type | num | 支付类型 | 0:未支付(常见于官方账号)
1:已支付(以正常渠道获取的大会员均为此值) | +| theme_type | num | 0 | 作用尚不明确 | +| label | obj | 会员标签 | | +| avatar_subscript | num | 是否显示会员图标 | 0:不显示
1:显示 | +| nickname_color | str | 会员昵称颜色 | 颜色码,一般为`#FB7299`,曾用于愚人节改变大会员配色 | +| role | num | 大角色类型 | 1:月度大会员
3:年度大会员
7:十年大会员
15:百年大会员 | +| avatar_subscript_url | str | 大会员角标地址 | | +| tv_vip_status | num | 电视大会员状态 | 0:未开通 | +| tv_vip_pay_type | num | 电视大会员支付类型 | | `vip`中的`label`对象: @@ -219,19 +225,19 @@ `sys_notice`示例 -| id | content | url | notice_type | 示例用户 | -|-----|-------------------------------------------------|-----|-------------|-------------------------------------------------------------------------------------------------| -| 5 | 该用户存在争议行为,已冻结其帐号功能的使用 | | 1 | [82385070](https://space.bilibili.com/82385070) | -| 8 | 该用户存在较大争议,请谨慎甄别其内容 | | 1 | [28062215](https://space.bilibili.com/28062215) | -| 11 | 该账号涉及合约争议,暂冻结其账号功能使用。详见公告-> | | 1 | -| 16 | 该UP主内容存在争议,请注意甄别视频内信息 | | 1 | [382534165](https://space.bilibili.com/382534165) | -| 20 | 请允许我们在此献上最后的告别,以此纪念其在哔哩哔哩留下的回忆与足迹。请点此查看纪念账号相关说明 | | 2 | -| 22 | 该账号涉及合约诉讼,封禁其账号使用。 | | -| 24 | 该账号涉及合约争议,暂冻结其账号功能使用。 | | 1 | [291229008](https://space.bilibili.com/291229008) | -| 25 | 该用户涉及严重指控,暂冻结其账号功能使用 | | 1 | [81447581](https://space.bilibili.com/81447581) | -| 31 | 该用户涉及严重指控,暂冻结其账号功能使用 | | 1 | [22439273](https://space.bilibili.com/22439273) | -| 34 | 该用户涉及严重指控,暂冻结其账号功能使用 | | 1 | [1640486775](https://space.bilibili.com/1640486775) | -| 36 | 该账户存在争议,请谨慎甄别 | | 1 | [198297](https://space.bilibili.com/198297)
[18149131](https://space.bilibili.com/18149131) | +| id | content | notice_type | 示例用户 | +|-----|-------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------| +| 5 | 该用户存在争议行为,已冻结其帐号功能的使用 | 1 | [82385070](https://space.bilibili.com/82385070) | +| 8 | 该用户存在较大争议,请谨慎甄别其内容 | 1 | [28062215](https://space.bilibili.com/28062215) | +| 11 | 该账号涉及合约争议,暂冻结其账号功能使用。详见公告-> | 1 || +| 16 | 该UP主内容存在争议,请注意甄别视频内信息 | 1 | [382534165](https://space.bilibili.com/382534165) | +| 20 | 请允许我们在此献上最后的告别,以此纪念其在哔哩哔哩留下的回忆与足迹。请点此查看纪念账号相关说明 | 2 |[212535360](https://space.bilibili.com/212535360)| +|22| 该账号涉及合约诉讼,封禁其账号使用 | || +| 24 | 该账号涉及合约争议,暂冻结其账号功能使用 | 1 | [291229008](https://space.bilibili.com/291229008) | +| 25 | 该用户涉及严重指控,暂冻结其账号功能使用 | 1 | [81447581](https://space.bilibili.com/81447581) | +| 31 | 该用户涉及严重指控,暂冻结其账号功能使用 | 1 | [22439273](https://space.bilibili.com/22439273) | +| 34 | 该用户涉及严重指控,暂冻结其账号功能使用 | 1 | [1640486775](https://space.bilibili.com/1640486775) | +| 36 | 该账户存在争议,请谨慎甄别 | 1 | [198297](https://space.bilibili.com/198297)
[18149131](https://space.bilibili.com/18149131) | `data`中的`live_room`对象: @@ -314,12 +320,14 @@ **示例:** -查询用户`mid=2`的详细信息 +查询用户`mid=2`的详细信息,Wbi 签名的 `wts`、`w_rid`生成方式详见 [Wbi 签名](../misc/sign/wbi.md) 文档 ```shell -curl -G 'https://api.bilibili.com/x/space/acc/info' \ ---data-urlencode 'mid=2' \ --b 'SESSDATA=xxx' +curl -G 'https://api.bilibili.com/x/space/wbi/acc/info' \ + --data-urlencode 'mid=2' \ + --data-urlencode 'wts=1685070149' \ + --data-urlencode 'w_rid=f7b376124782ae8cb42c56fdd69144ed' \ + -b 'SESSDATA=xxx' ```
@@ -327,204 +335,163 @@ curl -G 'https://api.bilibili.com/x/space/acc/info' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "mid": 2, - "name": "碧诗", - "sex": "男", - "face": "https://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg", - "face_nft": 0, - "face_nft_type": 0, - "sign": "https://kami.im 直男过气网红 # We Are Star Dust", - "rank": 20000, - "level": 6, - "jointime": 0, - "moral": 0, - "silence": 0, - "coins": 0, - "fans_badge": true, - "fans_medal": { - "show": true, - "wear": true, - "medal": { - "uid": 2, - "target_id": 335115, - "medal_id": 45408, - "level": 21, - "medal_name": "伍千万", - "medal_color": 1725515, - "intimacy": 1980, - "next_intimacy": 2000, - "day_limit": 250000, - "medal_color_start": 1725515, - "medal_color_end": 5414290, - "medal_color_border": 1725515, - "is_lighted": 1, - "light_status": 1, - "wearing_status": 1, - "score": 50001980 - } - }, - "official": { - "role": 2, - "title": "bilibili创始人(站长)", - "desc": "", - "type": 0 - }, - "vip": { - "type": 2, - "status": 1, - "due_date": 3909916800000, - "vip_pay_type": 0, - "theme_type": 0, - "label": { - "path": "", - "text": "十年大会员", - "label_theme": "ten_annual_vip", - "text_color": "#FFFFFF", - "bg_style": 1, - "bg_color": "#FB7299", - "border_color": "", - "use_img_label": true, - "img_label_uri_hans": "", - "img_label_uri_hant": "", - "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/activity-plat/static/20221008/0597543265563f522fad443825cff578/O9l2i8GdaZ.png", - "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/8u7iRTPE7N.png" - }, - "avatar_subscript": 1, - "nickname_color": "#FB7299", - "role": 7, - "avatar_subscript_url": "", - "tv_vip_status": 1, - "tv_vip_pay_type": 0 - }, - "pendant": { - "pid": 32257, - "name": "EveOneCat2", - "image": "https://i2.hdslb.com/bfs/garb/item/488870931b1bba66da36d22848f0720480d3d79a.png", - "expire": 0, - "image_enhance": "https://i2.hdslb.com/bfs/garb/item/5974f17f9d96a88bafba2f6d18d647a486e88312.webp", - "image_enhance_frame": "https://i2.hdslb.com/bfs/garb/item/4316a3910bb0bd6f2f1c267a3e9187f0b9fe5bd0.png" - }, - "nameplate": { - "nid": 10, - "name": "见习偶像", - "image": "https://i1.hdslb.com/bfs/face/e93dd9edfa7b9e18bf46fd8d71862327a2350923.png", - "image_small": "https://i1.hdslb.com/bfs/face/275b468b043ec246737ab8580a2075bee0b1263b.png", - "level": "普通勋章", - "condition": "所有自制视频总播放数>=10万" - }, - "user_honour_info": { - "mid": 0, - "colour": null, - "tags": [] - }, - "is_followed": false, - "top_photo": "http://i0.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", - "theme": {}, - "sys_notice": {}, - "live_room": { - "roomStatus": 1, - "liveStatus": 0, - "url": "https://live.bilibili.com/1024?broadcast_type=0&is_room_feed=0", - "title": "试图恰鸡", - "cover": "http://i0.hdslb.com/bfs/live/new_room_cover/96ee5bfd0279a0f18b190340334f43f473038288.jpg", - "roomid": 1024, - "roundStatus": 0, - "broadcast_type": 0, - "watched_show": { - "switch": true, - "num": 14, - "text_small": "14", - "text_large": "14人看过", - "icon": "https://i0.hdslb.com/bfs/live/a725a9e61242ef44d764ac911691a7ce07f36c1d.png", - "icon_location": "", - "icon_web": "https://i0.hdslb.com/bfs/live/8d9d0f33ef8bf6f308742752d13dd0df731df19c.png" - } - }, - "birthday": "09-19", - "school": { - "name": "" - }, - "profession": { - "name": "", - "department": "", - "title": "", - "is_show": 0 - }, - "tags": null, - "series": { - "user_upgrade_status": 3, - "show_upgrade_window": false - }, - "is_senior_member": 1, - "mcn_info": null, - "gaia_res_type": 0, - "gaia_data": null, - "is_risk": false, - "elec": { - "show_info": { - "show": true, - "state": 1, - "title": "", - "icon": "", - "jump_url": "" - } + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "mid": 2, + "name": "碧诗", + "sex": "男", + "face": "https://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg", + "face_nft": 0, + "face_nft_type": 0, + "sign": "https://kami.im 直男过气网红 # We Are Star Dust", + "rank": 20000, + "level": 6, + "jointime": 0, + "moral": 0, + "silence": 0, + "coins": 0, + "fans_badge": true, + "fans_medal": { + "show": true, + "wear": true, + "medal": { + "uid": 2, + "target_id": 335115, + "medal_id": 45408, + "level": 21, + "medal_name": "伍千万", + "medal_color": 1725515, + "intimacy": 1980, + "next_intimacy": 2000, + "day_limit": 250000, + "medal_color_start": 1725515, + "medal_color_end": 5414290, + "medal_color_border": 1725515, + "is_lighted": 1, + "light_status": 1, + "wearing_status": 1, + "score": 50001980 + } + }, + "official": { + "role": 2, + "title": "bilibili创始人(站长)", + "desc": "", + "type": 0 + }, + "vip": { + "type": 2, + "status": 1, + "due_date": 3931344000000, + "vip_pay_type": 0, + "theme_type": 0, + "label": { + "path": "", + "text": "十年大会员", + "label_theme": "ten_annual_vip", + "text_color": "#FFFFFF", + "bg_style": 1, + "bg_color": "#FB7299", + "border_color": "", + "use_img_label": true, + "img_label_uri_hans": "https://i0.hdslb.com/bfs/activity-plat/static/20220608/e369244d0b14644f5e1a06431e22a4d5/wltavwHAkL.gif", + "img_label_uri_hant": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/802418ff03911645648b63aa193ba67997b5a0bc.png", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/8u7iRTPE7N.png" + }, + "avatar_subscript": 1, + "nickname_color": "#FB7299", + "role": 7, + "avatar_subscript_url": "", + "tv_vip_status": 1, + "tv_vip_pay_type": 0, + "tv_due_date": 2000822400 + }, + "pendant": { + "pid": 32257, + "name": "EveOneCat2", + "image": "https://i2.hdslb.com/bfs/garb/item/488870931b1bba66da36d22848f0720480d3d79a.png", + "expire": 0, + "image_enhance": "https://i2.hdslb.com/bfs/garb/item/5974f17f9d96a88bafba2f6d18d647a486e88312.webp", + "image_enhance_frame": "https://i2.hdslb.com/bfs/garb/item/4316a3910bb0bd6f2f1c267a3e9187f0b9fe5bd0.png" + }, + "nameplate": { + "nid": 10, + "name": "见习偶像", + "image": "https://i2.hdslb.com/bfs/face/e93dd9edfa7b9e18bf46fd8d71862327a2350923.png", + "image_small": "https://i2.hdslb.com/bfs/face/275b468b043ec246737ab8580a2075bee0b1263b.png", + "level": "普通勋章", + "condition": "所有自制视频总播放数>=10万" + }, + "user_honour_info": { + "mid": 0, + "colour": null, + "tags": [] + }, + "is_followed": true, + "top_photo": "http://i2.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", + "theme": {}, + "sys_notice": {}, + "live_room": { + "roomStatus": 1, + "liveStatus": 0, + "url": "https://live.bilibili.com/1024?broadcast_type=0&is_room_feed=0", + "title": "试图恰鸡", + "cover": "http://i0.hdslb.com/bfs/live/new_room_cover/96ee5bfd0279a0f18b190340334f43f473038288.jpg", + "roomid": 1024, + "roundStatus": 0, + "broadcast_type": 0, + "watched_show": { + "switch": true, + "num": 19, + "text_small": "19", + "text_large": "19人看过", + "icon": "https://i0.hdslb.com/bfs/live/a725a9e61242ef44d764ac911691a7ce07f36c1d.png", + "icon_location": "", + "icon_web": "https://i0.hdslb.com/bfs/live/8d9d0f33ef8bf6f308742752d13dd0df731df19c.png" + } + }, + "birthday": "09-19", + "school": { + "name": "" + }, + "profession": { + "name": "", + "department": "", + "title": "", + "is_show": 0 + }, + "tags": null, + "series": { + "user_upgrade_status": 3, + "show_upgrade_window": false + }, + "is_senior_member": 0, + "mcn_info": null, + "gaia_res_type": 0, + "gaia_data": null, + "is_risk": false, + "elec": { + "show_info": { + "show": true, + "state": 1, + "title": "", + "icon": "", + "jump_url": "?oid=2" + } + }, + "contract": { + "is_display": false, + "is_follow_display": false + } } - } } ```
-**查询到的信息解析如下:** - -**用户昵称为**:碧诗 - -**性别**:男 - -**用户的头像为**: - -https://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg - - - -**等级**:6级 - -**生日**:09-19 - -**粉丝勋章状态**:拥有 - -**认证**:个人认证 - -**认证名称**: bilibili创始人(站长) - -**大会员类型**:年度 - -**大会员状态**:已开通 - -**电视大会员状态**:已开通 - -**头像框**:EveOneCat2 - -https://i2.hdslb.com/bfs/garb/item/5974f17f9d96a88bafba2f6d18d647a486e88312.webp - - - -**粉丝勋章**: 见习偶像 - -https://i1.hdslb.com/bfs/face/e93dd9edfa7b9e18bf46fd8d71862327a2350923.png - - - -**空间头图**: - -https://i0.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png - -![](https://i0.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png) - ## 用户名片信息 > https://api.bilibili.com/x/web-interface/card diff --git a/docs/user/space.md b/docs/user/space.md index 2e53826..6bce61e 100644 --- a/docs/user/space.md +++ b/docs/user/space.md @@ -2624,12 +2624,12 @@ curl -L -X GET 'https://api.bilibili.com/x/space/like/video?vmid=15858903' > https://api.bilibili.com/x/space/wbi/arc/search -> ~~https://api.bilibili.com/x/space/arc/search (旧 API,现已不可用)~~ - -PS:旧 API 现已不可使用,活返回`code=-799` - *请求方式:GET* +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + +~~该接口的旧版 API :https://api.bilibili.com/x/space/arc/search~~(已废弃,不建议使用) + **header字段:** 必须要有 `user-agent`,且不能为 `空字符串`,以及含有 `python`、`node`、`curl` 等的字符串 @@ -2644,6 +2644,8 @@ PS:旧 API 现已不可使用,活返回`code=-799` | keyword | str | 关键词筛选 | 非必要 | 用于使用关键词搜索该UP主视频稿件 | | pn | num | 页码 | 非必要 | | | ps | num | 每页项数 | 非必要 | 最小 1,最大 50,默认 30 | +| w_rid | str | Wbi 签名 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) | +| wts | num | 当前时间戳 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) | **json回复:** @@ -2651,28 +2653,29 @@ PS:旧 API 现已不可使用,活返回`code=-799` | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-400:请求错误
-412:请求被拦截
-1200:被降级过滤的请求(一种意义不明的偶发状况) | +| code | num | 返回值 | 0:成功
-400:请求错误
-403:访问权限不足
-412:请求被拦截
-1200:被降级过滤的请求(一种意义不明的偶发状况) | | message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | | data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|-----------------|------|----------|-----| -| list | obj | 列表信息 | | -| page | obj | 页面信息 | | -| episodic_button | obj | “播放全部“按钮 | | -| is_risk | bool | | | -| gaia_res_type | num | | | -| gaia_data | | | | +| 字段 | 类型 | 内容 | 备注 | +| --------------- | ---- | -------------- | ---- | +| list | obj | 列表信息 | | +| page | obj | 页面信息 | | +| episodic_button | obj | “播放全部“按钮 | | +| is_risk | bool | (?) | | +| gaia_res_type | num | (?) | | +| gaia_data | null | (?) | | `data`中的`list`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-------|----------|-----| -| tlist | obj | 投稿视频分区索引 | | -| vlist | array | 投稿视频列表 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ----- | ---------------- | ---- | +| tlist | obj | 投稿视频分区索引 | | +| vlist | array | 投稿视频列表 | | +| slist | array | (?) | | `list`中的`tlist`对象: @@ -2701,30 +2704,31 @@ PS:旧 API 现已不可使用,活返回`code=-799` | 字段 | 类型 | 内容 | 备注 | | ---------------- | ---- | -------------- | ------------------------------------------------------------ | -| aid | num | 稿件 avid | | -| author | str | 视频 UP 主 | 不一定为目标用户(合作视频) | -| bvid | str | 稿件 bvid | | | comment | num | 视频评论数 | | -| copyright | str | 稿件类型 | 1:原创
2:转载 | -| created | num | 投稿时间 | 时间戳 | -| description | str | 视频简介 | | -| hide_click | bool | false | 作用尚不明确 | -| is_pay | num | 0 | 作用尚不明确 | -| is_union_video | num | 是否为合作视频 | 0:否
1:是 | -| length | str | 视频长度 | MM:SS | -| mid | num | 视频 UP 主 mid | 不一定为目标用户(合作视频) | -| pic | str | 视频封面 | | -| play | num | 视频播放次数 | 如果视频基本信息API对应的状态为-403视频访问权限不足,数据类型将变为str,如("play": "--",),于mid79发表的av5132474可见 | -| review | num | 0 | 作用尚不明确 | -| subtitle | str | 空 | 作用尚不明确 | -| title | str | 视频标题 | | | typeid | num | 视频分区 tid | | +| play | num | 视频播放次数 | 如果视频基本信息 API 对应的状态为 -403 视频访问权限不足,数据类型将变为str,如("play": "--",),于 UID:79 发表的 av5132474 可见 | +| pic | str | 视频封面 | | +| subtitle | str | (?) | | +| description | str | 视频简介 | | +| copyright | str | 稿件类型 | 1:原创
2:转载 | +| title | str | 视频标题 | | +| review | num | (?) | | +| author | str | 视频 UP 主 | 不一定为目标用户(合作视频) | +| mid | num | 视频 UP 主 mid | 不一定为目标用户(合作视频) | +| created | num | 投稿时间 | 秒时间戳 | +| length | str | 视频长度 | MM:SS | | video_review | num | 视频弹幕数 | | -| is_steins_gate | num | 0 | | -| is_live_playback | num | 0 | | -| meta | | | | -| is_avoided | num | 0 | | -| attribute | num | 0 | | +| aid | num | 稿件 avid | | +| bvid | str | 稿件 bvid | | +| hide_click | bool | (?) | | +| is_pay | num | (?) | | +| is_union_video | num | 是否为合作视频 | 0:否
1:是 | +| is_steins_gate | num | (?) | | +| is_live_playback | num | 是否直播回放 | 0:否
1:是 | +| meta | null | (?) | | +| is_avoided | num | (?) | | +| attribute | num | (?) | | +| is_charging_arc | bool | (?) | | `data`中的`page`对象: @@ -2745,13 +2749,17 @@ PS:旧 API 现已不可使用,活返回`code=-799` `pn`(页码)和`ps`(每页项数)只改变`vlist`中成员的多少与内容 -以每页2项查询用户`mid=53456`的第1页投稿视频明细 +以每页 5 项查询用户`mid=53456`的第 1 页投稿视频明细 + +Wbi 签名的 `wts`、`w_rid`生成方式详见 [Wbi 签名](../misc/sign/wbi.md) 文档 ```shell curl -G 'https://api.bilibili.com/x/space/wbi/arc/search' \ --data-urlencode 'mid=53456' \ - --data-urlencode 'ps=2' \ - --data-urlencode 'pn=1' + --data-urlencode 'ps=5' \ + --data-urlencode 'pn=1' \ + --data-urlencode 'wts=1685073645' \ + --data-urlencode 'w_rid=2e49b69235fb3ea9340422ac9382cbc2' ```
@@ -2759,116 +2767,225 @@ curl -G 'https://api.bilibili.com/x/space/wbi/arc/search' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "list": { - "tlist": { - "1": { - "tid": 1, - "count": 41, - "name": "动画" + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "list": { + "tlist": { + "1": { + "tid": 1, + "count": 42, + "name": "动画" + }, + "3": { + "tid": 3, + "count": 36, + "name": "音乐" + }, + "4": { + "tid": 4, + "count": 85, + "name": "游戏" + }, + "36": { + "tid": 36, + "count": 1, + "name": "知识" + }, + "160": { + "tid": 160, + "count": 51, + "name": "生活" + }, + "211": { + "tid": 211, + "count": 3, + "name": "美食" + }, + "217": { + "tid": 217, + "count": 2, + "name": "动物圈" + } + }, + "vlist": [ + { + "comment": 2727, + "typeid": 17, + "play": 1379744, + "pic": "http://i0.hdslb.com/bfs/archive/d8745a327c56a1d8862054bf88ed1cd3d4cd2a0f.jpg", + "subtitle": "", + "description": "游戏:《塞尔达传说:王国之泪》\n真好玩!一口气玩了五天,到处游山玩水都没怎么顾得上推主线哈哈哈,虽然没能造出高达来,但胡乱折腾也很开心啦!\n我的微博:_warma_", + "copyright": "1", + "title": "【warma】我玩游戏太菜不要笑我!", + "review": 0, + "author": "Warma", + "mid": 53456, + "created": 1684468800, + "length": "27:53", + "video_review": 7538, + "aid": 741294090, + "bvid": "BV1dk4y1L77W", + "hide_click": false, + "is_pay": 0, + "is_union_video": 0, + "is_steins_gate": 0, + "is_live_playback": 0, + "meta": null, + "is_avoided": 0, + "attribute": 0, + "is_charging_arc": false + }, + { + "comment": 2959, + "typeid": 172, + "play": 1601320, + "pic": "http://i2.hdslb.com/bfs/archive/5bc6b4b78787508fec6e5545313a5aac49b420ab.jpg", + "subtitle": "", + "description": "来继续更新我的光遇之旅啦~这次也录到了好几个交到新朋友的瞬间了哈哈哈,每次被陌生人夸的时候都感觉特别不好意思但是又好开心!喜欢这里慢悠悠的氛围~最近夜行季也上线了,来欣赏美丽的月食吧!\n祝大家看得开心啦!", + "copyright": "1", + "title": "【warma】这里的陌生人都热情过头了啊啊啊!", + "review": 0, + "author": "Warma", + "mid": 53456, + "created": 1683434541, + "length": "21:56", + "video_review": 2552, + "aid": 570782455, + "bvid": "BV12z4y1h72d", + "hide_click": false, + "is_pay": 0, + "is_union_video": 0, + "is_steins_gate": 0, + "is_live_playback": 0, + "meta": null, + "is_avoided": 0, + "attribute": 0, + "is_charging_arc": false + }, + { + "comment": 6844, + "typeid": 21, + "play": 3898109, + "pic": "http://i0.hdslb.com/bfs/archive/733239b86fe15c5f07d15872a955e1819dcc1f31.jpg", + "subtitle": "", + "description": "我想试着练习写一本从构思、正文、插画、排版到封面设计全都由自己来完成的书!\n\n虽然这本书未来还不确定,但是我尽力啦~大家如果觉得有哪里做得还不够好请指出来告诉我吧,我还有很多很多需要学习的地方,请大家多多指教啦!\n如果有出版社的编辑老师正在观看此视频的话,请老师们多多指教,希望能够和老师们取得联系:chickenfish@vip.qq.com\n\n电子书文件发在评论区啦~", + "copyright": "1", + "title": "【warma】我要写书啦!!!", + "review": 0, + "author": "Warma", + "mid": 53456, + "created": 1680840000, + "length": "21:55", + "video_review": 15975, + "aid": 909664793, + "bvid": "BV1oM4y1y7Q4", + "hide_click": false, + "is_pay": 0, + "is_union_video": 0, + "is_steins_gate": 0, + "is_live_playback": 0, + "meta": null, + "is_avoided": 0, + "attribute": 0, + "is_charging_arc": false + }, + { + "comment": 2030, + "typeid": 17, + "play": 2272296, + "pic": "http://i0.hdslb.com/bfs/archive/d0d12a011d2a3799a77fa84372372581abdc917c.jpg", + "subtitle": "", + "description": "玩到尽兴为止!\n\n录制/视频制作:warma\n录制/插画:怒九", + "copyright": "1", + "title": "【warma/怒九】陪我打游戏!(胁迫)", + "review": 0, + "author": "Warma", + "mid": 53456, + "created": 1677816000, + "length": "36:42", + "video_review": 9902, + "aid": 482867257, + "bvid": "BV1XT411v76Y", + "hide_click": false, + "is_pay": 0, + "is_union_video": 1, + "is_steins_gate": 0, + "is_live_playback": 0, + "meta": null, + "is_avoided": 0, + "attribute": 0, + "is_charging_arc": false + }, + { + "comment": 12666, + "typeid": 21, + "play": 1892762, + "pic": "http://i0.hdslb.com/bfs/archive/5e712811e893886fb0535a95e1609cb3ba307a39.jpg", + "subtitle": "", + "description": "你好~这是我的一期电台节目,现在也已经是第十一期啦,但是即便没看过前面几期也不会影响观看,因为这是个什么都聊聊看的日常电台嘛~\n \n这期电台内容非常友好、令人安心,只是偶尔有点“问题”,但好在目前还是处于能安全观看的水平,请来看看吧。\n \n录音/视频制作:warma\n我的微博:_warma_\n \n背景插画:认知Renz\n发光粒子素材:K_Lacid \n【视频某处的曲子的staff】\n翻唱:Warma\n曲绘:不鱼\nPV:祈凉_&兽人苦工\n后期:白萝卜音乐工作室\n \n(感谢以上老师的帮助~)", + "copyright": "1", + "title": "【warma爆炸电台】曾经性格阴沉的我正在分享创作心得与日常【第十一期】", + "review": 0, + "author": "Warma", + "mid": 53456, + "created": 1674964800, + "length": "77:24", + "video_review": 68240, + "aid": 990909915, + "bvid": "BV1Ex4y177xd", + "hide_click": false, + "is_pay": 0, + "is_union_video": 0, + "is_steins_gate": 0, + "is_live_playback": 0, + "meta": { + "id": 149941, + "title": "爆炸电台", + "cover": "https://archive.biliimg.com/bfs/archive/b833b4299b3f4252ebe4d2902421aa25ba9e7ccc.jpg", + "mid": 53456, + "intro": "你好!这是我的电台节目《爆炸电台》,这是个什么都聊聊看的日常电台,内容是纯音频的,所以看不看画面都没问题~\n电台的时间比较长,可以拿点零食饮料或者放在一旁慢慢听什么的都很合适~\n祝观看愉快~!", + "sign_state": 0, + "attribute": 140, + "stat": { + "season_id": 149941, + "view": 11824985, + "danmaku": 363116, + "reply": 50348, + "favorite": 343639, + "coin": 665105, + "share": 50804, + "like": 1013864, + "mtime": 1685073652, + "vt": 71631635, + "vv": 0 + }, + "ep_count": 10, + "first_aid": 990909915, + "ptime": 1674964800, + "ep_num": 0 + }, + "is_avoided": 0, + "attribute": 0, + "is_charging_arc": false + } + ], + "slist": [] }, - "3": { - "tid": 3, - "count": 36, - "name": "音乐" + "page": { + "pn": 1, + "ps": 5, + "count": 220 }, - "4": { - "tid": 4, - "count": 82, - "name": "游戏" + "episodic_button": { + "text": "播放全部", + "uri": "//www.bilibili.com/medialist/play/53456?from=space" }, - "36": { - "tid": 36, - "count": 1, - "name": "知识" - }, - "160": { - "tid": 160, - "count": 49, - "name": "生活" - }, - "211": { - "tid": 211, - "count": 3, - "name": "美食" - }, - "217": { - "tid": 217, - "count": 2, - "name": "动物圈" - } - }, - "vlist": [ - { - "comment": 6729, - "typeid": 172, - "play": 2171260, - "pic": "http://i2.hdslb.com/bfs/archive/9fe04c2acb6678c9a8d1547db211e458ea70982c.jpg", - "subtitle": "", - "description": "好开心能和几千人一起看音乐会!真的震撼到我了,它给我带来的冲击感远超出了我的想象……光遇这场音乐会会一直持续到元旦哦,大家感兴趣的话也可以来试试吧~\n祝看得开心啦!", - "copyright": "1", - "title": "【warma】我尝试学习交朋友", - "review": 0, - "author": "Warma", - "mid": 53456, - "created": 1671163200, - "length": "23:58", - "video_review": 7931, - "aid": 433873134, - "bvid": "BV1nG411P7hf", - "hide_click": false, - "is_pay": 0, - "is_union_video": 0, - "is_steins_gate": 0, - "is_live_playback": 0, - "meta": null, - "is_avoided": 0, - "attribute": 0 - }, - { - "comment": 3380, - "typeid": 31, - "play": 811600, - "pic": "http://i2.hdslb.com/bfs/archive/7e6c6ec32a0db8684abd660d599644e9d1c43ee4.jpg", - "subtitle": "", - "description": "原曲:BV1iR4y1X7V9\n这首歌是今年生日的时候收到的礼物,真的太好听了!我也想翻唱试试~\n在翻唱中录了一些不一样的小音效,比如卡祖笛和竖笛,还录了些小配音……大家来听听看!\n谢谢原曲staff老师们做出这么有趣的作品,谢谢在这次翻唱中staff老师们的帮助(PV老师甚至根据翻唱版本把曲子的PV做了些修改,加了好多小细节,真的超用心!)\n祝听得开心啦~\n \n【staff表】\n原曲staff:详见BV1iR4y1X7V9\n翻唱:warma\n混音:白萝卜音乐工作室\nPV修改:@颜一bot \n封面:是根", - "copyright": "1", - "title": "【warma】来唱大家送我的歌!《夏天幻游日记》", - "review": 0, - "author": "Warma", - "mid": 53456, - "created": 1670558400, - "length": "02:59", - "video_review": 2343, - "aid": 733323002, - "bvid": "BV18D4y1Y7o6", - "hide_click": false, - "is_pay": 0, - "is_union_video": 0, - "is_steins_gate": 0, - "is_live_playback": 0, - "meta": null, - "is_avoided": 0, - "attribute": 0 - } - ] - }, - "page": { - "pn": 1, - "ps": 2, - "count": 214 - }, - "episodic_button": { - "text": "播放全部", - "uri": "//www.bilibili.com/medialist/play/53456?from=space" - }, - "is_risk": false, - "gaia_res_type": 0, - "gaia_data": null - } + "is_risk": false, + "gaia_res_type": 0, + "gaia_data": null + } } ``` From 1372f85e5d8b5842ce7126e9916c97ae51c57c72 Mon Sep 17 00:00:00 2001 From: 7rikka Date: Fri, 26 May 2023 15:33:23 +0800 Subject: [PATCH 029/159] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=93=8D=E5=BA=94=E7=A0=81=20(#690)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/comment/action.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/comment/action.md b/docs/comment/action.md index 152abe4..7fcf4e4 100644 --- a/docs/comment/action.md +++ b/docs/comment/action.md @@ -25,12 +25,12 @@ 根对象: -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-102:账号被封停
-111:csrf校验失败
-400:请求错误
-404:无此项
-509:请求过于频繁
12001:已经存在评论主题
12002:评论区已关闭
12003:禁止回复
12006:没有该评论
12009:评论主体的type不合法
12015:需要评论验证码
12016:评论内容包含敏感信息
12025:评论字数过多
12035:该账号被UP主列入评论黑名单
12051:重复评论,请勿刷屏
12052:评论区已关闭
**(其他错误码有待补充)** | -| message | str | 错误信息 |
| -| ttl | num | 1 | | -| data | obj | 数据本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| code | num | 返回值 | 0:成功
-101:账号未登录
-102:账号被封停
-111:csrf校验失败
-400:请求错误
-404:无此项
-509:请求过于频繁
12001:已经存在评论主题
12002:评论区已关闭
12003:禁止回复
12006:没有该评论
12009:评论主体的type不合法
12015:需要评论验证码
12016:评论内容包含敏感信息
12025:评论字数过多
12035:该账号被UP主列入评论黑名单
12051:重复评论,请勿刷屏
12052:评论区已关闭
12045:购买后即可发表评论
**(其他错误码有待补充)** | +| message | str | 错误信息 |
| +| ttl | num | 1 | | +| data | obj | 数据本体 | | `data`对象: From fc0c6874d94f45d97b74c624fa61baeacdace2ca Mon Sep 17 00:00:00 2001 From: Jianqi Pan Date: Sun, 4 Jun 2023 18:22:25 +0900 Subject: [PATCH 030/159] :sparkles: feat: add golang wbi demo (#696) --- docs/misc/sign/wbi.md | 154 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 153 insertions(+), 1 deletion(-) diff --git a/docs/misc/sign/wbi.md b/docs/misc/sign/wbi.md index 7c70f58..15e969f 100644 --- a/docs/misc/sign/wbi.md +++ b/docs/misc/sign/wbi.md @@ -93,7 +93,7 @@ ## Wbi签名算法实现Demo -该 Demo 提供 [Python](#Python)、[JavaScript](#JavaScript) 语言 +该 Demo 提供 [Python](#Python)、[JavaScript](#JavaScript)、[Golang](#Golang) 语言 ### Python @@ -248,3 +248,155 @@ console.log(query) ``` bar=514&baz=1919810&foo=114&wts=1684805578&w_rid=bb97e15f28edf445a0e4420d36f0157e ``` + +### Golang + +需要 `github.com/tidwall/gjson` 作为依赖 + +```golang +package main + +import ( + "crypto/md5" + "encoding/hex" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "sort" + "strconv" + "strings" + "sync" + "time" + + "github.com/tidwall/gjson" +) + +var mixinKeyEncTab = []int{ + 46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, + 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, + 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11, + 36, 20, 34, 44, 52, +} + +func getMixinKey(orig string) string { + var str strings.Builder + for _, v := range mixinKeyEncTab { + if v < len(orig) { + str.WriteByte(orig[v]) + } + } + return str.String()[:32] +} +func EncWbi(params map[string]string, imgKey string, subKey string) map[string]string { + mixinKey := getMixinKey(imgKey + subKey) + currTime := strconv.FormatInt(time.Now().Unix(), 10) + params["wts"] = currTime + // Sort keys + keys := make([]string, 0, len(params)) + for k := range params { + keys = append(keys, k) + } + sort.Strings(keys) + // Remove unwanted characters + for k, v := range params { + v = strings.ReplaceAll(v, "!", "") + v = strings.ReplaceAll(v, "'", "") + v = strings.ReplaceAll(v, "(", "") + v = strings.ReplaceAll(v, ")", "") + v = strings.ReplaceAll(v, "*", "") + params[k] = v + } + // Build URL parameters + var str strings.Builder + for _, k := range keys { + str.WriteString(fmt.Sprintf("%s=%s&", k, params[k])) + } + query := strings.TrimSuffix(str.String(), "&") + // Calculate w_rid + hash := md5.Sum([]byte(query + mixinKey)) + params["w_rid"] = hex.EncodeToString(hash[:]) + return params +} + +var cache sync.Map +var lastUpdateTime time.Time + +func updateCache() { + if time.Now().Sub(lastUpdateTime).Minutes() < 10 { + return + } + imgKey, subKey := GetWbiKeys() + cache.Store("imgKey", imgKey) + cache.Store("subKey", subKey) + lastUpdateTime = time.Now() +} + +func GetWbiKeysCached() (string, string) { + updateCache() + imgKeyI, _ := cache.Load("imgKey") + subKeyI, _ := cache.Load("subKey") + return imgKeyI.(string), subKeyI.(string) +} + +func GetWbiKeys() (string, string) { + resp, err := http.Get("https://api.bilibili.com/x/web-interface/nav") + if err != nil { + fmt.Println("Error:", err) + return "", "" + } + defer resp.Body.Close() + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + fmt.Println("Error:", err) + return "", "" + } + json := string(body) + imgURL := gjson.Get(json, "data.wbi_img.img_url").String() + subURL := gjson.Get(json, "data.wbi_img.sub_url").String() + imgKey := strings.Split(strings.Split(imgURL, "/")[len(strings.Split(imgURL, "/"))-1], ".")[0] + subKey := strings.Split(strings.Split(subURL, "/")[len(strings.Split(subURL, "/"))-1], ".")[0] + return imgKey, subKey +} + +func SignURL(urlStr string) string { + urlObj, _ := url.Parse(urlStr) + imgKey, subKey := GetWbiKeysCached() + fmt.Println(imgKey, subKey) + query := urlObj.Query() + params := map[string]string{} + for k, v := range query { + params[k] = v[0] + } + newParams := EncWbi(params, imgKey, subKey) + for k, v := range newParams { + query.Set(k, v) + } + urlObj.RawQuery = query.Encode() + newUrlStr := urlObj.String() + return newUrlStr +} +func main() { + urlStr := "https://api.bilibili.com/x/space/wbi/acc/info?mid=1850091" + newUrlStr := utils.SignURL(urlStr) // 签名 + req, err := http.NewRequest("GET", newUrlStr, nil) + if err != nil { + return nil, err + } + // 设置请求头,模拟浏览器 + req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36") + response, err := http.DefaultClient.Do(req) + fmt.Println(newUrlStr) + if err != nil { + fmt.Printf("请求发送失败:%s", err) + return nil, err + } + defer response.Body.Close() + body, err := ioutil.ReadAll(response.Body) + if err != nil { + fmt.Printf("读取响应失败:%s", err) + return nil, err + } + fmt.Println(string(body)) +} +``` From 81eb5a414fbab840e257602f252bca9867334e90 Mon Sep 17 00:00:00 2001 From: Ryuujo Zhang Date: Sun, 4 Jun 2023 20:34:21 +0800 Subject: [PATCH 031/159] Update QR.md (#697) --- docs/login/login_action/QR.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/login/login_action/QR.md b/docs/login/login_action/QR.md index d826af9..bbdfda6 100644 --- a/docs/login/login_action/QR.md +++ b/docs/login/login_action/QR.md @@ -83,18 +83,19 @@ curl 'https://passport.bilibili.com/x/passport-login/web/qrcode/generate' *请求方式:GET* +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +|------------|-----|--------|-----|-----| +| qrcode_key | str | 扫码登录秘钥 | 必要 | | + + 密钥超时为180秒 验证登录成功后会进行设置以下cookie项: `DedeUserID` `DedeUserID__ckMd5` `SESSDATA` `bili_jct` -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------------|-----|--------|-----|-----| -| qrcode_key | str | 扫码登录秘钥 | 非必要 | | - **json回复:** 根对象: From 5be5bd6a4aca82b928731d01d088e0257c12b7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bryan=E4=B8=8D=E5=8F=AF=E6=80=9D=E8=AE=AE?= Date: Mon, 5 Jun 2023 15:06:35 +0800 Subject: [PATCH 032/159] =?UTF-8?q?[gRpc]=20=E6=B7=BB=E5=8A=A0=E5=A4=A7?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E4=B8=93=E5=B1=9E=E9=A2=9C=E8=89=B2=20(#695)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grpc_api/bilibili/community/service/dm/v1/dm.proto | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/grpc_api/bilibili/community/service/dm/v1/dm.proto b/grpc_api/bilibili/community/service/dm/v1/dm.proto index 9673a01..f5d6e9d 100644 --- a/grpc_api/bilibili/community/service/dm/v1/dm.proto +++ b/grpc_api/bilibili/community/service/dm/v1/dm.proto @@ -221,6 +221,8 @@ message DanmakuElem { int32 attr = 13; // string animation = 22; + // 大会员专属颜色 + DmColorfulType colorful = 24; } // 弹幕ai云屏蔽条目 @@ -348,6 +350,16 @@ enum DMAttrBit { DMAttrHighLike = 2; // 高赞弹幕 } +message DmColorful { + DmColorfulType type = 1; // 颜色类型 + string src = 2; // +} + +enum DmColorfulType { + NoneType = 0; // 无 + VipGradualColor = 60001; // 渐变色 +} + // message DmExpoReportReq { // @@ -402,6 +414,7 @@ message DmSegMobileReply { int32 state = 2; // 弹幕云屏蔽ai评分值 DanmakuAIFlag ai_flag = 3; + repeated DmColorful colorfulSrc = 5; } // 获取弹幕-请求 From 45dd000836b1c6edf9e366f10997515552660924 Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Mon, 5 Jun 2023 16:22:17 +0800 Subject: [PATCH 033/159] =?UTF-8?q?update=20=E3=80=90=E5=BC=B9=E5=B9=95?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E3=80=91APIDoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/danmaku/action.md | 82 ++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/docs/danmaku/action.md b/docs/danmaku/action.md index 1b26a3b..2b4445e 100644 --- a/docs/danmaku/action.md +++ b/docs/danmaku/action.md @@ -14,21 +14,23 @@ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------------------ | -------------- | ------------------------------------------------------------ | -| access_key | str | APP登录Token | APP方式必要 | | -| type | num | 弹幕类选择 | 必要 | 1:视频弹幕 | -| oid | num | 视频cid | 必要 | | -| msg | str | 弹幕内容 | 必要 | 长度小于100字符 | -| bvid | str | 稿件bvid | 必要(可选) | avid与bvid任选一个 | -| aid | num | 稿件avid | 必要(可选) | avid与bvid任选一个 | -| progress | num | 弹幕出现在视频内的时间 | 非必要 | 单位为毫秒
默认为0 | -| color | num | 弹幕颜色设置 | 非必要 | 十进制RGB888值
默认为16777215(#FFFFFF)白色 | -| fontsize | num | 弹幕字号设置 | 非必要 | 默认为25
极小:12
超小:16
小:18
标准:25
大:36
超大:45
极大:64 | -| pool | num | 弹幕池选择 | 非必要 | 0:普通池
1:字幕池
2:特殊池(代码/BAS弹幕)
默认为0 | -| mode | num | 弹幕类型选择 | 必要 | 1:普通弹幕
4:底部弹幕
5:顶部弹幕
7:高级弹幕
9:BAS弹幕(`pool`必须为2) | -| rnd | num | 当前时间戳*1000000 | 非必要 | **若无此项,则发送弹幕冷却时间限制为90s**
若有此项,则发送弹幕冷却时间限制为5s | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------------- | ---- | ------------------------- | --------------- | ------------------------------------------------------------ | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| type | num | 弹幕类选择 | 必要 | 1:视频弹幕
2:漫画弹幕 | +| oid | num | 视频 cid | 必要 | | +| msg | str | 弹幕内容 | 必要 | 长度小于 100 字符 | +| bvid | str | 稿件 bvid | 必要(可选) | avid 与 bvid 任选一个 | +| aid | num | 稿件 avid | 必要(可选) | avid 与 bvid 任选一个 | +| progress | num | 弹幕出现在视频内的时间 | 非必要 | 单位为毫秒
默认为0 | +| color | num | 弹幕颜色设置 | 非必要 | 十进制 RGB888 值
如`16777215`为 #FFFFFF 即白色 | +| fontsize | num | 弹幕字号设置 | 非必要 | 默认为 25
极小:12
超小:16
小:18
标准:25
大:36
超大:45
极大:64 | +| pool | num | 弹幕池选择 | 非必要 | 0:普通池
1:字幕池
2:特殊池(代码/BAS弹幕)
默认为0 | +| mode | num | 弹幕类型选择 | 必要 | 1:普通弹幕
4:底部弹幕
5:顶部弹幕
7:高级弹幕
9:BAS弹幕(`pool`必须为2) | +| rnd | num | 当前时间戳*1000000 | 非必要 | **若无此项,则发送弹幕冷却时间限制为90s**
若有此项,则发送弹幕冷却时间限制为5s | +| colorful | num | 彩色弹幕 | 非必要 | 60001:专属渐变彩色(需要会员) | +| checkbox_type | num | 是否带 UP 身份标识 | 非必要 | 0:普通
4:带有标识 | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | **json回复:** @@ -36,38 +38,48 @@ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-102:账号被封停
-111:csrf校验失败
-400:请求错误
-404:无此项
36700:系统升级中
36701:弹幕包含被禁止的内容
36702:弹幕长度大于100
36703:发送频率过快
36704:禁止向未审核的视频发送弹幕
36705:您的等级不足,不能发送弹幕
36706:您的等级不足,不能发送顶端弹幕
36707:您的等级不足,不能发送底端弹幕
36708:您的等级不足,不能发送彩色弹幕
36709:您的等级不足,不能发送高级弹幕
36710:您的权限不足,不能发送这种样式的弹幕
36711:该视频禁止发送弹幕
36712:level 1用户发送弹幕的最大长度为20
36713:稿件未付费
36714:弹幕发送时间不合法
36715:当日操作数量超过上限 | +| code | num | 返回值 | 0:成功
-101:账号未登录
-102:账号被封停
-111:csrf校验失败
-400:请求错误
-404:无此项
36700:系统升级中
36701:弹幕包含被禁止的内容
36702:弹幕长度大于100
36703:发送频率过快
36704:禁止向未审核的视频发送弹幕
36705:您的等级不足,不能发送弹幕
36706:您的等级不足,不能发送顶端弹幕
36707:您的等级不足,不能发送底端弹幕
36708:您的等级不足,不能发送彩色弹幕
36709:您的等级不足,不能发送高级弹幕
36710:您的权限不足,不能发送这种样式的弹幕
36711:该视频禁止发送弹幕
36712:level 1用户发送弹幕的最大长度为20
36713:稿件未付费
36714:弹幕发送时间不合法
36715:当日操作数量超过上限
36718:目前您不是大会员,无法使用会员权益 | | message | str | 错误信息 | 默认为0 | | ttl | num | 1 | | | data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -| -------- | ---- | -------- | ------------ | -| action | str | 空 | 作用尚不明确 | -| dmid | num | 弹幕dmid | | -| dmid_str | str | 弹幕dmid | 字串形式 | -| visible | bool | true | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ------------ | ---------- | ------------------ | -------------------------------- | +| action | str | (?) | | +| animation | str | 弹幕样式 Json? | | +| colorful_src | str 或 obj | 渐变彩色样式信息? | 当请求参数`colorful=60001`时有效 | +| dm_content | str | (?) | | +| dmid | num | 弹幕 dmid | | +| dmid_str | str | 弹幕 dmid | 字串形式 | +| visible | bool | (?) | | + +`data`中的`colorful_src`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------------- | ---- | +| type | num | 60001 | | +| src | str | 渐变色样式 Json? | | **示例:** -为视频`av2`/`BV1xx411c7mD`(cid为`62131`)的5000ms位置发送一条弹幕`前来考古`(颜色为#FFFFFF,字号25,普通弹幕,游动弹幕) +为视频`av2`/`BV1xx411c7mD`(cid为`62131`)的 5000ms 位置发送一条弹幕`前来考古`(颜色为 #FFFFFF,字号 25,普通弹幕,游动弹幕) ```shell curl 'https://api.bilibili.com/x/v2/dm/post' \ ---data-urlencode 'type=1' \ ---data-urlencode 'oid=62131' \ ---data-urlencode 'msg=前来考古' \ ---data-urlencode 'aid=2' \ ---data-urlencode 'progress=5000' \ ---data-urlencode 'color=16777215' \ ---data-urlencode 'fontsize=25' \ ---data-urlencode 'pool=0' \ ---data-urlencode 'mode=1' \ ---data-urlencode 'rnd=3456789987654321' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'type=1' \ + --data-urlencode 'oid=62131' \ + --data-urlencode 'msg=前来考古' \ + --data-urlencode 'aid=2' \ + --data-urlencode 'progress=5000' \ + --data-urlencode 'color=16777215' \ + --data-urlencode 'fontsize=25' \ + --data-urlencode 'pool=0' \ + --data-urlencode 'mode=1' \ + --data-urlencode 'rnd=3456789987654321' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
From e379d904c2753fa30e9083f59016f07e89d19467 Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Tue, 6 Jun 2023 11:02:19 +0800 Subject: [PATCH 034/159] =?UTF-8?q?update=E3=80=90=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E3=80=91APIDoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/user/relation.md | 1724 +++++++++++++++++------------------------ 1 file changed, 711 insertions(+), 1013 deletions(-) diff --git a/docs/user/relation.md b/docs/user/relation.md index 375ed95..1ac2891 100644 --- a/docs/user/relation.md +++ b/docs/user/relation.md @@ -1,73 +1,42 @@ # 用户关系相关 -## 查询用户粉丝明细 +## 查询关系列表 -> https://api.bilibili.com/x/relation/followers +### 关系列表对象 -*请求方式:GET* +| 字段 | 类型 | 内容 | 备注 | +| --------------- | ------------------------------------------- | --------------- | ------------------------------------------------------------ | +| mid | num | 用户 mid | | +| attribute | num | 关注属性 | 0:未关注
1:已关注
2:已关注
6:已互粉
128:已拉黑 | +| mtime | num | 关注对方时间 | 时间戳
互关后刷新 | +| tag | 默认分组:null
存在至少一个分组:array | 分组 id | | +| special | num | 特别关注标志 | 0:否
1:是 | +| contract_info | obj | (?) | | +| uname | str | 用户昵称 | | +| face | str | 用户头像url | | +| face_nft | num | 是否为 NFT 头像 | 0:非 NFT 头像
1:NFT 头像 | +| sign | str | 用户签名 | | +| official_verify | obj | 认证信息 | | +| vip | obj | 会员信息 | | +| nft_icon | str | (?) | | +| rec_reason | str | (?) | | +| track_id | str | (?) | | -认证方式:Cookie(SESSDATA)或APP +数组`list`中的对象中的`tag`数组: -登录可看自己前1000名,其他用户可查看前250名(网页端请求时ps为20,所以直接查看只能看到前100名) - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | ---------------------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| vmid | num | 目标用户mid | 必要 | | -| ps | num | 每页项数 | 非必要 | 默认为50 | -| pn | num | 页码 | 非必要 | 默认为1
其他用户仅可查看前5页 | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | --------------------------------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
22007:访问超过5页 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ----- | -------- | ------------ | -| list | array | 明细列表 | | -| re_version | num | ??? | 作用尚不明确 | -| total | num | 粉丝总数 | | - -`data`中的`list`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------- | ---------------- | -| 0 | obj | 粉丝1 | | -| n | obj | 粉丝(n+1) | 按照关注顺序排列 | -| …… | obj | …… | …… | - -`list`中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ---- | ------------ | --------------------------------------- | -| mid | num | 用户mid | | -| attribute | num | 关注属性 | 0:未关注
2:已关注
6:已互粉 | -| mtime | num | 成为粉丝时间 | 时间戳
互关后刷新 | -| tag | null | | | -| special | num | 0 | | -| uname | str | 用户昵称 | | -| face | str | 用户头像url | | -| sign | str | 用户签名 | | -| official_verify | obj | 认证信息 | | -| vip | obj | 会员信息 | | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ------------------------ | ---- | +| 0 | num | 位于分组 1 的分组 id | | +| n | num | 位于分组(n+1)的分组 id | | +| …… | num | …… | …… | `list`中的对象中的`official_verify`对象: | 字段 | 类型 | 内容 | 备注 | | ---- | ---- | ------------ | ------------------- | -| type | num | 用户认证类型 | -1:无
0:个人认证
1:机构认证 | +| type | num | 用户认证类型 | -1:无
1:认证 | | desc | str | 用户认证信息 | 无为空 | `list`中的对象中的`vip`对象: @@ -76,18 +45,64 @@ | ------------- | ---- | ------------ | ----------------------------------------------- | | vipType | num | 会员类型 | 0:无
1:月度大会员
2:年度以上大会员 | | vipDueDate | num | 会员到期时间 | 时间戳 毫秒 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | +| dueRemark | str | (?) | | +| accessStatus | num | (?) | | | vipStatus | num | 大会员状态 | 0:无
1:有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| themeType | num | 0 | 作用尚不明确 | -| label | obj | ??? | 作用尚不明确 | +| vipStatusWarn | str | (?) | | +| themeType | num | (?) | | +| label | obj | (?) | | `vip`中的`label`对象: -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---- | ------------ | -| path | str | 空 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ------ | ---- | +| path | str | (?) | | + +### 查询用户粉丝明细 + +> https://api.bilibili.com/x/relation/followers + +*请求方式:GET* + +认证方式:Cookie(SESSDATA)或 APP + +登录可看当前用户前 1000 名,其他用户可查看前 250 名(网页端请求时`ps`为 20,所以直接查看只能看到前 100 名) + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | ------------------------------------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| vmid | num | 目标用户 mid | 必要 | | +| ps | num | 每页项数 | 非必要 | 默认为 50 | +| pn | num | 页码 | 非必要 | 默认为 1
其他用户仅可查看前 5 页 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ----------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
22007:访问超过 5 页 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ----- | -------- | ---- | +| list | array | 明细列表 | | +| re_version | num | (?) | | +| total | num | 粉丝总数 | | + +`data`中的`list`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ------------ | ---------------------------------- | +| 0 | obj | 粉丝 1 | 详见 [关系列表对象](#关系列表对象) | +| n | obj | 粉丝 (n+1) | 按照添加顺序排列 | +| …… | obj | …… | …… | **示例:** @@ -95,10 +110,10 @@ ```shell curl -G 'https://api.bilibili.com/x/relation/followers' \ ---data-urlencode 'vmid=293793435' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ --b 'SESSDATA=xxx' + --data-urlencode 'vmid=293793435' \ + --data-urlencode 'ps=2' \ + --data-urlencode 'pn=1' \ + -b 'SESSDATA=xxx' ```
@@ -169,27 +184,25 @@ curl -G 'https://api.bilibili.com/x/relation/followers' \
-## 查询用户关注明细 - - +### 查询用户关注明细 > https://api.bilibili.com/x/relation/followings *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP -登录可看自己全部,其他用户仅可查看前5页 +登录可看当前用户全部,其他用户仅可查看前5页 **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | ------------------------------------------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| vmid | num | 目标用户mid | 必要 | | -| order_type | str | 排序方式 | 非必要 | 按照关注顺序排列:留空
按照最常访问排列:attention | -| ps | num | 每页项数 | 非必要 | 默认为50 | -| pn | num | 页码 | 非必要 | 默认为1
其他用户仅可查看前5页 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | ------------------------------------------------------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| vmid | num | 目标用户 mid | 必要 | | +| order_type | str | 排序方式 | 非必要 | 按照关注顺序排列:留空
按照最常访问排列:attention | +| ps | num | 每页项数 | 非必要 | 默认为 50 | +| pn | num | 页码 | 非必要 | 默认为 1
其他用户仅可查看前 5 页 | **json回复:** @@ -197,75 +210,26 @@ curl -G 'https://api.bilibili.com/x/relation/followers' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-400:请求错误
22007:访问超过5页
22115:用户已设置隐私,无法查看 | -| message | str | 错误信息 | 默认为0 | +| code | num | 返回值 | 0:成功
-400:请求错误
22007:访问超过 5 页
22115:用户已设置隐私,无法查看 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | | data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ----- | -------- | ------------ | -| list | array | 明细列表 | | -| re_version | num | ??? | 作用尚不明确 | -| total | num | 关注总数 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ----- | -------- | ---- | +| list | array | 明细列表 | | +| re_version | num | (?) | | +| total | num | 关注总数 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------- | ---------------- | -| 0 | obj | 关注1 | | -| n | obj | 关注(n+1) | 按照关注顺序排列 | -| …… | obj | …… | …… | - -数组`list`中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ---------------------------------------- | ------------ | --------------------------------------- | -| mid | num | 用户mid | | -| attribute | num | 关注属性 | 0:未关注
2:已关注
6:已互粉 | -| mtime | num | 关注对方时间 | 时间戳
互关后刷新 | -| tag | 默认分组:null
存在至少一个分组:array | 分组id | | -| special | num | 特别关注标志 | 0:否
1:是 | -| uname | str | 用户昵称 | | -| face | str | 用户头像url | | -| sign | str | 用户签名 | | -| official_verify | obj | 认证信息 | | -| vip | obj | 会员信息 | | - -数组`list`中的对象中的`tag`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------------- | ---- | -| 0 | num | 位于分组1的分组id | | -| n | num | 位于分组(n+1)的分组id | | -| …… | num | …… | …… | - -`list`中的对象中的`official_verify`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------ | ------------------- | -| type | num | 用户认证类型 | -1:无
1:认证 | -| desc | str | 用户认证信息 | 无为空 | - -`list`中的对象中的`vip`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------------- | ---- | ------------ | ----------------------------------------------- | -| vipType | num | 会员类型 | 0:无
1:月度大会员
2:年度以上大会员 | -| vipDueDate | num | 会员到期时间 | 时间戳 毫秒 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | -| vipStatus | num | 大会员状态 | 0:无
1:有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| themeType | num | 0 | 作用尚不明确 | -| label | obj | ??? | 作用尚不明确 | - -`vip`中的`label`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---- | ------------ | -| path | str | 空 | 作用尚不明确 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | -------------------------------- | +| 0 | obj | 关注1 | 见 [关系列表对象](#关系列表对象) | +| n | obj | 关注(n+1) | 按照添加顺序排列 | +| …… | obj | …… | …… | **示例:** @@ -273,11 +237,11 @@ curl -G 'https://api.bilibili.com/x/relation/followers' \ ```shell curl -G 'https://api.bilibili.com/x/relation/followings' \ ---data-urlencode 'vmid=293793435' \ ---data-urlencode 'order_type=' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ --b 'SESSDATA=xxx' + --data-urlencode 'vmid=293793435' \ + --data-urlencode 'order_type=' \ + --data-urlencode 'ps=2' \ + --data-urlencode 'pn=1' \ + -b 'SESSDATA=xxx' ```
@@ -348,73 +312,72 @@ curl -G 'https://api.bilibili.com/x/relation/followings' \
-## 查询用户关注明细2 - - +### 查询用户关注明细2 > https://app.biliapi.net/x/v2/relation/followings *请求方式:GET* -仅可查看前5页,可以获取已设置可见性隐私的关注列表 +仅可查看前 5 页,可以获取已设置可见性隐私的关注列表 **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ------ | -------------------------- | -| vmid | num | 目标用户mid | 必要 | | -| ps | num | 每页项数 | 非必要 | 默认为50 | -| pn | num | 页码 | 非必要 | 默认为1
仅可查看前5页 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------ | ------ | ----------------------------- | +| vmid | num | 目标用户 mid | 必要 | | +| ps | num | 每页项数 | 非必要 | 默认为 50 | +| pn | num | 页码 | 非必要 | 默认为 1
仅可查看前 5 页 | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | --------------------------------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
22007:访问超过5页 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ----------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
22007:访问超过 5 页 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ----- | -------- | ------------ | -| list | array | 明细列表 | | -| re_version | num | ??? | 作用尚不明确 | -| total | num | 关注总数 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ----- | -------- | ---- | +| list | array | 明细列表 | | +| re_version | num | (?) | | +| total | num | 关注总数 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------- | ---------------- | -| 0 | obj | 关注1 | | -| n | obj | 关注(n+1) | 按照关注顺序排列 | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | --------------------------------------------- | +| 0 | obj | 关注 1 | 与 [关系列表对象](#关系列表对象) 数据结构不同 | +| n | obj | 关注(n+1) | 按照添加顺序排列 | +| …… | obj | …… | …… | 数组`list`中的对象: | 字段 | 类型 | 内容 | 备注 | | --------------- | ---------------------------------------- | ------------ | --------------------------------------- | -| mid | num | 用户mid | | +| mid | num | 用户 mid | | | attribute | num | 关注属性 | 0:未关注
2:已关注
6:已互粉 | | mtime | num | 关注对方时间 | 时间戳
互关后刷新 | -| tag | 默认分组:null
存在至少一个分组:array | 分组id | | +| tag | 默认分组:null
存在至少一个分组:array | 分组 id | | | special | num | 特别关注标志 | 0:否
1:是 | | uname | str | 用户昵称 | | -| face | str | 用户头像url | | +| face | str | 用户头像 url | | | sign | str | 用户签名 | | | official_verify | obj | 认证信息 | | | vip | obj | 会员信息 | | +| live | num | 是否直播 | 0:未直播
1:直播中 | 数组`list`中的对象中的`tag`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------------- | ---- | -| 0 | num | 位于分组1的分组id | | -| n | num | 位于分组(n+1)的分组id | | -| …… | num | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ------------------------ | ---- | +| 0 | num | 位于分组 1 的分组 id | | +| n | num | 位于分组(n+1)的分组 id | | +| …… | num | …… | …… | `list`中的对象中的`official_verify`对象: @@ -429,18 +392,18 @@ curl -G 'https://api.bilibili.com/x/relation/followings' \ | ------------- | ---- | ------------ | ----------------------------------------------- | | vipType | num | 会员类型 | 0:无
1:月度大会员
2:年度以上大会员 | | vipDueDate | num | 会员到期时间 | 时间戳 毫秒 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | +| dueRemark | str | (?) | | +| accessStatus | num | (?) | | | vipStatus | num | 大会员状态 | 0:无
1:有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| themeType | num | 0 | 作用尚不明确 | -| label | obj | ??? | 作用尚不明确 | +| vipStatusWarn | str | (?) | | +| themeType | num | (?) | | +| label | obj | (?) | | `vip`中的`label`对象: -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---- | ------------ | -| path | str | 空 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ------ | ---- | +| path | str | (?) | | **示例:** @@ -448,9 +411,9 @@ curl -G 'https://api.bilibili.com/x/relation/followings' \ ```shell curl -G 'https://app.biliapi.net/x/v2/relation/followings' \ ---data-urlencode 'vmid=293793435' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ + --data-urlencode 'vmid=293793435' \ + --data-urlencode 'ps=2' \ + --data-urlencode 'pn=1' \ ```
@@ -521,181 +484,48 @@ curl -G 'https://app.biliapi.net/x/v2/relation/followings' \
-## 查询用户关注明细3 - - - -> https://line3-h5-mobile-api.biligame.com/game/center/h5/user/relationship/following_list - -*请求方式:GET* - -可获取用户所有关注列表,对于设置了可见性隐私的用户会返回空列表 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------ | ----------- | -------- | -| vmid | num | 目标用户mid | 必要 | | -| ps | num | 每页项数 | 非必要 | 默认为20 | -| pn | num | 页码 | 非必要 | 默认为1 | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ---- | ---------- | --------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 成功时无此项 | -| data | obj | 信息本体 | 失败时无此项 | -| ts | num | 当前时间戳 | 单位为毫秒 | -| request_id | str | 请求id | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ----- | -------- | ------------ | -| list | array | 明细列表 | | - -`data`中的`list`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------- | ---------------- | -| 0 | obj | 关注1 | | -| n | obj | 关注(n+1) | 按照关注顺序排列 | -| …… | obj | …… | …… | - -数组`list`中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ---- | ----------- | --------------------------------------- | -| mid | str | 用户mid | | -| attribute | num | 关注属性 | 0:未关注
2:已关注
6:已互粉 | -| uname | str | 用户昵称 | | -| face | str | 用户头像url | | - -**示例:** - -获取用户`mid=293793435`的关注明细 - -```shell -curl -G 'https://line3-h5-mobile-api.biligame.com/game/center/h5/user/relationship/following_list' \ ---data-urlencode 'vmid=293793435' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "data": { - "list": [{ - "mid": "14082", - "attribute": 2, - "uname": "山新", - "face": "https://i0.hdslb.com/bfs/face/74c82caee6d9eb623e56161ea8ed6d68afabfeae.jpg" - }, { - "mid": "420831218", - "attribute": 2, - "uname": "支付宝Alipay", - "face": "https://i2.hdslb.com/bfs/face/aaf18aeb2d9822e28a590bd8d878572ca8c59e04.jpg" - }] - }, - "ts": 1677410818395, - "request_id": "d9d541b9f2d24e21821e2d6d2d16c17d" -} -``` - -
- -## 搜索关注明细 - - +### 搜索关注明细 > https://api.bilibili.com/x/relation/followings/search *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | -------- | -| access_key | str | APP登录Token | APP方式必要 | | -| vmid | str | 目标用户mid | 必要 | | -| name | str | 搜索关键词 | 必要 | | -| ps | num | 每页项数 | 非必要 | 默认为50 | -| pn | num | 页码 | 非必要 | 默认为1 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | --------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| vmid | str | 目标用户 mid | 必要 | | +| name | str | 搜索关键词 | 非必要 | | +| ps | num | 每页项数 | 非必要 | 默认为 50 | +| pn | num | 页码 | 非必要 | 默认为 1 | + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ----------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
22007:访问超过 5 页 | +| message | str | 错误信息 | 默认为 0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | data 对象: -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ----- | -------- | ------------ | -| list | array | 明细列表 | | -| re_version | num | ??? | 作用尚不明确 | -| total | num | 关注总数 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ----- | -------- | ---- | +| list | array | 明细列表 | | +| re_version | num | (?) | | +| total | num | 关注总数 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------- | ---------------- | -| 0 | obj | 共同关注1 | | -| n | obj | 共同关注(n+1) | 按照关注顺序排列 | -| …… | obj | …… | …… | - -数组`list`中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ------------------------------------------- | ------------ | --------------------------------------- | -| mid | num | 用户mid | | -| attribute | num | 关注属性 | 0:未关注
2:已关注
6:已互粉 | -| mtime | num | 关注对方时间 | 时间戳
互关后刷新 | -| tag | 默认分组:null
存在至少一个分组:array | 分组id | | -| special | num | 特别关注标志 | 0:否
1:是 | -| uname | str | 用户昵称 | | -| face | str | 用户头像url | | -| sign | str | 用户签名 | | -| official_verify | obj | 认证信息 | | -| vip | obj | 会员信息 | | - -数组`list`中的对象中的`tag`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------------- | ---- | -| 0 | num | 位于分组1的分组id | | -| n | num | 位于分组(n+1)的分组id | | -| …… | num | …… | …… | - -`list`中的对象中的`official_verify`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------ | ------------------- | -| type | num | 用户认证类型 | -1:无
1:认证 | -| desc | str | 用户认证信息 | 无为空 | - -`list`中的对象中的`vip`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------------- | ---- | ------------ | ----------------------------------------------- | -| vipType | num | 会员类型 | 0:无
1:月度大会员
2:年度以上大会员 | -| vipDueDate | num | 会员到期时间 | 时间戳 毫秒 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | -| vipStatus | num | 大会员状态 | 0:无
1:有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| themeType | num | 0 | 作用尚不明确 | -| label | obj | ??? | 作用尚不明确 | - -`vip`中的`label`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---- | ------------ | -| path | str | 空 | 作用尚不明确 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | -------------------------------- | +| 0 | obj | 匹配项目 1 | 见 [关系列表对象](#关系列表对象) | +| n | obj | 匹配项目(n+1) | 按照添加顺序排列 | +| …… | obj | …… | …… | **示例:** @@ -703,17 +533,15 @@ data 对象: ```shell curl -G 'https://api.bilibili.com/x/relation/followings/search' \ ---data-urlencode 'vmid=293793435' \ ---data-urlencode 'name=warma' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ --b 'SESSDATA=xxx' + --data-urlencode 'vmid=293793435' \ + --data-urlencode 'name=warma' \ + --data-urlencode 'ps=2' \ + --data-urlencode 'pn=1' \ + -b 'SESSDATA=xxx' ```
查看响应示例: - - ```json { "code": 0, @@ -757,24 +585,22 @@ curl -G 'https://api.bilibili.com/x/relation/followings/search' \
-## 查询共同关注明细 - - +### 查询共同关注明细 > https://api.bilibili.com/x/relation/same/followings *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | -------- | -| access_key | str | APP登录Token | APP方式必要 | | -| vmid | num | 目标用户mid | 必要 | | -| ps | num | 每页项数 | 非必要 | 默认为50 | -| pn | num | 页码 | 非必要 | 默认为1 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | --------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| vmid | num | 目标用户 mid | 必要 | | +| ps | num | 每页项数 | 非必要 | 默认为 50 | +| pn | num | 页码 | 非必要 | 默认为 1 | **json回复:** @@ -783,74 +609,25 @@ curl -G 'https://api.bilibili.com/x/relation/followings/search' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------- | | code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | | data | obj | 信息本体 | | data 对象: -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ----- | -------- | ------------ | -| list | array | 明细列表 | | -| re_version | num | ??? | 作用尚不明确 | -| total | num | 关注总数 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ----- | -------- | ---- | +| list | array | 明细列表 | | +| re_version | num | (?) | | +| total | num | 关注总数 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------- | ---------------- | -| 0 | obj | 共同关注1 | | -| n | obj | 共同关注(n+1) | 按照关注顺序排列 | -| …… | obj | …… | …… | - -数组`list`中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ------------------------------------------- | ------------ | --------------------------------------- | -| mid | num | 用户mid | | -| attribute | num | 关注属性 | 0:未关注
2:已关注
6:已互粉 | -| mtime | num | 关注对方时间 | 时间戳
互关后刷新 | -| tag | 默认分组:null
存在至少一个分组:array | 分组id | | -| special | num | 特别关注标志 | 0:否
1:是 | -| uname | str | 用户昵称 | | -| face | str | 用户头像url | | -| sign | str | 用户签名 | | -| official_verify | obj | 认证信息 | | -| vip | obj | 会员信息 | | - -数组`list`中的对象中的`tag`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------------- | ---- | -| 0 | num | 位于分组1的分组id | | -| n | num | 位于分组(n+1)的分组id | | -| …… | num | …… | …… | - -`list`中的对象中的`official_verify`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------ | ------------------- | -| type | num | 用户认证类型 | -1:无
1:认证 | -| desc | str | 用户认证信息 | 无为空 | - -`list`中的对象中的`vip`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------------- | ---- | ------------ | ----------------------------------------------- | -| vipType | num | 会员类型 | 0:无
1:月度大会员
2:年度以上大会员 | -| vipDueDate | num | 会员到期时间 | 时间戳 毫秒 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | -| vipStatus | num | 大会员状态 | 0:无
1:有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| themeType | num | 0 | 作用尚不明确 | -| label | obj | ??? | 作用尚不明确 | - -`vip`中的`label`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---- | ------------ | -| path | str | 空 | 作用尚不明确 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | -------------------------------- | +| 0 | obj | 共同关注 1 | 见 [关系列表对象](#关系列表对象) | +| n | obj | 共同关注(n+1) | 按照添加顺序排列 | +| …… | obj | …… | …… | **示例:** @@ -937,23 +714,19 @@ curl -G 'https://api.bilibili.com/x/relation/same/followings' \
-## 查询悄悄关注明细 +### 查询悄悄关注明细 - - -> https://api.bilibili.com/x/relation/whispers +> https://api.bilibili.com/x/relation/whispers *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | -------- | -| access_key | str | APP登录Token | APP方式必要 | | -| ps | num | 每页项数 | 非必要 | 默认为50 | -| pn | num | 页码 | 非必要 | 默认为1 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | ---- | +| access_key | str | APP 登录 Token | APP 方式必要 | | **json回复:** @@ -968,83 +741,29 @@ curl -G 'https://api.bilibili.com/x/relation/same/followings' \ data 对象: -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ----- | -------- | ------------ | -| list | array | 明细列表 | | -| re_version | num | ??? | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ----- | -------- | ---- | +| list | array | 明细列表 | | +| re_version | num | (?) | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------- | ---------------- | -| 0 | obj | 关注1 | | -| n | obj | 关注(n+1) | 按照关注顺序排列 | -| …… | obj | …… | …… | - -数组`list`中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ------------------------------------------- | ------------ | --------------------------------------- | -| mid | num | 用户mid | | -| attribute | num | 关注属性 | 0:未关注
2:已关注
6:已互粉 | -| mtime | num | 关注对方时间 | 时间戳
互关后刷新 | -| tag | 默认分组:null
存在至少一个分组:array | 分组id | | -| special | num | 特别关注标志 | 0:否
1:是 | -| uname | str | 用户昵称 | | -| face | str | 用户头像url | | -| sign | str | 用户签名 | | -| official_verify | obj | 认证信息 | | -| vip | obj | 会员信息 | | - -数组`list`中的对象中的`tag`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------------- | ---- | -| 0 | num | 位于分组1的分组id | | -| n | num | 位于分组(n+1)的分组id | | -| …… | num | …… | …… | - -`list`中的对象中的`official_verify`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------ | ------------------- | -| type | num | 用户认证类型 | -1:无
1:认证 | -| desc | str | 用户认证信息 | 无为空 | - -`list`中的对象中的`vip`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------------- | ---- | ------------ | ----------------------------------------------- | -| vipType | num | 会员类型 | 0:无
1:月度大会员
2:年度以上大会员 | -| vipDueDate | num | 会员到期时间 | 时间戳 毫秒 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | -| vipStatus | num | 大会员状态 | 0:无
1:有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| themeType | num | 0 | 作用尚不明确 | -| label | obj | ??? | 作用尚不明确 | - -`vip`中的`label`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---- | ------------ | -| path | str | 空 | 作用尚不明确 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | -------------------------------- | +| 0 | obj | 悄悄关注 1 | 见 [关系列表对象](#关系列表对象) | +| n | obj | 悄悄关注(n+1) | 按照操作顺序排列 | +| …… | obj | …… | …… | **示例:** -获取悄悄关注明细 - ```shell curl -G 'https://api.bilibili.com/x/relation/whispers' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ --b 'SESSDATA=xxx' + -b 'SESSDATA=xxx' ```
查看响应示例: - ```json { "code": 0, @@ -1083,26 +802,23 @@ curl -G 'https://api.bilibili.com/x/relation/whispers' \ } } ``` -
-## 查询互相关注明细 - - +### 查询互相关注明细 > https://api.bilibili.com/x/relation/friends *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP 查询与自己互关的用户明细,可看全部 **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | -------- | -| access_key | str | APP登录Token | APP方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | ---- | +| access_key | str | APP 登录 Token | APP 方式必要 | | **json回复:** @@ -1117,81 +833,28 @@ curl -G 'https://api.bilibili.com/x/relation/whispers' \ data 对象: -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ----- | -------- | ------------ | -| list | array | 明细列表 | | -| re_version | num | ??? | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ----- | -------- | ---- | +| list | array | 明细列表 | | +| re_version | num | (?) | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------- | ---------------- | -| 0 | obj | 互关1 | | -| n | obj | 互关(n+1) | 按照关注顺序排列 | -| …… | obj | …… | …… | - -数组`list`中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ------------------------------------------- | ------------ | --------------------------------------- | -| mid | num | 用户mid | | -| attribute | num | 关注属性 | 6:已互粉 | -| mtime | num | 关注对方时间 | 时间戳
互关后刷新 | -| tag | 默认分组:null
存在至少一个分组:array | 分组id | | -| special | num | 特别关注标志 | 0:否
1:是 | -| uname | str | 用户昵称 | | -| face | str | 用户头像url | | -| sign | str | 用户签名 | | -| official_verify | obj | 认证信息 | | -| vip | obj | 会员信息 | | - -数组`list`中的对象中的`tag`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------------- | ---- | -| 0 | num | 位于分组1的分组id | | -| n | num | 位于分组(n+1)的分组id | | -| …… | num | …… | …… | - -`list`中的对象中的`official_verify`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------ | ------------------- | -| type | num | 用户认证类型 | -1:无
1:认证 | -| desc | str | 用户认证信息 | 无为空 | - -`list`中的对象中的`vip`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------------- | ---- | ------------ | ----------------------------------------------- | -| vipType | num | 会员类型 | 0:无
1:月度大会员
2:年度以上大会员 | -| vipDueDate | num | 会员到期时间 | 时间戳 毫秒 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | -| vipStatus | num | 大会员状态 | 0:无
1:有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| themeType | num | 0 | 作用尚不明确 | -| label | obj | ??? | 作用尚不明确 | - -`vip`中的`label`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---- | ------------ | -| path | str | 空 | 作用尚不明确 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | -------------------------------- | +| 0 | obj | 互关 1 | 见 [关系列表对象](#关系列表对象) | +| n | obj | 互关(n+1) | 按照添加顺序排列 | +| …… | obj | …… | …… | **示例:** -获取互相关注明细 - ```shell curl -G 'https://api.bilibili.com/x/relation/friends' \ --b 'SESSDATA=xxx' + -b 'SESSDATA=xxx' ```
查看响应示例: - - ```json { "code": 0, @@ -1200,44 +863,166 @@ curl -G 'https://api.bilibili.com/x/relation/friends' \ "data": { "list": [ { - "mid": 293793435, - "attribute": 6, - "mtime": 1583817598, - "tag": [-10], - "special": 1, - "uname": "社会易姐QwQ", - "face": "https://i0.hdslb.com/bfs/face/aebb2639a0d47f2ce1fec0631f412eaf53d4a0be.jpg", - "sign": "BAC项目负责人 | 带砖技术宅 | MC 编程 电子 | 车万众\u0026术术人 | 粉丝群1136462265 博客shakaianee.top", - "face_nft": 0, - "official_verify": { - "type": -1, - "desc": "" - }, - "vip": { - "vipType": 2, - "vipDueDate": 1675872000000, - "dueRemark": "", - "accessStatus" :0, - "vipStatus": 1, - "vipStatusWarn": "", - "themeType": 0, - "label": { - "path": "", - "text": "年度大会员", - "label_theme": "annual_vip", - "text_color": "#FFFFFF", - "bg_style": 1, - "bg_color": "#FB7299", - "border_color": "" + "mid": 596000, + "attribute": 6, + "mtime": 1685110154, + "tag": null, + "special": 0, + "uname": "椛椛在睡觉", + "face": "https://i2.hdslb.com/bfs/face/365c1ef3b2a3afe21d6832796338fad5119b2592.jpg", + "sign": "欢迎来找椛椛玩~ https://blogs.momiji-jin.com/", + "face_nft": 0, + "official_verify": { + "type": -1, + "desc": "" }, - "avatar_subscript": 1, - "nickname_color": "#FB7299", - "avatar_subscript_url": "" - }, - "nft_icon": "", - "rec_reason": "", - "track_id": "" - } + "vip": { + "vipType": 2, + "vipDueDate": 1702742400000, + "dueRemark": "", + "accessStatus": 0, + "vipStatus": 1, + "vipStatusWarn": "", + "themeType": 0, + "label": { + "path": "", + "text": "年度大会员", + "label_theme": "annual_vip", + "text_color": "#FFFFFF", + "bg_style": 1, + "bg_color": "#FB7299", + "border_color": "" + }, + "avatar_subscript": 1, + "nickname_color": "#FB7299", + "avatar_subscript_url": "" + }, + "nft_icon": "", + "rec_reason": "", + "track_id": "" + }, + { + "mid": 24022863, + "attribute": 6, + "mtime": 1685026230, + "tag": [ + -10 + ], + "special": 1, + "uname": "黄禄轩电脑专用账号", + "face": "https://i0.hdslb.com/bfs/face/a70ec7d2a3822980a915ef4b30371af0cbc79132.jpg", + "sign": "若要私信,请私信「黄禄轩手机专用账号」http://space.bilibili.com/17640193/,群:410311648", + "face_nft": 0, + "official_verify": { + "type": -1, + "desc": "" + }, + "vip": { + "vipType": 2, + "vipDueDate": 1686412800000, + "dueRemark": "", + "accessStatus": 0, + "vipStatus": 1, + "vipStatusWarn": "", + "themeType": 0, + "label": { + "path": "", + "text": "年度大会员", + "label_theme": "annual_vip", + "text_color": "#FFFFFF", + "bg_style": 1, + "bg_color": "#FB7299", + "border_color": "" + }, + "avatar_subscript": 1, + "nickname_color": "#FB7299", + "avatar_subscript_url": "" + }, + "nft_icon": "", + "rec_reason": "", + "track_id": "" + }, + { + "mid": 85438718, + "attribute": 6, + "mtime": 1684759843, + "tag": [ + 194110 + ], + "special": 0, + "uname": "忘忧北萱草Official", + "face": "https://i2.hdslb.com/bfs/face/68d8cba01aab907dbb2cf2e17074f20947156237.jpg", + "sign": "现已加入 OrangeFire 豪华套餐!", + "face_nft": 0, + "official_verify": { + "type": -1, + "desc": "" + }, + "vip": { + "vipType": 2, + "vipDueDate": 1691683200000, + "dueRemark": "", + "accessStatus": 0, + "vipStatus": 1, + "vipStatusWarn": "", + "themeType": 0, + "label": { + "path": "", + "text": "年度大会员", + "label_theme": "annual_vip", + "text_color": "#FFFFFF", + "bg_style": 1, + "bg_color": "#FB7299", + "border_color": "" + }, + "avatar_subscript": 1, + "nickname_color": "#FB7299", + "avatar_subscript_url": "" + }, + "nft_icon": "", + "rec_reason": "", + "track_id": "" + }, + { + "mid": 41620134, + "attribute": 6, + "mtime": 1684759649, + "tag": null, + "special": 0, + "uname": "Tiggy_Chan", + "face": "https://i0.hdslb.com/bfs/face/8c8d9f43eda207f8cb8503bfdf6cc3802a1cd6c1.jpg", + "sign": "此号只发科技类视频,娱乐类转至:虎子酱233", + "face_nft": 0, + "official_verify": { + "type": -1, + "desc": "" + }, + "vip": { + "vipType": 1, + "vipDueDate": 1669219200000, + "dueRemark": "", + "accessStatus": 0, + "vipStatus": 0, + "vipStatusWarn": "", + "themeType": 0, + "label": { + "path": "", + "text": "", + "label_theme": "", + "text_color": "", + "bg_style": 0, + "bg_color": "", + "border_color": "" + }, + "avatar_subscript": 0, + "nickname_color": "", + "avatar_subscript_url": "" + }, + "nft_icon": "", + "rec_reason": "", + "track_id": "" + }, + …… ], "re_version": 0 } @@ -1246,21 +1031,21 @@ curl -G 'https://api.bilibili.com/x/relation/friends' \
-## 查询黑名单明细 +### 查询黑名单明细 > https://api.bilibili.com/x/relation/blacks *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | -------- | -| access_key | str | APP登录Token | APP方式必要 | | -| ps | num | 每页项数 | 非必要 | 默认为50 | -| pn | num | 页码 | 非必要 | 默认为1 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | --------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| ps | num | 每页项数 | 非必要 | 默认为 50 | +| pn | num | 页码 | 非必要 | 默认为 1 | **json回复:** @@ -1269,66 +1054,25 @@ curl -G 'https://api.bilibili.com/x/relation/friends' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------- | | code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | | data | obj | 信息本体 | | data 对象: -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ----- | ------------ | ------------ | -| list | array | 明细列表 | | -| re_version | num | ??? | 作用尚不明确 | -| total | num | 黑名单总计数 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ----- | ------------ | ---- | +| list | array | 明细列表 | | +| re_version | num | (?) | | +| total | num | 黑名单总计数 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------- | ---------------- | -| 0 | obj | 关注1 | | -| n | obj | 关注(n+1) | 按照关注顺序排列 | -| …… | obj | …… | …… | - -数组`list`中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ---- | ------------ | ---------------------- | -| mid | num | 用户mid | | -| attribute | num | 关注属性 | 128:已拉黑 | -| mtime | num | 关注对方时间 | 时间戳
互关后刷新 | -| tag | null | | | -| special | num | 0 | | -| uname | str | 用户昵称 | | -| face | str | 用户头像url | | -| sign | str | 用户签名 | | -| official_verify | obj | 认证信息 | | -| vip | obj | 会员信息 | | - -`list`中的对象中的`official_verify`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------ | ------------------- | -| type | num | 用户认证类型 | -1:无
1:认证 | -| desc | str | 用户认证信息 | 无为空 | - -`list`中的对象中的`vip`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------------- | ---- | ------------ | ----------------------------------------------- | -| vipType | num | 会员类型 | 0:无
1:月度大会员
2:年度以上大会员 | -| vipDueDate | num | 会员到期时间 | 时间戳 毫秒 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | -| vipStatus | num | 大会员状态 | 0:无
1:有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| themeType | num | 0 | 作用尚不明确 | -| label | obj | ??? | 作用尚不明确 | - -`vip`中的`label`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---- | ------------ | -| path | str | 空 | 作用尚不明确 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------------- | -------------------------------- | +| 0 | obj | 黑名单 1 | 见 [关系列表对象](#关系列表对象) | +| n | obj | 黑名单 (n+1) | 按照添加顺序排列 | +| …… | obj | …… | …… | **示例:** @@ -1336,15 +1080,13 @@ data 对象: ```shell curl -G 'https://api.bilibili.com/x/relation/blacks' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ --b 'SESSDATA=xxx' + --data-urlencode 'ps=2' \ + --data-urlencode 'pn=1' \ + -b 'SESSDATA=xxx' ```
查看响应示例: - - ```json { "code": 0, @@ -1413,25 +1155,27 @@ curl -G 'https://api.bilibili.com/x/relation/blacks' \
-## 操作用户关系 +## 操作关系 +### 操作用户关系 + > https://api.bilibili.com/x/relation/modify *请求方式:POST* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP -**正文参数( application/x-www-form-urlencoded ):** +**正文参数(application/x-www-form-urlencoded):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ---------------------- | -------------- | -------------------------------------------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| fid | num | 目标用户mid | 必要 | | -| act | num | 操作代码 | 必要 | **操作代码见下表** | -| re_src | num | 关注来源代码 | 必要 | 空间:11
视频:14
文章:115
活动页面:222 | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | ------------------------- | --------------- | -------------------------------------------------------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| fid | num | 目标用户mid | 必要 | | +| act | num | 操作代码 | 必要 | **操作代码见下表** | +| re_src | num | 关注来源代码 | 必要 | 空间:11
视频:14
文章:115
活动页面:222 | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | 操作代码`act`: @@ -1461,11 +1205,11 @@ curl -G 'https://api.bilibili.com/x/relation/blacks' \ ```shell curl 'https://api.bilibili.com/x/relation/modify' \ ---data-urlencode 'fid=14082' \ ---data-urlencode 'act=1' \ ---data-urlencode 're_src=11' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'fid=14082' \ + --data-urlencode 'act=1' \ + --data-urlencode 're_src=11' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
@@ -1481,25 +1225,25 @@ curl 'https://api.bilibili.com/x/relation/modify' \
-## 批量操作用户关系 +### 批量操作用户关系 > https://api.bilibili.com/x/relation/batch/modify *请求方式:POST* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP 此接口只支持关注和拉黑操作 -**正文参数( application/x-www-form-urlencoded ):** +**正文参数(application/x-www-form-urlencoded):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ---------------------- | -------------- | ---------------------------------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| fids | nums | 目标用户mid | 必要 | 每个之间用`,`间隔 | -| act | num | 操作代码 | 必要 | 同上
仅可为1或5,故只能进行批量关注和拉黑 | -| re_src | num | 关注来源代码 | 必要 | 同上 | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | ------------------------- | --------------- | ------------------------------------------------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| fids | nums | 目标用户 mid 列表 | 必要 | 每个之间用`,`间隔 | +| act | num | 操作代码 | 必要 | 同上
仅可为 1 或 5,故只能进行批量关注和拉黑 | +| re_src | num | 关注来源代码 | 必要 | 同上 | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | **json回复:** @@ -1514,17 +1258,17 @@ curl 'https://api.bilibili.com/x/relation/modify' \ `data`对象: -| 字段 | 类型 | 内容 | 备注 | -| ----------- | ----- | ------------- | ---- | -| failed_fids | array | 操作失败的mid | | +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ----- | ------------------- | ---- | +| failed_fids | array | 操作失败的 mid 列表 | | `data`中的`failed_fids`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------------ | ---- | -| 0 | num | 操作失败的mid 1 | | -| n | num | 操作失败的mid(n+1) | | -| …… | num | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------------- | ---- | +| 0 | num | 操作失败的 mid 1 | | +| n | num | 操作失败的 mid(n+1) | | +| …… | num | …… | …… | **示例:** @@ -1532,11 +1276,11 @@ curl 'https://api.bilibili.com/x/relation/modify' \ ```shell curl 'https://api.bilibili.com/x/relation/batch/modify' \ ---data-urlencode 'fid=1,2,3,4,5' \ ---data-urlencode 'act=1' \ ---data-urlencode 're_src=11' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'fid=1,2,3,4,5' \ + --data-urlencode 'act=1' \ + --data-urlencode 're_src=11' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
@@ -1555,20 +1299,40 @@ curl 'https://api.bilibili.com/x/relation/batch/modify' \
-## 查询用户与自己关系_仅查关注 +## 查询关系属性 + +### 关系属性对象 + +| 字段 | 类型 | 内容 | 备注 | +| --------- | --------------------------------------- | ------------ | -------------------------------------------------------- | +| mid | num | 目标用户 mid | | +| attribute | num | 关系属性 | 0:未关注
2:已关注
6:已互粉
128:已拉黑 | +| mtime | num | 关注对方时间 | 时间戳
未关注为 0 | +| tag | null默认分组
array存在至少一个分组 | 分组 id | | +| special | num | 特别关注标志 | 0:否
1:是 | + +`tag`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------------- | ---- | +| 0 | num | 位于分组 1 的分组 | | +| n | num | 位于分组(n+1)的分组 | | +| …… | num | …… | …… | + +### 查询用户与自己关系(仅关注) > https://api.bilibili.com/x/relation *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | ---- | -| access_key | str | APP登录Token | APP方式必要 | | -| fid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | ---- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| fid | num | 目标用户 mid | 必要 | | **json回复:** @@ -1579,34 +1343,16 @@ curl 'https://api.bilibili.com/x/relation/batch/modify' \ | code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误 | | message | str | 错误信息 | 默认为0 | | ttl | num | 1 | | -| data | obj | 信息本体 | | +| data | obj | 信息本体 | 详见 [关系属性对象](#关系属性对象) | -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------- | ---------------------------------------- | ------------ | --------------------------------------- | -| mid | num | 目标用户mid | | -| attribute | num | 关注属性 | 0:未关注
2:已关注
6:已互粉
128:拉黑 | -| mtime | num | 关注对方时间 | 时间戳
未关注为0 | -| tag | null默认分组
array存在至少一个分组 | 分组id | | -| special | num | 特别关注标志 | 0:否
1:是 | - -`tag`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ----------------------- | ---- | -| 0 | num | 位于分组1的分组 | | -| n | num | 位于分组(n+1)的分组 | | -| …… | num | …… | …… | - -**示例:** +`data`对象:**示例:** 可得对于`mid=258150656`的用户,在`2018/10/28 0:51:41`时关注,且设为特别关注,并位于为`-10`分组中 ```shell curl -G 'https://api.bilibili.com/x/relation' \ ---data-urlencode 'fid=258150656' \ --b 'SESSDATA=xxx' + --data-urlencode 'fid=258150656' \ + -b 'SESSDATA=xxx' ```
@@ -1629,20 +1375,26 @@ curl -G 'https://api.bilibili.com/x/relation' \
-## 查询用户与自己关系_互相 +### 查询用户与自己关系(互相关系) -> https://api.bilibili.com/x/space/acc/relation +> https://api.bilibili.com/x/space/wbi/acc/relation *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP + +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + +~~该接口的旧版 API :https://api.bilibili.com/x/space/acc/relation~~(已废弃,不建议使用) **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | ---- | -| access_key | str | APP登录Token | APP方式必要 | | -| mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | ------------ | ----------- | ------------------------------------ | +| access_key | str | APP登录Token | APP方式必要 | | +| mid | num | 目标用户mid | 必要 | | +| w_rid | str | Wbi 签名 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) | +| wts | num | 当前时间戳 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) | **json回复:** @@ -1657,47 +1409,23 @@ curl -G 'https://api.bilibili.com/x/relation' \ `data`对象: -| 字段 | 类型 | 内容 | 备注 | -| ----------- | ---- | ------------------------ | ---- | -| relation | obj | 目标用户对于本用户的属性 | | -| be_relation | obj | 本用户对于目标用户的属性 | | - -`data`中的`relation`对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------- | ---------------------------------------- | ------------ | -------------- | -| mid | num | 对方用户mid | | -| attribute | num | 关注属性 | 0:未关注
1:悄悄关注
2:已关注
6:已互粉
128:拉黑 | -| mtime | num | 关注对方时间 | 互关后刷新时间 | -| tag | null默认分组
array存在至少一个分组 | 分组id | | -| special | num | 特别关注标志 | 0:否
1:是 | - -`data`中的`be_relation`对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------- | ---------------------------------------- | ------------ | -------------- | -| mid | num | 自己的mid | | -| attribute | num | 关注属性 | 0:未关注
1:悄悄关注
2:已关注
6:已互粉
128:拉黑 | -| mtime | num | 成为粉丝时间 | 互关后刷新时间 | -| tag | null默认分组
array存在至少一个分组 | 分组id | | -| special | num | 特别关注标志 | 0:否
1:是 | - -`be_relation`与`relation`中的`tag`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------------- | ---- | -| 0 | num | 位于分组1的分组id | | -| n | num | 位于分组(n+1)的分组id | | -| …… | num | …… | …… | +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | -------------------------- | ---------------------------------- | +| relation | obj | 目标用户对于当前用户的关系 | 详见 [关系属性对象](#关系属性对象) | +| be_relation | obj | 当前用户对于目标用户的关系 | 详见 [关系属性对象](#关系属性对象) | **示例:** -可得对于`mid=15858903`的用户,在`2019/1/24 14:24:19`时关注了对方,且互相关注,自己将对方特别关注,并同时位于为`-10`和`194110`的分组中,对方也将自己设为特别关注,并同时位于为`-10`和`56502`的分组中(虽然我看不到) +可得对于`mid=15858903`的用户,在`2019/1/24 14:24:19`时关注了对方,且互相关注,自己将对方特别关注,并同时位于为`-10`和`194110`的分组中,对方也将自己设为特别关注,并同时位于为`-10`和`56502`的分组中(虽然我看不到) + +Wbi 签名的 `wts`、`w_rid`生成方式详见 [Wbi 签名](../misc/sign/wbi.md) 文档 ```shell curl -G 'https://api.bilibili.com/x/space/acc/relation' \ ---data-urlencode 'mid=15858903' \ --b 'SESSDATA=xxx' + --data-urlencode 'mid=15858903' \ + --data-urlencode 'wts=1686015899' \ + --data-urlencode 'w_rid=e10a3c566c9be80a7cebe7bcdf262588' \ + -b 'SESSDATA=xxx' ```
@@ -1705,46 +1433,51 @@ curl -G 'https://api.bilibili.com/x/space/acc/relation' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "relation": { - "mid": 15858903, - "attribute": 6, - "mtime": 1548311059, - "tag": [-10, 194110], - "special": 1, - "is_followed": false - }, - "be_relation": { - "mid": 293793435, - "attribute": 6, - "mtime": 1548311059, - "tag": [56502, -10], - "special": 1, - "is_followed": false - } - } + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "relation": { + "mid": 15858903, + "attribute": 6, + "mtime": 1548311059, + "tag": [ + -10, + 194110, + 248468 + ], + "special": 1 + }, + "be_relation": { + "mid": 293793435, + "attribute": 6, + "mtime": 1548311059, + "tag": [ + 56502, + -10 + ], + "special": 1 + } + } } ```
-## 批量查询用户与自己关系 +### 批量查询用户与自己关系 > https://api.bilibili.com/x/relation/relations *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP **url参数:** | 参数名 | 类型 | 内容 | 必要性 | 备注 | | ---------- | ---- | ------------ | ----------- | ------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| fids | nums | 目标用户mid | 必要 | 每个之间用`,`间隔 | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| fids | nums | 目标用户 mid | 必要 | 每个之间用`,`间隔 | **json回复:** @@ -1759,28 +1492,10 @@ curl -G 'https://api.bilibili.com/x/space/acc/relation' \ `data`对象: -| 字段 | 类型 | 内容 | 备注 | -| --------- | ---- | ---------- | ---- | -| {用户mid} | obj | 关注的用户 | 下同 | -| …… | obj | …… | | - -`{用户mid}`对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------- | --------------------------------------- | ------------ | ------------------------------------------------------------ | -| mid | num | 目标用户mid | | -| attribute | num | 关注属性 | 0:未关注
1:悄悄关注
2:已关注
6:已互粉
128:拉黑 | -| mtime | num | 关注对方时间 | 时间戳
未关注为0 | -| tag | null默认分组
array存在至少一个分组 | 分组id | | -| special | num | 特别关注标志 | 0:否
1:是 | - -`tag`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------------- | ---- | -| 0 | num | 位于分组1的分组id | | -| n | num | 位于分组(n+1)的分组id | | -| …… | num | …… | …… | +| 字段 | 类型 | 内容 | 备注 | +| --------- | ---- | ---------- | ---------------------------------- | +| {用户mid} | obj | 关注的用户 | 详见 [关系属性对象](#关系属性对象) | +| …… | obj | …… | 下同 | **示例:** @@ -1823,19 +1538,26 @@ curl -G 'https://api.bilibili.com/x/relation/relations' \ ## 关注分组相关 +分组 id 特殊值: + +| id | 含义 | +| ---- | -------- | +| 0 | 默认分组 | +| -10 | 特别关心 | + ### 查询关注分组列表 > https://api.bilibili.com/x/relation/tags *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | ---- | -| access_key | str | APP登录Token | APP方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | ---- | +| access_key | str | APP 登录 Token | APP 方式必要 | | **json回复:** @@ -1844,26 +1566,26 @@ curl -G 'https://api.bilibili.com/x/relation/relations' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ------ | -------- | ----------------------------- | | code | num | 返回值 | 0:成功
-101:账号未登录 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | | data | array | 分组列表 | | `data`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------ | ---- | -| 0 | obj | 特别关注分组 | | -| 1 | obj | 默认分组 | | -| n | obj | 其他分组 | | -| …… | num | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | ---- | +| 1 | obj | 分组 1 | | +| n | obj | 分组(n+1) | | +| …… | num | …… | …… | 数组`data`中的对象: -| 字段 | 类型 | 内容 | 备注 | -| ----- | ---- | ---------- | ---------------------------------- | -| tagid | num | 分组id | 特别关注恒为-10
默认分组恒为0 | -| name | str | 分组名称 | | -| count | num | 分组成员数 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | ---------- | ---- | +| tagid | num | 分组 id | | +| name | str | 分组名称 | | +| count | num | 分组成员数 | | +| tip | str | 提示信息 | | **示例:** @@ -1871,7 +1593,7 @@ curl -G 'https://api.bilibili.com/x/relation/relations' \ ```shell curl 'https://api.bilibili.com/x/relation/tags' \ --b 'SESSDATA=xxx' + -b 'SESSDATA=xxx' ```
@@ -1882,19 +1604,31 @@ curl 'https://api.bilibili.com/x/relation/tags' \ "code": 0, "message": "0", "ttl": 1, - "data": [{ - "tagid": -10, - "name": "特别关注", - "count": 16 - }, { - "tagid": 0, - "name": "默认分组", - "count": 536 - },{ - "tagid": 194111, - "name": "我的同学", - "count": 16 - }, + "data": [ + { + "tagid": -10, + "name": "特别关注", + "count": 19, + "tip": "第一时间收到该分组下用户更新稿件的通知" + }, + { + "tagid": 0, + "name": "默认分组", + "count": 340, + "tip": "" + }, + { + "tagid": 194110, + "name": "基友们", + "count": 127, + "tip": "" + }, + { + "tagid": 194111, + "name": "我的同学", + "count": 22, + "tip": "" + }, ………… ] } @@ -1908,17 +1642,19 @@ curl 'https://api.bilibili.com/x/relation/tags' \ *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP + +只可查询属于自己的分组 **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | ------------------------------------------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| tagid | num | 分组id | 必要 | 特别关注恒为-10
默认分组恒为0 | -| order_type | str | 排序方式 | 非必要 | 按照关注顺序排列:留空
按照最常访问排列:attention | -| ps | num | 每页项数 | 非必要 | 默认为50 | -| pn | num | 页数 | 非必要 | 默认为1 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | ------------------------------------------------------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| tagid | num | 分组 id | 必要 | | +| order_type | str | 排序方式 | 非必要 | 按照关注顺序排列:留空
按照最常访问排列:attention | +| ps | num | 每页项数 | 非必要 | 默认为 50 | +| pn | num | 页数 | 非必要 | 默认为1 | **json回复:** @@ -1927,54 +1663,17 @@ curl 'https://api.bilibili.com/x/relation/tags' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ------ | -------- | ------------------------------------------------------------ | | code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误
22104:该分组不存在 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | | data | array | 成员列表 | | `data`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------- | ---------------- | -| 0 | obj | 成员信息1 | | -| n | obj | 成员信息(n+1) | 按照添加顺序排序 | -| …… | obj | …… | …… | - -数组`data`中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ---- | ----------- | ---- | -| mid | num | 用户mid | | -| uname | str | 用户昵称 | | -| face | str | 用户头像url | | -| sign | str | 用户签名 | | -| official_verify | obj | 认证信息 | | -| vip | obj | 会员信息 | | - -数组`data`中的对象中的`official_verify`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------ | ------------------- | -| type | num | 用户认证类型 | -1:无
1:认证 | -| desc | str | 用户认证信息 | 无为空 | - -数组`data`中的对象中的`vip`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------------- | ---- | ------------ | ----------------------------------- | -| vipType | num | 大会员类型 | 0:无
1:月会员
2:年会员 | -| vipDueDate | num | 会员到期时间 | 毫秒 时间戳 | -| dueRemark | str | 空 | 作用尚不明确 | -| accessStatus | num | 0 | 作用尚不明确 | -| vipStatus | num | 大会员状态 | 0无
1有 | -| vipStatusWarn | str | 空 | 作用尚不明确 | -| themeType | num | 0 | 作用尚不明确 | -| label | obj | ??? | 作用尚不明确 | - -数组`data`中的对象中的`label`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---- | ------------ | -| path | str | 空 | 作用尚不明确 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | -------------------------------- | +| 0 | obj | 成员信息 1 | 见 [关系列表对象](#关系列表对象) | +| n | obj | 成员信息(n+1) | 按照添加顺序排序 | +| …… | obj | …… | …… | **示例:** @@ -1982,11 +1681,11 @@ curl 'https://api.bilibili.com/x/relation/tags' \ ```shell curl -G 'https://api.bilibili.com/x/relation/tag' \ ---data-urlencode 'tagid=207542' \ ---data-urlencode 'order_type=' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ --b 'SESSDATA=xxx' + --data-urlencode 'tagid=207542' \ + --data-urlencode 'order_type=' \ + --data-urlencode 'ps=2' \ + --data-urlencode 'pn=1' \ + -b 'SESSDATA=xxx' ```
@@ -2051,14 +1750,14 @@ curl -G 'https://api.bilibili.com/x/relation/tag' \ *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | ---- | -| access_key | str | APP登录Token | APP方式必要 | | -| fid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | ---- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| fid | num | 目标用户 mid | 必要 | | **json回复:** @@ -2067,7 +1766,7 @@ curl -G 'https://api.bilibili.com/x/relation/tag' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------- | | code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | | data | obj | 信息本体 | | @@ -2075,9 +1774,8 @@ curl -G 'https://api.bilibili.com/x/relation/tag' \ | 字段 | 类型 | 内容 | 备注 | | ------------------- | ---- | --------- | ---- | -| {加入的分组id 1} | str | 分组1名称 | | -| {加入的分组id n} | str | 分组n名称 | | -| …… | str | …… | | +| {加入的分组 id} | str | 分组名称 | 若目标用户存在默认分组中,则不显示 | +| …… | str | …… | 下同 | **示例:** @@ -2085,8 +1783,8 @@ curl -G 'https://api.bilibili.com/x/relation/tag' \ ```shell curl -G 'https://api.bilibili.com/x/relation/tag/user' \ ---data-urlencode 'fid=319214221' \ --b 'SESSDATA=xxx' + --data-urlencode 'fid=319214221' \ + -b 'SESSDATA=xxx' ```
@@ -2106,19 +1804,19 @@ curl -G 'https://api.bilibili.com/x/relation/tag/user' \
-### 查询所有特别关注的mid +### 查询所有特别关注 mid > https://api.bilibili.com/x/relation/tag/special *请求方式:GET* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ------------ | ----------- | ---- | -| access_key | str | APP登录Token | APP方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | -------------- | ------------ | ---- | +| access_key | str | APP 登录 Token | APP 方式必要 | | **json回复:** @@ -2127,23 +1825,23 @@ curl -G 'https://api.bilibili.com/x/relation/tag/user' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ----- | -------- | ----------------------------- | | code | num | 返回值 | 0:成功
-101:账号未登录 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | | data | array | 成员列表 | | `data`数组: -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------ | ---- | -| 0 | num | 成员1mid | | -| n | num | 成员(n+1)mid | | -| …… | num | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------------- | ---- | +| 0 | num | 成员 1 mid | | +| n | num | 成员(n+1)mid | | +| …… | num | …… | …… | **示例:** ```shell curl 'https://api.bilibili.com/x/relation/tag/special' \ --b 'SESSDATA=xxx' + -b 'SESSDATA=xxx' ```
@@ -2187,15 +1885,15 @@ curl 'https://api.bilibili.com/x/relation/tag/special' \ *请求方式:POST* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP -**正文参数( application/x-www-form-urlencoded ):** +**正文参数(application/x-www-form-urlencoded):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ---------------------- | -------------- | ---------- | -| access_key | str | APP登录Token | APP方式必要 | | -| tag | str | 分组名 | 必要 | 最长16字符 | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | ------------------------- | --------------- | ------------- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| tag | str | 分组名 | 必要 | 最长 16 字符 | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | **json回复:** @@ -2204,15 +1902,15 @@ curl 'https://api.bilibili.com/x/relation/tag/special' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------------------ | | code | num | 返回值 | 0:成功
-111:csrf校验失败
-101:账号未登录
-400:请求错误
22106:该分组已经存在
22103:分组名过长 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | | data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -| ----- | ---- | -------------- | ---- | -| tagid | num | 创建的分组的id | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | --------------- | ---- | +| tagid | num | 创建的分组的 id | | **示例:** @@ -2220,9 +1918,9 @@ curl 'https://api.bilibili.com/x/relation/tag/special' \ ```shell curl 'https://api.bilibili.com/x/relation/tag/create' \ ---data-urlencode 'tag=测试' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'tag=测试' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
@@ -2247,16 +1945,16 @@ curl 'https://api.bilibili.com/x/relation/tag/create' \ *请求方式:POST* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP -**正文参数( application/x-www-form-urlencoded ):** +**正文参数(application/x-www-form-urlencoded):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ---------------------- | -------------- | ---------- | -| access_key | str | APP登录Token | APP方式必要 | | -| tagid | num | 分组id | 必要 | | -| name | str | 新名称 | 必要 | 最长16字符 | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | ------------------------- | --------------- | ------------ | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| tagid | num | 分组 id | 必要 | | +| name | str | 新名称 | 必要 | 最长 16 字符 | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | **json回复:** @@ -2265,7 +1963,7 @@ curl 'https://api.bilibili.com/x/relation/tag/create' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------------------ | | code | num | 返回值 | 0:成功
-111:csrf校验失败
-101:账号未登录
-400:请求错误
22103:分组名过长
22104:该分组不存在 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | **示例:** @@ -2274,10 +1972,10 @@ curl 'https://api.bilibili.com/x/relation/tag/create' \ ```shell curl 'https://api.bilibili.com/x/relation/tag/update' \ ---data-urlencode 'tagid=194112' \ ---data-urlencode 'name=膜法师' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'tagid=194112' \ + --data-urlencode 'name=膜法师' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
@@ -2301,15 +1999,15 @@ curl 'https://api.bilibili.com/x/relation/tag/update' \ *请求方式:POST* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP -**正文参数( application/x-www-form-urlencoded ):** +**正文参数(application/x-www-form-urlencoded):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ---------- | ---- | ---------------------- | -------------- | ---- | -| access_key | str | APP登录Token | APP方式必要 | | -| tagid | num | 分组id | 必要 | | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ---------- | ---- | ------------------------- | --------------- | ---- | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| tagid | num | 分组 id | 必要 | | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | **json回复:** @@ -2318,7 +2016,7 @@ curl 'https://api.bilibili.com/x/relation/tag/update' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------------------ | | code | num | 返回值 | 0:成功
-111:csrf校验失败
-101:账号未登录
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | 示例: @@ -2327,9 +2025,9 @@ curl 'https://api.bilibili.com/x/relation/tag/update' \ ```shell curl 'https://api.bilibili.com/x/relation/tag/del' \ ---data-urlencode 'tagid=216699' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'tagid=216699' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
@@ -2353,18 +2051,18 @@ curl 'https://api.bilibili.com/x/relation/tag/del' \ *请求方式:POST* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP -如需删除分组中的成员,请将`tagids`设为0,即移动至默认分组,而不是取关 +如需删除分组中的成员,请将`tagids`设为 0,即移动至默认分组,而不是取关 -**正文参数( application/x-www-form-urlencoded ):** +**正文参数(application/x-www-form-urlencoded):** | 参数名 | 类型 | 内容 | 必要性 | 备注 | | ---------- | ---- | ------------------------ | -------------- | ------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| fids | nums | 目标用户mid | 必要 | 每个之间用`,`间隔 | -| tagids | nums | 分组id | 必要 | 每个之间用`,`间隔 | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| fids | nums | 目标用户 mid 列表 | 必要 | 每个之间用`,`间隔 | +| tagids | nums | 分组 id 列表 | 必要 | 每个之间用`,`间隔 | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | **json回复:** @@ -2373,7 +2071,7 @@ curl 'https://api.bilibili.com/x/relation/tag/del' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------------------ | | code | num | 返回值 | 0:成功
-111:csrf校验失败
-101:账号未登录
-400:请求错误
22104:无权限
22105:未关注 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | **示例:** @@ -2382,10 +2080,10 @@ curl 'https://api.bilibili.com/x/relation/tag/del' \ ```shell curl 'https://api.bilibili.com/x/relation/tags/addUsers' \ ---data-urlencode 'fids=205631797' \ ---data-urlencode 'tagids=-10,207542' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'fids=205631797' \ + --data-urlencode 'tagids=-10,207542' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
@@ -2407,16 +2105,16 @@ curl 'https://api.bilibili.com/x/relation/tags/addUsers' \ *请求方式:POST* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP -**正文参数( application/x-www-form-urlencoded ):** +**正文参数(application/x-www-form-urlencoded):** | 参数名 | 类型 | 内容 | 必要性 | 备注 | | ---------- | ---- | ------------------------ | -------------- | ------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| fids | nums | 待复制的用户mid | 必要 | 每个之间用`,`间隔 | -| tagids | nums | 目标分组id | 必要 | 每个之间用`,`间隔 | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| fids | nums | 待复制的用户 mid 列表 | 必要 | 每个之间用`,`间隔 | +| tagids | nums | 目标分组 id 列表 | 必要 | 每个之间用`,`间隔 | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | **json回复:** @@ -2425,7 +2123,7 @@ curl 'https://api.bilibili.com/x/relation/tags/addUsers' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------------------ | | code | num | 返回值 | 0:成功
-111:csrf校验失败
-101:账号未登录
-400:请求错误
22104:无权限
22105:未关注 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | **示例:** @@ -2434,10 +2132,10 @@ curl 'https://api.bilibili.com/x/relation/tags/addUsers' \ ```shell curl 'https://api.bilibili.com/x/relation/tags/copyUsers' \ ---data-urlencode 'fids=4856007,326499679' \ ---data-urlencode 'tagids=231305' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'fids=4856007,326499679' \ + --data-urlencode 'tagids=231305' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
@@ -2459,17 +2157,17 @@ curl 'https://api.bilibili.com/x/relation/tags/copyUsers' \ *请求方式:POST* -认证方式:Cookie(SESSDATA)或APP +认证方式:Cookie(SESSDATA)或 APP -**正文参数( application/x-www-form-urlencoded ):** +**正文参数(application/x-www-form-urlencoded):** | 参数名 | 类型 | 内容 | 必要性 | 备注 | | ------------ | ---- | ------------------------ | -------------- | ------------------- | -| access_key | str | APP登录Token | APP方式必要 | | -| beforeTagids | nums | 原分组id | 必要 | 每个之间用`,`间隔 | -| afterTagids | nums | 新分组id | 必要 | 每个之间用`,`间隔 | -| fids | nums | 待移动的用户mid | 必要 | 每个之间用`,`间隔 | -| csrf | str | CSRF Token(位于cookie) | Cookie方式必要 | | +| access_key | str | APP 登录 Token | APP 方式必要 | | +| beforeTagids | nums | 原分组 id 列表 | 必要 | 每个之间用`,`间隔 | +| afterTagids | nums | 新分组 id 列表 | 必要 | 每个之间用`,`间隔 | +| fids | nums | 待移动的用户 mid 列表 | 必要 | 每个之间用`,`间隔 | +| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | | **json回复:** @@ -2478,7 +2176,7 @@ curl 'https://api.bilibili.com/x/relation/tags/copyUsers' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ------------------------------------------------------------ | | code | num | 返回值 | 0:成功
-111:csrf校验失败
-101:账号未登录
-400:请求错误
22104:无权限
22105:未关注 | -| message | str | 错误信息 | 默认为0 | +| message | str | 错误信息 | 默认为 0 | | ttl | num | 1 | | **示例:** @@ -2487,11 +2185,11 @@ curl 'https://api.bilibili.com/x/relation/tags/copyUsers' \ ```shell curl 'https://api.bilibili.com/x/relation/tags/moveUsers' \ ---data-urlencode 'beforeTagids=207542' \ ---data-urlencode 'afterTagids=23130' \ ---data-urlencode 'fids=321173469,327086920' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' + --data-urlencode 'beforeTagids=207542' \ + --data-urlencode 'afterTagids=23130' \ + --data-urlencode 'fids=321173469,327086920' \ + --data-urlencode 'csrf=xxx' \ + -b 'SESSDATA=xxx' ```
From 076712a93152c69c7f5437392267925d897a6e63 Mon Sep 17 00:00:00 2001 From: z0z0r4 Date: Mon, 19 Jun 2023 13:42:05 +0800 Subject: [PATCH 035/159] Update dm.proto (#712) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 者 --- grpc_api/bilibili/community/service/dm/v1/dm.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grpc_api/bilibili/community/service/dm/v1/dm.proto b/grpc_api/bilibili/community/service/dm/v1/dm.proto index f5d6e9d..23074f2 100644 --- a/grpc_api/bilibili/community/service/dm/v1/dm.proto +++ b/grpc_api/bilibili/community/service/dm/v1/dm.proto @@ -202,7 +202,7 @@ message DanmakuElem { int32 fontsize = 4; // 弹幕颜色 uint32 color = 5; - // 发送着mid hash + // 发送者mid hash string midHash = 6; // 弹幕正文 string content = 7; From c4a137bde7c554067b24826aa6298749b23b9b53 Mon Sep 17 00:00:00 2001 From: z0z0r4 Date: Mon, 19 Jun 2023 13:57:11 +0800 Subject: [PATCH 036/159] Update charge_list.md (#711) --- docs/electric/charge_list.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/electric/charge_list.md b/docs/electric/charge_list.md index 021889a..54ad557 100644 --- a/docs/electric/charge_list.md +++ b/docs/electric/charge_list.md @@ -18,7 +18,7 @@ | 字段 | 类型 | 内容 | 备注 | | ------- | ---- | -------- | ---------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误 | +| code | num | 返回值 | 0:成功
-400:请求错误
88214:up主未开通充电 | | message | str | 错误信息 | | | ttl | num | 0 | | | data | obj | 数据本体 | | From 57c1817fbafe5ef102a0a84080f2cf040ce1c446 Mon Sep 17 00:00:00 2001 From: 7rikka Date: Tue, 20 Jun 2023 13:50:32 +0800 Subject: [PATCH 037/159] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=A7=E4=BC=9A?= =?UTF-8?q?=E5=91=98=E6=96=B0=E7=9A=84=E5=85=91=E6=8D=A2=E9=A1=B9=20(#710)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/vip/action.md | 8 ++++---- docs/vip/info.md | 16 +++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/vip/action.md b/docs/vip/action.md index 0f9bdec..da8ee96 100644 --- a/docs/vip/action.md +++ b/docs/vip/action.md @@ -10,10 +10,10 @@ **正文参数 (application/x-www-form-urlencoded):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------------------- | --------------- | ------------------------------------------------------------ | -| type | num | 兑换类型 | 必要 | 1:B币券
2:会员购优惠券
3:漫画福利券
4:会员购包邮券
5:漫画商城优惠券 | -| csrf | str | CSRF Token (位于cookie) | Cookie 方式必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +|------|-----|-----------------------|-------------|--------------------------------------------------------------------------------------| +| type | num | 兑换类型 | 必要 | 1:B币券
2:会员购优惠券
3:漫画福利券
4:会员购包邮券
5:漫画商城优惠券
6:装扮体验卡
7:课堂优惠券 | +| csrf | str | CSRF Token (位于cookie) | Cookie 方式必要 | | **json回复:** diff --git a/docs/vip/info.md b/docs/vip/info.md index 550e5aa..51805d2 100644 --- a/docs/vip/info.md +++ b/docs/vip/info.md @@ -29,13 +29,15 @@ `list`数组: -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---------------------- | ---- | -| 0 | obj | B币兑换状态 | | -| 1 | obj | 会员购优惠券兑换状态 | | -| 2 | obj | 漫画福利券兑换状态 | | -| 3 | obj | 会员购包邮券兑换状态 | | -| 4 | obj | 漫画商城优惠券兑换状态 | | +| 字段 | 类型 | 内容 | 备注 | +|----|-----|-------------|----| +| 0 | obj | B币兑换状态 | | +| 1 | obj | 会员购优惠券兑换状态 | | +| 2 | obj | 漫画福利券兑换状态 | | +| 3 | obj | 会员购包邮券兑换状态 | | +| 4 | obj | 漫画商城优惠券兑换状态 | | +| 5 | obj | 装扮体验卡兑换状态 | | +| 6 | obj | 课堂优惠券兑换状态 | | `list`中的对象: From 3aaf9679c51eec05c28fe505cd26238e6c2ac303 Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Wed, 21 Jun 2023 08:39:47 +0800 Subject: [PATCH 038/159] =?UTF-8?q?=E8=A1=A5=E5=85=85wbi=E6=96=87=E6=A1=A3?= =?UTF-8?q?=20(#706)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加评论条目中图片数据说明 * wbi文档补充提示 * 修复代码格式 --- docs/misc/sign/wbi.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/misc/sign/wbi.md b/docs/misc/sign/wbi.md index 15e969f..aa11a05 100644 --- a/docs/misc/sign/wbi.md +++ b/docs/misc/sign/wbi.md @@ -49,9 +49,9 @@ ```javascript { - foo: '114', - bar: '514', - baz: 1919810 + foo: '114', + bar: '514', + baz: 1919810 } ``` @@ -61,6 +61,23 @@ bar=514&baz=1919810&foo=114 ``` + 请注意,如果参数值为中文或特殊字符,则进行 url query 编码后的字符串中参数值对应的字母必须是**大写字母** (部分库会编码为小写字母) + + 例如 + ```javascript + { + foo: 'one one four', + bar: '五一四', + baz: 1919810 + } + ``` + + 应该被编码为 + + ``` + bar=%E4%BA%94%E4%B8%80%E5%9B%9B&baz=1919810&foo=one%20one%20four + ``` + 4. 为参数中添加`wts`时间戳 `wts`字段的值应为以秒为单位的 Unix TimeStamp,如`1684746387` From 24f35ac47122e2e1eadb7256ea2088daed112fab Mon Sep 17 00:00:00 2001 From: Jianqi Pan Date: Wed, 21 Jun 2023 09:40:59 +0900 Subject: [PATCH 039/159] :memo: need not empty buvid3 (#699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :memo: need not empty buvid3 实测需要在 Cookie 中添加非空的 buvid3 字段才能正常访问,否则会返回 -401 * Update info.md --- docs/user/info.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/info.md b/docs/user/info.md index 46c8100..ac2d6fd 100644 --- a/docs/user/info.md +++ b/docs/user/info.md @@ -10,7 +10,7 @@ 认证方式:Cookie(SESSDATA) -鉴权方式:[Wbi 签名](../misc/sign/wbi.md) +鉴权方式:[Wbi 签名](../misc/sign/wbi.md), Cookie (对于某些 IP 地址,需要在 Cookie 中提供任意非空的 `buvid3` 字段) ~~该接口的旧版 API :https://api.bilibili.com/x/space/acc/info~~(已废弃,不建议使用) From 37009a289482d51640f16183441cd2788950abd1 Mon Sep 17 00:00:00 2001 From: 7rikka Date: Wed, 21 Jun 2023 23:30:53 +0800 Subject: [PATCH 040/159] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=A7=A3=E6=9E=90=20(#517)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加:获取动态列表 * 补充:获取动态列表 * 枚举类型单独成文档 * 添加:获取动态详情 * 添加:获取用户空间动态 --- dynamic/all.md | 3786 +++++++++++++++++++++++++++++++++++++++ dynamic/detail.md | 269 +++ dynamic/dynamic_enum.md | 220 +++ dynamic/space.md | 1142 ++++++++++++ 4 files changed, 5417 insertions(+) create mode 100644 dynamic/all.md create mode 100644 dynamic/detail.md create mode 100644 dynamic/dynamic_enum.md create mode 100644 dynamic/space.md diff --git a/dynamic/all.md b/dynamic/all.md new file mode 100644 index 0000000..1118b13 --- /dev/null +++ b/dynamic/all.md @@ -0,0 +1,3786 @@ +# 获取动态列表 + +> https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/all + +请求方式:`GET` + +是否需要登录:`是` + +## URL参数 + +| 参数名 | 类型 | 必填 | 内容 | 备注 | +|-----------------|-----|-----|--------|-----------------------------------------------------------| +| timezone_offset | str | | `-480` | | +| type | str | | 分类 | `all`:全部
`video`:视频投稿
`pgc`:追番追剧
`article`:专栏 | +| offset | num | | 分页偏移量 | 翻页时使用 | +| update_baseline | str | | 更新基线 | 获取新动态时使用 | +| page | num | | 页数 | 无效参数 | + +## Json回复 + +### 根对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|-----|------|---------------------| +| code | num | 响应码 | 0:成功
-101:账号未登录 | +| message | str | | | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +### `data`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------------|-------|----------------|----------------------------------| +| has_more | bool | 是否有更多数据 | | +| items | array | 数据数组 | | +| offset | str | 偏移量 | 等于`items`中最后一条记录的id
获取下一页时使用 | +| update_baseline | str | 更新基线 | 等于`items`中第一条记录的id | +| update_num | num | 本次获取获取到了多少条新动态 | 在更新基线以上的动态条数 | + +### `data`对象 -> `items`数组中的对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|------|-------|------------------------------------| +| basic | obj | | | +| id_str | str | 动态id | | +| modules | obj | 动态信息 | | +| type | str | 动态类型 | [动态类型](./dynamic_enum.md#动态类型) | +| visible | bool | 是否显示 | `true`:正常显示
`false`:折叠动态 | +| orig | obj | 原动态信息 | 仅动态类型为`DYNAMIC_TYPE_FORWARD`的情况下存在 | + +### `data`对象 -> `items`数组中的对象 -> `basic`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------------|-----|-----|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| comment_id_str | str | | `DYNAMIC_TYPE_AV`:视频AV号
`DYNAMIC_TYPE_UGC_SEASON`:视频AV号
`DYNAMIC_TYPE_PGC`:剧集分集AV号
`DYNAMIC_TYPE_LIVE_RCMD`:动态本身id
`DYNAMIC_TYPE_DRAW`:相簿id
`DYNAMIC_TYPE_ARTICLE`:专栏cv号
`DYNAMIC_TYPE_FORWARD`:动态本身id
`DYNAMIC_TYPE_WORD`:动态本身id
`DYNAMIC_TYPE_LIVE`:动态本身id
`DYNAMIC_TYPE_MEDIALIST`:收藏夹ml号 | +| comment_type | num | | 1:`DYNAMIC_TYPE_AV` `DYNAMIC_TYPE_PGC` `DYNAMIC_TYPE_UGC_SEASON`
11:`DYNAMIC_TYPE_DRAW`
12:`DYNAMIC_TYPE_ARTICLE`
17:`DYNAMIC_TYPE_LIVE_RCMD` `DYNAMIC_TYPE_FORWARD` `DYNAMIC_TYPE_WORD` `DYNAMIC_TYPE_COMMON_SQUARE`
19:`DYNAMIC_TYPE_MEDIALIST` | +| like_icon | obj | | `空串` | +| rid_str | str | | `DYNAMIC_TYPE_AV`:视频AV号
`DYNAMIC_TYPE_UGC_SEASON`:视频AV号 `DYNAMIC_TYPE_PGC`:剧集分集EP号
`DYNAMIC_TYPE_DRAW`:相簿id
`DYNAMIC_TYPE_ARTICLE`:专栏cv号
`DYNAMIC_TYPE_LIVE_RCMD`:live_id
`DYNAMIC_TYPE_FORWARD`:未知
`DYNAMIC_TYPE_WORD`:未知
`DYNAMIC_TYPE_COMMON_SQUARE`:未知
`DYNAMIC_TYPE_LIVE`:直播间id
`DYNAMIC_TYPE_MEDIALIST`:收藏夹ml号 | + +### `data`对象 -> `items`数组中的对象 -> `basic`对象 -> `like_icon`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------------|-----|------|-----| +| action_url | str | `空串` | | +| end_url | str | `空串` | | +| id | num | `0` | | +| start_url | str | `空串` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|--------------------|-----|-----------|-----| +| module_author | obj | UP主信息 | | +| module_dynamic | obj | 动态内容信息 | | +| module_more | obj | 动态右上角三点菜单 | | +| module_stat | obj | 动态统计数据 | | +| module_interaction | obj | 热度评论 | | +| module_fold | obj | 动态折叠信息 | | +| module_dispute | obj | 争议小黄条 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_author`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-------------------|------|-------------------------|-------------------------------------------------------------------------------------| +| face | str | 头像 | | +| face_nft | bool | 是否为NFT头像 | | +| following | bool | 是否关注此UP主 | 自己的动态为`null` | +| jump_url | str | 跳转链接 | | +| label | str | 名称前标签 | `合集`
`电视剧`
`番剧` | +| mid | num | UP主UID
剧集SeasonId | | +| name | str | UP主名称
剧集名称
合集名称 | | +| official_verify | obj | UP主认证信息 | | +| pendant | obj | UP主头像框 | | +| pub_action | str | 更新动作描述 | `投稿了视频`
`直播了`
`投稿了文章`
`更新了合集`
`与他人联合创作`
`发布了动态视频`
`投稿了直播回放` | +| pub_location_text | str | `空串` | | +| pub_time | str | 更新时间 | `x分钟前`
`x小时前`
`昨天` | +| pub_ts | num | 更新时间戳 | 单位:秒 | +| type | str | 作者类型 | [作者类型](./dynamic_enum.md#作者类型) | +| vip | obj | UP主大会员信息 | | +| decorate | obj | 装扮信息 | | +| nft_info | obj | NFT头像信息 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_author`对象 -> `official_verify`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------|-----|------|-----| +| desc | str | 认证说明 | | +| type | num | 认证类型 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_author`对象 -> `pendant`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------------------|-----|--------------|------------| +| expire | num | 过期时间 | 此接口返回恒为`0` | +| image | str | 头像框图片url | | +| image_enhance | str | 头像框图片url | | +| image_enhance_frame | str | 头像框图片逐帧序列url | | +| name | str | 头像框名称 | | +| pid | num | 头像框id | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_author`对象 -> `vip`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------------------|-----|----------|---------------------------------| +| avatar_subscript | num | 是否显示角标 | 0:不显示
1:显示 | +| avatar_subscript_url | str | `空串` | | +| due_date | num | 大会员过期时间戳 | 单位:秒 | +| label | obj | 大会员标签 | | +| nickname_color | str | 名字显示颜色 | 大会员:`#FB7299` | +| status | num | 大会员状态 | 0:无
1:有
2:? | +| theme_type | num | `0` | | +| type | num | 大会员类型 | 0:无
1:月大会员
2:年度及以上大会员 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_author`对象 -> `vip`对象 -> `label`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------------------------|------|----------|------------------------------------------------------------------------------------------------------------------------------| +| bg_color | str | 会员标签背景颜色 | `#FB7299` | +| bg_style | num | `0` `1` | | +| border_color | str | `空串` | | +| img_label_uri_hans | str | 大会员牌子图片 | 动态版 简体版 | +| img_label_uri_hans_static | str | 大会员牌子图片 | 静态版 简体版 | +| img_label_uri_hant | str | 大会员牌子图片 | 动态版 繁体版 | +| img_label_uri_hant_static | str | 大会员牌子图片 | 静态版 繁体版 | +| label_theme | str | 会员标签 | vip:大会员
annual_vip:年度大会员
ten_annual_vip:十年大会员
hundred_annual_vip:百年大会员
fools_day_hundred_annual_vip:最强绿鲤鱼 | +| path | str | `空串` | | +| text | str | 会员类型文案 | `大会员` `年度大会员` `十年大会员` `百年大会员` `最强绿鲤鱼` | +| text_color | str | 用户名文字颜色 | | +| use_img_label | bool | `true` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_author`对象 -> `decorate`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|--------------|-----| +| card_url | str | 动态卡片小图标图片URL | | +| fan | obj | 粉丝装扮信息 | | +| id | num | 装扮ID | | +| jump_url | str | 跳转URL | | +| name | str | 装扮名称 | | +| type | num | `1` `2` `3` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_author`对象 -> `decorate`对象 -> `fan`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|------|---------|-----| +| color | str | 编号颜色 | | +| is_fan | bool | 是否是粉丝装扮 | | +| num_str | str | 装扮编号 | | +| number | num | 装扮编号 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_author`对象 -> `nft_info`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-------------|-----|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| region_icon | str | NFT头像角标URL | 类型1:https://i0.hdslb.com/bfs/activity-plat/static/20220506/334553dd7c506a92b88eaf4d59ac8b4d/j8AeXAkEul.gif
类型2:https://i0.hdslb.com/bfs/activity-plat/static/20220506/334553dd7c506a92b88eaf4d59ac8b4d/IOHoVs1ebP.gif | +| region_type | num | NFT头像角标类型 | 1,2 | +| show_status | num | `1` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------------|-----|----------|-----| +| additional | obj | 相关内容卡片信息 | | +| desc | obj | 动态文字内容 | | +| major | obj | 动态主体对象 | | +| topic | obj | 话题信息 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|-----|------|----------------------------------------| +| common | obj | 一般类型 | `ADDITIONAL_TYPE_COMMON`类型独有 | +| type | str | 卡片类型 | [相关内容卡片类型](./dynamic_enum.md#相关内容卡片类型) | +| reserve | obj | 预约信息 | `ADDITIONAL_TYPE_RESERVE`类型独有 | +| goods | obj | 商品内容 | `ADDITIONAL_TYPE_GOODS`类型独有 | +| vote | obj | 投票信息 | `ADDITIONAL_TYPE_VOTE`类型独有 | +| ugc | obj | 视频信息 | `ADDITIONAL_TYPE_UGC`类型独有 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `common`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|-----|-------|-----------------------------------| +| button | obj | 按钮内容 | | +| cover | str | 左侧封面图 | | +| desc1 | str | 描述1 | | +| desc2 | str | 描述2 | | +| head_text | str | 卡片头文本 | | +| id_str | str | 相关id | | +| jump_url | str | 跳转URL | | +| style | num | `1` | | +| sub_type | str | 子类型 | `game`
`decoration`
`ogv` | +| title | str | 卡片标题 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `common`对象 -> `button`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------------|-----|-------|---------------------------------------| +| jump_style | obj | 跳转类型 | `game`和`decoration`类型特有 | +| jump_url | str | 跳转URL | | +| type | num | | 1:`game`和`decoration`类型
2:`ogv`类型 | +| check | obj | | `ogv`类型特有 | +| status | num | `1` | | +| uncheck | obj | | `ogv`类型特有 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `common`对象 -> `button`对象 -> `jump_style`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|--------|--------------------------------| +| icon_url | str | `空串` | | +| text | str | 按钮显示文案 | game:`进入`
decoration:`去看看` | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `common`对象 -> `button`对象 -> `check`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|---------|-----------| +| icon_url | str | 按钮图片URL | | +| text | str | 按钮显示文案 | `ogv`:已追剧 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `common`对象 -> `button`对象 -> `uncheck`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|---------|----------| +| icon_url | str | 按钮图片URL | | +| text | str | 按钮显示文案 | `ogv`:追剧 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `reserve`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------------|-----|----------|-----| +| button | obj | 按钮信息 | | +| desc1 | obj | 预约时间 | | +| desc2 | obj | 预约观看量 | | +| jump_url | str | 跳转URL | | +| reserve_total | num | 预约人数 | | +| rid | num | | | +| state | num | `0` | | +| stype | num | `1` `2` | | +| title | str | 预约标题 | | +| up_mid | num | 预约发起人UID | | +| desc3 | obj | 预约有奖信息 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `reserve`对象 -> `button`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------------|-----|-----------|------------------------------------------------------| +| check | obj | 已预约状态显示内容 | | +| status | num | 预约状态 | 1:未预约,使用`uncheck`
2:已预约,使用`check` | +| type | num | 类型 | 1:视频预约,使用`jump_style`
2:直播预约,使用`check`和`uncheck` | +| uncheck | obj | 未预约状态显示内容 | | +| jump_style | obj | 跳转按钮 | | +| jump_url | str | 跳转URL | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `reserve`对象 -> `button`对象 -> `check`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|--------|-------| +| icon_url | str | `空串` | | +| text | str | 按钮显示文案 | `已预约` | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `reserve`对象 -> `button`对象 -> `uncheck`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|------------|-----| +| icon_url | str | 显示图标URL | | +| text | str | 按钮显示文案 | | +| toast | str | 预约成功显示提示文案 | | +| disable | num | 是否不可预约 | 1:是 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `reserve`对象 -> `button`对象 -> `jump_style`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|--------|-------| +| icon_url | str | `空串` | | +| text | str | 按钮显示文案 | `去观看` | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `reserve`对象 -> `desc1`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-------|-----|------|------------------------------------------------------| +| style | num | 类型 | 0:`视频预约` `11-05 20:00 直播` `预计今天 17:05发布`
1:`直播中` | +| text | str | 显示文案 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `reserve`对象 -> `desc2`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|------|------|-----------------------------------------------| +| style | num | `0` | | +| text | str | 显示文案 | `2人预约`
`743观看`
`1.0万人看过`
`2151人气` | +| visible | bool | 是否显示 | true:显示文案
false:显示已结束 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `reserve`对象 -> `desc3`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|-----------|-----| +| jump_url | str | 开奖信息跳转URL | | +| style | num | `1` | | +| text | str | 奖品信息显示文案 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `goods`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|-------|---------|-----| +| head_icon | str | `空串` | | +| head_text | str | 卡片头显示文案 | | +| items | array | 商品信息列表 | | +| jump_url | str | `空串` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `goods`对象 -> `items`数组中的对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|-----|----------|-----| +| brief | str | 商品副标题 | | +| cover | str | 商品封面 | | +| id | str | 商品ID | | +| jump_desc | str | 跳转按钮显示文案 | | +| jump_url | str | 跳转URL | | +| name | str | 商品名称 | | +| price | str | 商品价格 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `vote`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------------|------|-----------------|------| +| choice_cnt | num | `1` | | +| default_share | num | 是否默认勾选`同时分享至动态` | 1:勾选 | +| desc | str | 投票标题 | | +| end_time | num | 剩余时间 | 单位:秒 | +| join_num | num | 已参与人数 | | +| status | num | `1` | | +| type | null | `null` | | +| uid | num | 发起人UID | | +| vote_id | num | 投票ID | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `additional`对象 -> `ugc`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-------------|------|---------|-----| +| cover | str | 封面 | | +| desc_second | str | 播放量与弹幕数 | | +| duration | str | 视频长度 | | +| head_text | str | `空串` | | +| id_str | str | 视频AV号 | | +| jump_url | str | 视频跳转URL | | +| multi_line | bool | `true` | | +| title | str | 视频标题 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `desc`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------------|-------|---------|--------------------------------------| +| rich_text_nodes | array | 富文本节点列表 | [富文本节点类型](./dynamic_enum.md#富文本节点类型) | +| text | str | 动态的文字内容 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `desc`对象 -> `rich_text_nodes`数组中的对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|-----|--------|--------------------------------------| +| orig_text | str | 原始文本 | | +| text | str | 替换后的文本 | | +| type | str | 节点类型 | [富文本节点类型](./dynamic_enum.md#富文本节点类型) | +| emoji | obj | 表情信息 | | +| jump_url | str | 跳转URL | | +| rid | str | 关联id | | +| goods | obj | 商品信息 | | +| icon_name | str | 图标名称 | `taobao` | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `desc`对象 -> `rich_text_nodes`数组中的对象 -> `emoji`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|---------|-------------| +| icon_url | str | 表情图片URL | | +| size | num | 表情尺寸 | `1` `2` | +| text | str | 表情的文字代码 | | +| type | num | 表情类型 | `1` `2` `3` | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `desc`对象 -> `rich_text_nodes`数组中的对象 -> `goods`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|-------|-----| +| jump_url | str | 跳转URL | | +| type | num | `1` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------------|-----|--------|-------------------------| +| type | str | 动态主体类型 | [动态主体类型](./dynamic_enum.md#动态主体类型) | +| ugc_season | obj | 合集信息 | `MAJOR_TYPE_UGC_SEASON` | +| article | obj | 专栏类型 | `MAJOR_TYPE_ARTICLE` | +| draw | obj | 带图动态 | `MAJOR_TYPE_DRAW` | +| archive | obj | 视频信息 | `MAJOR_TYPE_ARCHIVE` | +| live_rcmd | obj | 直播状态 | `MAJOR_TYPE_LIVE_RCMD` | +| common | obj | 一般类型 | `MAJOR_TYPE_COMMON` | +| pgc | obj | 剧集信息 | `MAJOR_TYPE_PGC` | +| courses | obj | 课程信息 | `MAJOR_TYPE_COURSES` | +| music | obj | 音频信息 | `MAJOR_TYPE_MUSIC` | +| live | obj | | | +| none | obj | 动态失效 | `MAJOR_TYPE_NONE` | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `ugc_season`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------------|-----|-------|-----| +| aid | num | 视频AV号 | | +| badge | obj | 角标信息 | | +| cover | str | 视频封面 | | +| desc | str | 视频简介 | | +| disable_preview | num | `0` | | +| duration_text | str | 时长 | | +| jump_url | str | 跳转URL | | +| stat | obj | 统计信息 | | +| title | str | 视频标题 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `ugc_season`对象 -> `badge`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|------|-----| +| bg_color | str | 背景颜色 | | +| color | str | 字体颜色 | | +| text | str | 角标文案 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `ugc_season`对象 -> `stat`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|-----|-----|-----| +| danmaku | str | 弹幕数 | | +| play | str | 播放数 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `article`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-------|--------|------| +| covers | array | 封面图数组 | 最多三张 | +| desc | str | 文章摘要 | | +| id | num | 文章CV号 | | +| jump_url | str | 文章跳转地址 | | +| label | str | 文章阅读量 | | +| title | str | 文章标题 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `draw`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-------|-------|--------|-----| +| id | num | 对应相簿id | | +| items | array | 图片信息列表 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `draw`对象 -> `items`数组中的对象 + +| 字段名 | 类型 | 内容 | 备注 | +|--------|-------|-------|------| +| height | num | 图片高度 | | +| size | num | 图片大小 | 单位KB | +| src | str | 图片URL | | +| tags | array | | | +| width | num | 图片宽度 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `archive`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------------|-----|--------|-----| +| aid | str | 视频AV号 | | +| badge | obj | 角标信息 | | +| bvid | str | 视频BVID | | +| cover | str | 视频封面 | | +| desc | str | 视频简介 | | +| disable_preview | num | `0` | | +| duration_text | str | 视频长度 | | +| jump_url | str | 跳转URL | | +| stat | obj | 统计信息 | | +| title | str | 视频标题 | | +| type | num | `1` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `archive`对象 -> `badge`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|------|-----| +| bg_color | str | 背景颜色 | | +| color | str | 字体颜色 | | +| text | str | 角标文案 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `archive`对象 -> `stat`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|-----|-----|-----| +| danmaku | str | 弹幕数 | | +| play | str | 播放数 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `live_rcmd`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|--------------|-----|-----------|-----| +| content | str | 直播间内容JSON | | +| reserve_type | num | `0` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `common`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|-----|--------|-----| +| badge | obj | 角标信息 | | +| biz_type | num | `0` | | +| cover | str | 左侧图片封面 | | +| desc | str | 右侧描述信息 | | +| id | str | | | +| jump_url | str | 跳转地址 | | +| label | str | `空串` | | +| sketch_id | str | | | +| style | num | `1` | | +| title | str | 右侧标题 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `common`对象 -> `badge`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|------|-----| +| bg_color | str | `空串` | | +| color | str | `空串` | | +| text | str | `空串` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `pgc`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|-----|------------|--------------------------------------------------------------| +| badge | obj | 角标信息 | | +| cover | str | 视频封面 | | +| epid | num | 分集EpId | | +| jump_url | str | 跳转URL | | +| season_id | num | 剧集SeasonId | | +| stat | obj | 统计信息 | | +| sub_type | num | 剧集类型 | 1:番剧
2:电影
3:纪录片
4:国创
5:电视剧
6:漫画
7:综艺 | +| title | str | 视频标题 | | +| type | num | `2` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `pgc`对象 -> `badge`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|------|-----| +| bg_color | str | 背景颜色 | | +| color | str | 字体颜色 | | +| text | str | 角标文案 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `pgc`对象 -> `stat`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|-----|-----|-----| +| danmaku | str | 弹幕数 | | +| play | str | 播放数 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `courses`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|-----|--------|-----| +| badge | obj | 角标信息 | | +| cover | str | 封面图URL | | +| desc | str | 更新状态描述 | | +| id | num | 课程id | | +| jump_url | str | 跳转URL | | +| sub_title | str | 课程副标题 | | +| title | str | 课程标题 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `courses`对象 -> `badge`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|------|-----| +| bg_color | str | 背景颜色 | | +| color | str | 字体颜色 | | +| text | str | 角标文案 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `music`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|--------|-----| +| cover | str | 音频封面 | | +| id | num | 音频AUID | | +| jump_url | str | 跳转URL | | +| label | str | 音频分类 | | +| title | str | 音频标题 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `live`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|--------------|-----|----------|-------------------| +| badge | obj | 角标信息 | | +| cover | str | 直播封面 | | +| desc_first | str | 直播主分区名称 | | +| desc_second | str | 观看人数 | | +| id | num | 直播间id | | +| jump_url | str | 直播间跳转URL | | +| live_state | num | 直播状态 | 0:直播结束
1:正在直播 | +| reserve_type | num | `0` | | +| title | str | 直播间标题 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `live`对象 -> `badge`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|------|-----| +| bg_color | str | 背景颜色 | | +| color | str | 字体颜色 | | +| text | str | 角标文案 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `major`对象 -> `none`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------|-----|----------|-----| +| tips | str | 动态失效显示文案 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dynamic`对象 -> `topic`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|-------|-----| +| id | num | 话题id | | +| jump_url | str | 跳转URL | | +| name | str | 话题名称 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_more`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-------------------|-------|---------|-----| +| three_point_items | array | 右上角三点菜单 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_more`对象 -> `three_point_items`数组中的对象 + +| 字段名 | 类型 | 内容 | 备注 | +|--------|-----|-------|------------| +| label | str | 显示文本 | | +| type | str | 类型 | | +| modal | obj | 弹出框信息 | 删除动态时弹出 | +| params | obj | 参数 | 置顶/取消置顶时使用 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_more`对象 -> `three_point_items`数组中的对象 -> `modal`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|-----|------|---------------| +| cancel | str | 取消按钮 | `我点错了` | +| confirm | str | 确认按钮 | `删除` | +| content | str | 提示内容 | `确定要删除此条动态吗?` | +| title | str | 标题 | `删除动态` | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_more`对象 -> `three_point_items`数组中的对象 -> `params`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------------|------|--------------|-----| +| dynamic_id | str | 当前动态ID | | +| status | bool | 当前动态是否处于置顶状态 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_stat`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|-----|------|-----| +| comment | obj | 评论数据 | | +| forward | obj | 转发数据 | | +| like | obj | 点赞数据 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_stat`对象 -> `comment`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|------|---------|---------------| +| count | num | 评论数 | | +| forbidden | bool | `false` | | +| hidden | bool | 是否隐藏 | 直播类型动态会隐藏回复功能 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_stat`对象 -> `forward`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|------|---------|-----| +| count | num | 转发数 | | +| forbidden | bool | `false` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_stat`对象 -> `like`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|------|----------|-----| +| count | num | 点赞数 | | +| forbidden | bool | `false` | | +| status | bool | 当前用户是否点赞 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_interaction`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-------|-------|------|-----| +| items | array | 信息列表 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_interaction`对象 -> `items`数组中的对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------|-----|---------|-------------------| +| desc | obj | 点赞/评论信息 | | +| type | num | 类型 | 0:点赞信息
1:评论信息 | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_interaction`对象 -> `items`数组中的对象 -> `desc`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------------|-------|---------|--------------------------------------| +| rich_text_nodes | array | 富文本节点列表 | [富文本节点类型](./dynamic_enum.md#富文本节点类型) | +| text | str | 评论内容 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_interaction`对象 -> `items`数组中的对象 -> `desc`对象 -> `rich_text_nodes`数组中的对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|-----|---------|--------------------------------------| +| orig_text | str | 原始文本 | | +| rid | str | 关联ID | 用户UID | +| text | str | 替换后文本 | | +| type | str | 富文本节点类型 | [富文本节点类型](./dynamic_enum.md#富文本节点类型) | +| emoji | obj | 表情信息 | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_interaction`对象 -> `items`数组中的对象 -> `desc`对象 -> `rich_text_nodes`数组中的对象 -> `emoji`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|---------|-------------| +| icon_url | str | 表情图片URL | | +| size | num | 表情尺寸 | `1` `2` | +| text | str | 表情的文字代码 | | +| type | num | 表情类型 | `1` `2` `3` | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_fold`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|-----------|-------|------------|------------| +| ids | array | 被折叠的动态id列表 | | +| statement | str | 显示文案 | 例:展开x条相关动态 | +| type | num | `1` | | +| users | array | `空数组` | | + +### `data`对象 -> `items`数组中的对象 -> `modules`对象 -> `module_dispute`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|----------|-----|------|------------------| +| desc | str | | | +| jump_url | str | | | +| title | str | 提醒文案 | 例:视频内含有危险行为,请勿模仿 | + +## 请求示例 + +```shell +curl -L -X GET 'https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/all?type=all' \ +-H 'Cookie: SESSDATA=xxx' +``` + +## 响应示例 + +
+点击查看 + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "has_more": true, + "items": [ + { + "basic": { + "comment_id_str": "474518278", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "474518278" + }, + "id_str": "722806776626413588", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/28a0eede5cfd709d3dbed5d66f951a5d35854ec8.jpg", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/2062760/dynamic", + "label": "", + "mid": 2062760, + "name": "一把近战都不给六花", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "刚刚", + "pub_ts": 1667129967, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1678723200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "474518278", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1vK411U7de", + "cover": "http://i1.hdslb.com/bfs/archive/ea560a574ff303952e2f4ed23f03c835e67f78b0.jpg", + "desc": "直播间地址:https://www.twitch.tv/lvndmark\n直播信息(北京时间)\n开播时间:2022-10-30 05:15:31\n下播时间:2022-10-30 15:09:43\n本次直播流程:\n(录像:1638109399)\n1.Call of Duty: Modern Warfare II 9小时54分12秒", + "disable_preview": 0, + "duration_text": "9:54:23", + "jump_url": "//www.bilibili.com/video/BV1vK411U7de", + "stat": { + "danmaku": "0", + "play": "1" + }, + "title": "LVNDMARK 2022.10.30直播录像", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_fold": { + "ids": [ + "722805011403243538", + "722803306312761400" + ], + "statement": "展开2条相关动态", + "type": 1, + "users": [] + }, + "module_more": { + "three_point_items": [] + }, + "module_stat": { + "comment": { + "count": 0, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 0, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "474572551", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "474572551" + }, + "id_str": "722805011403243538", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/28a0eede5cfd709d3dbed5d66f951a5d35854ec8.jpg", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/2062760/dynamic", + "label": "", + "mid": 2062760, + "name": "一把近战都不给六花", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "7分钟前", + "pub_ts": 1667129556, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1678723200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "474572551", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1rK411U7CF", + "cover": "http://i0.hdslb.com/bfs/archive/68bb3cd4a84666ec3cdcd165d84b90e28bdc1cb8.jpg", + "desc": "直播间地址:https://www.twitch.tv/kinggeorge\n直播信息(北京时间)\n开播时间:2022-10-30 11:19:29\n下播时间:2022-10-30 17:41:46\n本次直播流程:\n(录像:1638390037)\n1.彩虹六号 5小时3分18秒\n2.Call of Duty: Modern Warfare II 1小时17分26秒\n3.彩虹六号 1分33秒", + "disable_preview": 0, + "duration_text": "6:22:24", + "jump_url": "//www.bilibili.com/video/BV1rK411U7CF", + "stat": { + "danmaku": "0", + "play": "10" + }, + "title": "KingGeorge 2022.10.30直播录像", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [] + }, + "module_stat": { + "comment": { + "count": 0, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 0, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": false + }, + { + "basic": { + "comment_id_str": "559593848", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "559593848" + }, + "id_str": "722803306312761400", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/28a0eede5cfd709d3dbed5d66f951a5d35854ec8.jpg", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/2062760/dynamic", + "label": "", + "mid": 2062760, + "name": "一把近战都不给六花", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "13分钟前", + "pub_ts": 1667129159, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1678723200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "559593848", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1de4y127n3", + "cover": "http://i2.hdslb.com/bfs/archive/f55f3970acdcd0c6d86459f3af40031d71484c32.jpg", + "desc": "直播间地址:https://www.twitch.tv/mohr\n直播信息(北京时间)\n开播时间:2022-10-30 08:51:26\n下播时间:2022-10-30 15:14:06\n本次直播流程:\n(录像:1638276178)\n1.Overwatch 2 6小时22分40秒", + "disable_preview": 0, + "duration_text": "6:22:47", + "jump_url": "//www.bilibili.com/video/BV1de4y127n3", + "stat": { + "danmaku": "0", + "play": "9" + }, + "title": "Mohr 2022.10.30直播录像", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [] + }, + "module_stat": { + "comment": { + "count": 0, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 2, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": false + }, + { + "basic": { + "comment_id_str": "517005457", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "517005457" + }, + "id_str": "722806471697367073", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/008605a75853dac76c15b2c15bd756f4de77fa77.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/625662374/dynamic", + "label": "", + "mid": 625662374, + "name": "萌小希的喵和汪", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "1分钟前", + "pub_ts": 1667129896, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1710432000000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "有这么一群小可爱陪着,居家也快乐", + "text": "有这么一群小可爱陪着,居家也快乐", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "有这么一群小可爱陪着,居家也快乐" + }, + "major": { + "archive": { + "aid": "517005457", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1Yg411z72M", + "cover": "http://i0.hdslb.com/bfs/archive/c4a09aaf15d225bb14a884f57c68ebb7fda9bbab.jpg", + "desc": "-", + "disable_preview": 0, + "duration_text": "01:40", + "jump_url": "//www.bilibili.com/video/BV1Yg411z72M", + "stat": { + "danmaku": "2", + "play": "242" + }, + "title": "有这么一群小可爱陪着,居家也快乐", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 4, + "forbidden": false + }, + "forward": { + "count": 1, + "forbidden": false + }, + "like": { + "count": 54, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "722706029592182807", + "comment_type": 17, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "288329916321046804" + }, + "id_str": "722706029592182807", + "modules": { + "module_author": { + "face": "https://i0.hdslb.com/bfs/face/980cbd15c6b649eedc3942391d1d92e82f1c79ea.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/19087539/dynamic", + "label": "", + "mid": 19087539, + "name": "永劫鉴挂达人张大狗", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "直播了", + "pub_location_text": "", + "pub_time": "", + "pub_ts": 1667106510, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1699545600000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "live_rcmd": { + "content": "{\"live_play_info\":{\"play_type\":0,\"parent_area_id\":2,\"parent_area_name\":\"网游\",\"live_screen_type\":0,\"live_start_time\":1667105908,\"uid\":19087539,\"area_id\":666,\"area_name\":\"永劫无间\",\"watched_show\":{\"switch\":true,\"num\":898,\"text_small\":\"898\",\"text_large\":\"898人看过\",\"icon\":\"https://i0.hdslb.com/bfs/live/a725a9e61242ef44d764ac911691a7ce07f36c1d.png\",\"icon_location\":\"\",\"icon_web\":\"https://i0.hdslb.com/bfs/live/8d9d0f33ef8bf6f308742752d13dd0df731df19c.png\"},\"room_paid_type\":0,\"title\":\"进来学最快升级法 测试pve振刀榜第一\",\"live_status\":1,\"room_type\":0,\"cover\":\"http://i0.hdslb.com/bfs/live/new_room_cover/0e9bb02aa454a181f730f7d2657e7da5ef041193.jpg\",\"live_id\":\"288329916321046804\",\"pendants\":{\"list\":null},\"room_id\":7282964,\"link\":\"https://live.bilibili.com/7282964\",\"online\":7288},\"live_record_info\":null,\"type\":1}", + "reserve_type": 0 + }, + "type": "MAJOR_TYPE_LIVE_RCMD" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 0, + "forbidden": false, + "hidden": true + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 4, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_LIVE_RCMD", + "visible": true + }, + { + "basic": { + "comment_id_str": "219546675", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "219546675" + }, + "id_str": "722806291310837767", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/6109447a6a1505cdde51e354e7df7e738584d104.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/9583937/dynamic", + "label": "", + "mid": 9583937, + "name": "小米的狗", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "2分钟前", + "pub_ts": 1667129854, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1731859200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "219546675", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1K8411Y7Nh", + "cover": "http://i1.hdslb.com/bfs/archive/ae71e071758b19ef5d920f3fe60c65fef6cdd0f7.jpg", + "desc": "-", + "disable_preview": 0, + "duration_text": "00:45", + "jump_url": "//www.bilibili.com/video/BV1K8411Y7Nh", + "stat": { + "danmaku": "0", + "play": "164" + }, + "title": "其实我们学校也没什么好羡慕的", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 3, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 51, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "774623127", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "774623127" + }, + "id_str": "722805290583457809", + "modules": { + "module_author": { + "face": "https://archive.biliimg.com/bfs/archive/2bc7c0b415e3af4158d71bad8a7fd343243d968a.jpg", + "face_nft": false, + "following": false, + "jump_url": "//www.bilibili.com/video/av774623127", + "label": "合集", + "mid": 774623127, + "name": "绅士君F1的小游戏推荐", + "pub_action": "绅士君F1更新了合集", + "pub_time": "6分钟前", + "pub_ts": 1667129621, + "type": "AUTHOR_TYPE_UGC_SEASON" + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "type": "MAJOR_TYPE_UGC_SEASON", + "ugc_season": { + "aid": 774623127, + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "合集" + }, + "cover": "http://i1.hdslb.com/bfs/archive/5e4e1b6c460bd3671e7422cad5ec16642a6c1eb1.png", + "desc": "游戏名:魔女は復讐の夜に\n一款等了6年才等到完整版的游戏,它终于发售了!\n喜欢的话就关注我吧!你们的一键三连就是对我最大的支持!", + "disable_preview": 0, + "duration_text": "02:06", + "jump_url": "//www.bilibili.com/video/BV1W14y1L7m1", + "stat": { + "danmaku": "0", + "play": "36" + }, + "title": "魔女复仇之夜完整版" + } + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 10, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 22, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_UGC_SEASON", + "visible": true + }, + { + "basic": { + "comment_id_str": "689567837", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "689567837" + }, + "id_str": "722804775173750848", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/81cfe1102ae0e32ea56733f47e949fe1ed10d3c7.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/431631557/dynamic", + "label": "", + "mid": 431631557, + "name": "仙盟丶大罗金仙", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "8分钟前", + "pub_ts": 1667129501, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1667491200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "689567837", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV19m4y1F7fG", + "cover": "http://i1.hdslb.com/bfs/archive/ef2da4e2bdf21d38d53350fdbe21577e0f882b6d.jpg", + "desc": "游戏名:永劫无间", + "disable_preview": 0, + "duration_text": "13:13", + "jump_url": "//www.bilibili.com/video/BV19m4y1F7fG", + "stat": { + "danmaku": "10", + "play": "1385" + }, + "title": "【永劫·日常】当队伍里人手一个「七星夺窍」", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": { + "id": 47783, + "jump_url": "https://m.bilibili.com/topic-detail?topic_id=47783&topic_name=%E4%BB%A4%E4%BA%BA%E7%BB%86%E6%80%9D%E6%9E%81%E6%81%90%E7%9A%84%E6%B8%B8%E6%88%8F", + "name": "令人细思极恐的游戏" + } + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 18, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 112, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "722804650633330705", + "comment_type": 17, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "722804650682613780" + }, + "id_str": "722804650633330705", + "modules": { + "module_author": { + "decorate": { + "card_url": "http://i0.hdslb.com/bfs/garb/item/e9dff0468b7394c3072bade71aae4130602cb914.png", + "fan": { + "color": "#e495dc", + "is_fan": true, + "num_str": "002670", + "number": 2670 + }, + "id": 5335, + "jump_url": "https://www.bilibili.com/h5/mall/fans/recommend/5333?navhide=1&mid=653&from=dynamic&isdiy=0", + "name": "乙女音粉丝专属", + "type": 3 + }, + "face": "https://i2.hdslb.com/bfs/face/e8433484e1b6fc32e9754addbfd69fdf78dca514.jpg", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/653/dynamic", + "label": "", + "mid": 653, + "name": "Pravis_channel", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "https://i2.hdslb.com/bfs/face/50525f841aaebf32da475b2f7d407b5f4134436e.png", + "image_enhance": "https://i2.hdslb.com/bfs/face/50525f841aaebf32da475b2f7d407b5f4134436e.png", + "image_enhance_frame": "", + "name": "首批购买年度大会员", + "pid": 117 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "8分钟前", + "pub_ts": 1667129472, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1714579200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "【石头人2:0秘密】\n职业舞台上最好的死灵龙打刚背的教学\n", + "text": "【石头人2:0秘密】\n职业舞台上最好的死灵龙打刚背的教学\n", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/431432c43da3ee5aab5b0e4f8931953e649e9975.png", + "size": 1, + "text": "[打call]", + "type": 1 + }, + "orig_text": "[打call]", + "text": "[打call]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/431432c43da3ee5aab5b0e4f8931953e649e9975.png", + "size": 1, + "text": "[打call]", + "type": 1 + }, + "orig_text": "[打call]", + "text": "[打call]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/431432c43da3ee5aab5b0e4f8931953e649e9975.png", + "size": 1, + "text": "[打call]", + "type": 1 + }, + "orig_text": "[打call]", + "text": "[打call]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/431432c43da3ee5aab5b0e4f8931953e649e9975.png", + "size": 1, + "text": "[打call]", + "type": 1 + }, + "orig_text": "[打call]", + "text": "[打call]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/431432c43da3ee5aab5b0e4f8931953e649e9975.png", + "size": 1, + "text": "[打call]", + "type": 1 + }, + "orig_text": "[打call]", + "text": "[打call]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "orig_text": "\n", + "text": "\n", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/2caafee2e5db4db72104650d87810cc2c123fc86.png", + "size": 1, + "text": "[大哭]", + "type": 1 + }, + "orig_text": "[大哭]", + "text": "[大哭]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/2caafee2e5db4db72104650d87810cc2c123fc86.png", + "size": 1, + "text": "[大哭]", + "type": 1 + }, + "orig_text": "[大哭]", + "text": "[大哭]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/2caafee2e5db4db72104650d87810cc2c123fc86.png", + "size": 1, + "text": "[大哭]", + "type": 1 + }, + "orig_text": "[大哭]", + "text": "[大哭]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/2caafee2e5db4db72104650d87810cc2c123fc86.png", + "size": 1, + "text": "[大哭]", + "type": 1 + }, + "orig_text": "[大哭]", + "text": "[大哭]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/2caafee2e5db4db72104650d87810cc2c123fc86.png", + "size": 1, + "text": "[大哭]", + "type": 1 + }, + "orig_text": "[大哭]", + "text": "[大哭]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + } + ], + "text": "【石头人2:0秘密】\n职业舞台上最好的死灵龙打刚背的教学\n[打call][打call][打call][打call][打call]\n[大哭][大哭][大哭][大哭][大哭]" + }, + "major": null, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 0, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 3, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_WORD", + "visible": true + }, + { + "basic": { + "comment_id_str": "304504318", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "304504318" + }, + "id_str": "722804470237364257", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/03d0e2d9e066223daeb63d00a7cbc7375cde0bbc.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/81554471/dynamic", + "label": "", + "mid": 81554471, + "name": "潇潇学姐lady", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "9分钟前", + "pub_ts": 1667129430, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 0, + "avatar_subscript_url": "", + "due_date": 1650643200000, + "label": { + "bg_color": "", + "bg_style": 0, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png", + "label_theme": "", + "path": "", + "text": "", + "text_color": "", + "use_img_label": true + }, + "nickname_color": "", + "status": 0, + "theme_type": 0, + "type": 1 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "304504318", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1KP411P7dD", + "cover": "http://i1.hdslb.com/bfs/archive/febc5ccc7e8cb91b44b0e062da8551081f19c6a6.jpg", + "desc": "咱们学校这男生真精神!", + "disable_preview": 0, + "duration_text": "00:44", + "jump_url": "//www.bilibili.com/video/BV1KP411P7dD", + "stat": { + "danmaku": "21", + "play": "1.1万" + }, + "title": "企业级理解", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_interaction": { + "items": [ + { + "desc": { + "rich_text_nodes": [ + { + "orig_text": "Wounded_M:", + "rid": "112008080", + "text": "Wounded_M:", + "type": "RICH_TEXT_NODE_TYPE_AT" + }, + { + "orig_text": "那个,,确定是洗发水而不是洁厕灵么", + "text": "那个,,确定是洗发水而不是洁厕灵么", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "orig_text": "[doge]", + "text": "[doge]", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "那个,,确定是洗发水而不是洁厕灵么[doge]" + }, + "type": 1 + } + ] + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 92, + "forbidden": false + }, + "forward": { + "count": 1, + "forbidden": false + }, + "like": { + "count": 1778, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "210802703", + "comment_type": 11, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "210802703" + }, + "id_str": "722804358575554660", + "modules": { + "module_author": { + "decorate": { + "card_url": "https://i0.hdslb.com/bfs/garb/item/c49b72f2b40e0e6bf9d3325e9ff8a7eb7cb22030.png", + "fan": { + "color": "", + "is_fan": false, + "num_str": "", + "number": 0 + }, + "id": 39198, + "jump_url": "https://www.bilibili.com/h5/mall/fans/recommend/39220?navhide=1&mid=161775300&from=dynamic&isdiy=0", + "name": "明日方舟-灯下定影", + "type": 1 + }, + "face": "https://i0.hdslb.com/bfs/face/89154378c06a5ed332c40c2ca56f50cd641c0c90.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/161775300/dynamic", + "label": "", + "mid": 161775300, + "name": "明日方舟", + "official_verify": { + "desc": "", + "type": 1 + }, + "pendant": { + "expire": 0, + "image": "https://i0.hdslb.com/bfs/garb/item/0c8e7d627a35c378b757f39419889ef1fcc0ed9b.png", + "image_enhance": "https://i0.hdslb.com/bfs/garb/item/1815c81da71069ea3db4553cad7d233f782da2f2.webp", + "image_enhance_frame": "https://i0.hdslb.com/bfs/garb/item/ed2b4ef1da228c0b937753542b33af8f04d1d70c.png", + "name": "明日方舟", + "pid": 1990 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "9分钟前", + "pub_ts": 1667129404, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1680537600000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": { + "common": { + "button": { + "jump_style": { + "icon_url": "", + "text": "进入" + }, + "jump_url": "https://www.biligame.com/detail?id=101772&sourceFrom=1005", + "type": 1 + }, + "cover": "https://i0.hdslb.com/bfs/game/faa556b00d29fffc88281c1ee038b1b7f23aa5c2.jpg", + "desc1": "策略/二次元/美少女", + "desc2": "2022「感谢庆典」即将开启!", + "head_text": "相关游戏", + "id_str": "101772", + "jump_url": "https://www.biligame.com/detail?id=101772&sourceFrom=1005", + "style": 1, + "sub_type": "game", + "title": "明日方舟" + }, + "type": "ADDITIONAL_TYPE_COMMON" + }, + "desc": { + "rich_text_nodes": [ + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F%23", + "orig_text": "#明日方舟#", + "text": "#明日方舟#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E9%9F%B3%E5%BE%8B%E8%81%94%E8%A7%89%23", + "orig_text": "#音律联觉#", + "text": "#音律联觉#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "orig_text": "\r\n特别提醒:距离电影首映还有60分钟。\r\n趁此闲暇,我们准备了参演人员名单,诸位也可一览为快。\r\n如果您此前并无观影打算,却又在此时有空闲时间,我们同样诚邀您前来参与这千载难逢的艺术盛宴。\r\n我们保证,您绝对不会失望。 ", + "text": "\r\n特别提醒:距离电影首映还有60分钟。\r\n趁此闲暇,我们准备了参演人员名单,诸位也可一览为快。\r\n如果您此前并无观影打算,却又在此时有空闲时间,我们同样诚邀您前来参与这千载难逢的艺术盛宴。\r\n我们保证,您绝对不会失望。 ", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "#明日方舟##音律联觉#\r\n特别提醒:距离电影首映还有60分钟。\r\n趁此闲暇,我们准备了参演人员名单,诸位也可一览为快。\r\n如果您此前并无观影打算,却又在此时有空闲时间,我们同样诚邀您前来参与这千载难逢的艺术盛宴。\r\n我们保证,您绝对不会失望。 " + }, + "major": { + "draw": { + "id": 210802703, + "items": [ + { + "height": 4961, + "size": 9876.915, + "src": "https://i0.hdslb.com/bfs/new_dyn/c9610327ab7d1298f8916d53b5fd324d161775300.jpg", + "tags": [], + "width": 3508 + }, + { + "height": 4961, + "size": 5995.214, + "src": "https://i0.hdslb.com/bfs/new_dyn/302d129716ba5c5009a4df259da3409b161775300.jpg", + "tags": [], + "width": 3508 + }, + { + "height": 4961, + "size": 12802.127, + "src": "https://i0.hdslb.com/bfs/new_dyn/7bb6868d638616ae1d957f52adf4c7ee161775300.jpg", + "tags": [], + "width": 3508 + }, + { + "height": 4961, + "size": 4542.088, + "src": "https://i0.hdslb.com/bfs/new_dyn/2d1ecdf709619cc0bca633095fd26a36161775300.jpg", + "tags": [], + "width": 3508 + }, + { + "height": 1345, + "size": 283.4463, + "src": "https://i0.hdslb.com/bfs/new_dyn/f72a0231bf2e8bbcf6a09c16de592579161775300.jpg", + "tags": [], + "width": 1000 + }, + { + "height": 3235, + "size": 814.31836, + "src": "https://i0.hdslb.com/bfs/new_dyn/07a94b22517e78eac9d8bac38789f17c161775300.jpg", + "tags": [], + "width": 1000 + }, + { + "height": 2908, + "size": 670.54004, + "src": "https://i0.hdslb.com/bfs/new_dyn/425d8c556b9e5bd5a49e0770662c7fdc161775300.jpg", + "tags": [], + "width": 1000 + }, + { + "height": 2908, + "size": 664.3535, + "src": "https://i0.hdslb.com/bfs/new_dyn/ddb2f31f3d80cf87e39cdcb1b2cd9034161775300.jpg", + "tags": [], + "width": 1000 + }, + { + "height": 3235, + "size": 853.39746, + "src": "https://i0.hdslb.com/bfs/new_dyn/f56c66eb94e401a7c9b895ba0905bb7c161775300.jpg", + "tags": [], + "width": 1000 + } + ] + }, + "type": "MAJOR_TYPE_DRAW" + }, + "topic": null + }, + "module_interaction": { + "items": [ + { + "desc": { + "rich_text_nodes": [ + { + "orig_text": "Coner4053:", + "rid": "1375262127", + "text": "Coner4053:", + "type": "RICH_TEXT_NODE_TYPE_AT" + }, + { + "orig_text": "年导的电影天下第一!!!", + "text": "年导的电影天下第一!!!", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/431432c43da3ee5aab5b0e4f8931953e649e9975.png", + "size": 1, + "text": "[打call]", + "type": 1 + }, + "orig_text": "[打call]", + "text": "[打call]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/431432c43da3ee5aab5b0e4f8931953e649e9975.png", + "size": 1, + "text": "[打call]", + "type": 1 + }, + "orig_text": "[打call]", + "text": "[打call]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/431432c43da3ee5aab5b0e4f8931953e649e9975.png", + "size": 1, + "text": "[打call]", + "type": 1 + }, + "orig_text": "[打call]", + "text": "[打call]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "orig_text": " 5龙门币一条,括号记得删", + "text": " 5龙门币一条,括号记得删", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "年导的电影天下第一!!![打call][打call][打call] 5龙门币一条,括号记得删" + }, + "type": 1 + } + ] + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 565, + "forbidden": false + }, + "forward": { + "count": 74, + "forbidden": false + }, + "like": { + "count": 4800, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_DRAW", + "visible": true + }, + { + "basic": { + "comment_id_str": "722803941956386838", + "comment_type": 17, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "722803942006718519" + }, + "id_str": "722803941956386838", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/e4f1466daf6e3173e8cab68eb4551589a09d4967.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/32172110/dynamic", + "label": "", + "mid": 32172110, + "name": "京阿尼语料", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "11分钟前", + "pub_ts": 1667129307, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1733500800000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/bf7e00ecab02171f8461ee8cf439c73db9797748.png", + "size": 1, + "text": "[脱单doge]", + "type": 1 + }, + "orig_text": "[脱单doge]", + "text": "[脱单doge]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "orig_text": "来看稿", + "text": "来看稿", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "[脱单doge]来看稿" + }, + "major": null, + "topic": { + "id": 57386, + "jump_url": "https://m.bilibili.com/topic-detail?topic_id=57386&topic_name=%E2%80%9C%E4%BA%AC%E5%90%8E%E6%9C%89%E4%BD%A0%E2%80%9D%E5%88%9B%E4%BD%9C%E7%9B%9B%E5%85%B8", + "name": "“京后有你”创作盛典" + } + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 0, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 40, + "forbidden": false, + "status": false + } + } + }, + "orig": { + "basic": { + "comment_id_str": "", + "comment_type": 0, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "" + }, + "id_str": "397711411815032345", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/e4f1466daf6e3173e8cab68eb4551589a09d4967.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/32172110/dynamic", + "label": "", + "mid": 32172110, + "name": "京阿尼语料", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "", + "pub_time": "", + "pub_ts": 1591437804, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1733500800000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "live": { + "badge": { + "bg_color": "#FB7299", + "color": "#ffffff", + "text": "直播中" + }, + "cover": "http://i0.hdslb.com/bfs/live/new_room_cover/d8ef7daa61f5f0fd6735d9f743ea9b1b6f941799.jpg", + "desc_first": "影音馆", + "desc_second": "344人看过", + "id": 22282848, + "jump_url": "https://live.bilibili.com/22282848?broadcast_type=0&is_room_feed=1&live_from=30112", + "live_state": 1, + "reserve_type": 0, + "title": "MAD赛道直播看稿【京后有你创作盛典】" + }, + "type": "MAJOR_TYPE_LIVE" + }, + "topic": null + } + }, + "type": "DYNAMIC_TYPE_LIVE", + "visible": true + }, + "type": "DYNAMIC_TYPE_FORWARD", + "visible": true + }, + { + "basic": { + "comment_id_str": "304574578", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "304574578" + }, + "id_str": "722803259048198146", + "modules": { + "module_author": { + "face": "https://archive.biliimg.com/bfs/archive/146462f875eb4e5f7d577c896f6150972a147275.jpg", + "face_nft": false, + "following": false, + "jump_url": "//www.bilibili.com/video/av304574578", + "label": "合集", + "mid": 304574578, + "name": "辐射系列", + "pub_action": "柯尔不短更新了合集", + "pub_time": "14分钟前", + "pub_ts": 1667129148, + "type": "AUTHOR_TYPE_UGC_SEASON" + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "type": "MAJOR_TYPE_UGC_SEASON", + "ugc_season": { + "aid": 304574578, + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "合集" + }, + "cover": "http://i2.hdslb.com/bfs/archive/ccd56a834f2ce77655ddde96f587db0e9cc313af.jpg", + "desc": "本期新增内容为:\n全新设计的比分显示牌,增加代入感的虚拟灯箱。\n陷阱机关可独立控制,优化陷阱的初始位置。\n\n历史战绩:\n变异狼 0胜0负0平\n灶马蟋蟀 0胜0负0平\n\n背景音乐:\nDeadwood - Zoso\nThunderbird - Ryan Taubert\n小林啓樹 - Daredevil\nCombat Ready\nWar in the Wastes\nRise and Prevail", + "disable_preview": 0, + "duration_text": "05:38", + "jump_url": "//www.bilibili.com/video/BV18P411P7CD", + "stat": { + "danmaku": "113", + "play": "1267" + }, + "title": "【辐射斗兽场】变异狼 VS 灶马蟋蟀" + } + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 28, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 270, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_UGC_SEASON", + "visible": true + }, + { + "basic": { + "comment_id_str": "902123597", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "902123597" + }, + "id_str": "722803241881960456", + "modules": { + "module_author": { + "face": "https://i1.hdslb.com/bfs/face/1a6152f261f4141e3be72c7b3056739c9f794774.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/485118280/dynamic", + "label": "", + "mid": 485118280, + "name": "中华田园犬逆袭", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "14分钟前", + "pub_ts": 1667129144, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 0, + "avatar_subscript_url": "", + "due_date": 1605369600000, + "label": { + "bg_color": "", + "bg_style": 0, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png", + "label_theme": "", + "path": "", + "text": "", + "text_color": "", + "use_img_label": true + }, + "nickname_color": "", + "status": 0, + "theme_type": 0, + "type": 1 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "902123597", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1hP4y1m7en", + "cover": "http://i0.hdslb.com/bfs/archive/d324a9c21a019ce6880b3944fa577a0993504616.jpg", + "desc": "-", + "disable_preview": 0, + "duration_text": "00:30", + "jump_url": "//www.bilibili.com/video/BV1hP4y1m7en", + "stat": { + "danmaku": "0", + "play": "1" + }, + "title": "双金钱尾白色土松狮,公的,8斤左右", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 0, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 2, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "859536670", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "859536670" + }, + "id_str": "722802855343292440", + "modules": { + "module_author": { + "face": "https://i1.hdslb.com/bfs/face/1a6152f261f4141e3be72c7b3056739c9f794774.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/485118280/dynamic", + "label": "", + "mid": 485118280, + "name": "中华田园犬逆袭", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "15分钟前", + "pub_ts": 1667129054, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 0, + "avatar_subscript_url": "", + "due_date": 1605369600000, + "label": { + "bg_color": "", + "bg_style": 0, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png", + "label_theme": "", + "path": "", + "text": "", + "text_color": "", + "use_img_label": true + }, + "nickname_color": "", + "status": 0, + "theme_type": 0, + "type": 1 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "859536670", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1dV4y1G7pe", + "cover": "http://i2.hdslb.com/bfs/archive/686bbbc47ccd2dad320905fc6bfcc716dead26a5.jpg", + "desc": "-", + "disable_preview": 0, + "duration_text": "00:30", + "jump_url": "//www.bilibili.com/video/BV1dV4y1G7pe", + "stat": { + "danmaku": "0", + "play": "5" + }, + "title": "土松狮小美女,50天6斤左右", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 0, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 4, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "210801533", + "comment_type": 11, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "210801533" + }, + "id_str": "722802047870566501", + "modules": { + "module_author": { + "decorate": { + "card_url": "http://i0.hdslb.com/bfs/garb/item/8b043b53c394265e6ce1dfb9a04ebd0b99ef4f79.png", + "fan": { + "color": "#ff669c", + "is_fan": true, + "num_str": "020617", + "number": 20617 + }, + "id": 3772, + "jump_url": "https://www.bilibili.com/h5/mall/fans/recommend/3796?navhide=1&mid=18940485&from=dynamic&isdiy=0", + "name": "神乐七奈粉丝专属", + "type": 3 + }, + "face": "https://i0.hdslb.com/bfs/face/0f6f0f4048e58dbd1a26e4ac6b087997ef2f7653.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/18940485/dynamic", + "label": "", + "mid": 18940485, + "name": "RakusandoYuna", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "https://i0.hdslb.com/bfs/garb/item/2262a0864cb0f3e39bb77e00298f8312318311c4.png", + "image_enhance": "https://i0.hdslb.com/bfs/garb/item/2262a0864cb0f3e39bb77e00298f8312318311c4.png", + "image_enhance_frame": "", + "name": "神乐七奈", + "pid": 3771 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "18分钟前", + "pub_ts": 1667128866, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1718467200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "尝试一天肝完了沙漠,挺累的。。。唉:-(", + "text": "尝试一天肝完了沙漠,挺累的。。。唉:-(", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "尝试一天肝完了沙漠,挺累的。。。唉:-(" + }, + "major": { + "draw": { + "id": 210801533, + "items": [ + { + "height": 949, + "size": 84.36, + "src": "https://i0.hdslb.com/bfs/new_dyn/b403ce65cd0618b7efedbb5c421da7c318940485.jpg", + "tags": [], + "width": 1213 + } + ] + }, + "type": "MAJOR_TYPE_DRAW" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 1, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 6, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_DRAW", + "visible": true + }, + { + "basic": { + "comment_id_str": "722801957680447506", + "comment_type": 17, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "722801957734973460" + }, + "id_str": "722801957680447506", + "modules": { + "module_author": { + "face": "https://i0.hdslb.com/bfs/face/d7c4e2618aba8cc8d26d975274ca82de46c0e6c7.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/700634784/dynamic", + "label": "", + "mid": 700634784, + "name": "飓风商店MediaStore", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "19分钟前", + "pub_ts": 1667128845, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1678896000000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "大家太热情了", + "text": "大家太热情了", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/485a7e0c01c2d70707daae53bee4a9e2e31ef1ed.png", + "size": 1, + "text": "[喜极而泣]", + "type": 1 + }, + "orig_text": "[喜极而泣]", + "text": "[喜极而泣]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "orig_text": "直接把第一批的备货干空了,现在上了第二批预售,15号开始付尾款,感兴趣的小伙伴可以去店里购买噢~", + "text": "直接把第一批的备货干空了,现在上了第二批预售,15号开始付尾款,感兴趣的小伙伴可以去店里购买噢~", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "大家太热情了[喜极而泣]直接把第一批的备货干空了,现在上了第二批预售,15号开始付尾款,感兴趣的小伙伴可以去店里购买噢~" + }, + "major": null, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 7, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 46, + "forbidden": false, + "status": false + } + } + }, + "orig": { + "basic": { + "comment_id_str": "", + "comment_type": 0, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "" + }, + "id_str": "721652435448234212", + "modules": { + "module_author": { + "face": "https://i0.hdslb.com/bfs/face/d7c4e2618aba8cc8d26d975274ca82de46c0e6c7.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/700634784/dynamic", + "label": "", + "mid": 700634784, + "name": "飓风商店MediaStore", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_time": "", + "pub_ts": 1666861201, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1678896000000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "它终于来了!", + "text": "它终于来了!", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "它终于来了!" + }, + "major": { + "archive": { + "aid": "689382529", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1Sm4y1w7Pv", + "cover": "http://i0.hdslb.com/bfs/archive/aeda1caf342fe4d9200831f05bc6289d04d9c93d.jpg", + "desc": "iPad保护壳还有什么可能?又又又花一年磨一个产品,让你的iPad mini不只是泡面盖~\n预售已开启,感兴趣的同学可以手淘搜索【影视飓风】查看更多信息!", + "disable_preview": 0, + "duration_text": "01:05", + "jump_url": "//www.bilibili.com/video/BV1Sm4y1w7Pv", + "stat": { + "danmaku": "83", + "play": "13.2万" + }, + "title": "可能是iPad mini最佳拍档?平移拓展保护壳发布!", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + "type": "DYNAMIC_TYPE_FORWARD", + "visible": true + }, + { + "basic": { + "comment_id_str": "517103418", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "517103418" + }, + "id_str": "722800763675344953", + "modules": { + "module_author": { + "face": "https://i0.hdslb.com/bfs/face/f4d39ce4c3a5a306de2e5bb51fcae9a6c4f95215.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/29440965/dynamic", + "label": "", + "mid": 29440965, + "name": "超级小桀的日常", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "23分钟前", + "pub_ts": 1667128567, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1718208000000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "jump_url": "//search.bilibili.com/all?keyword=%2374751%23", + "orig_text": "#74751#", + "text": "#74751#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E8%B6%85%E7%BA%A7%E5%B0%8F%E6%A1%80%23", + "orig_text": "#超级小桀#", + "text": "#超级小桀#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E5%8D%95%E6%9C%BA%E6%B8%B8%E6%88%8F%23", + "orig_text": "#单机游戏#", + "text": "#单机游戏#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E8%B6%85%E7%BA%A7%E9%A9%AC%E9%87%8C%E5%A5%A5%E5%88%B6%E9%80%A02%23", + "orig_text": "#超级马里奥制造2#", + "text": "#超级马里奥制造2#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + } + ], + "text": "#74751##超级小桀##单机游戏##超级马里奥制造2#" + }, + "major": { + "archive": { + "aid": "517103418", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1wg41167M7", + "cover": "http://i2.hdslb.com/bfs/archive/1345ac18a6d41b26f5713669ac67ec1ad999acd4.png", + "desc": "相关游戏: 马里奥制造2\n简介补充: 超级小桀2022年10月30日直播录像", + "disable_preview": 0, + "duration_text": "4:31:43", + "jump_url": "//www.bilibili.com/video/BV1wg41167M7", + "stat": { + "danmaku": "6", + "play": "2384" + }, + "title": "【超级小桀】2022年10月30日直播录像", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 10, + "forbidden": false + }, + "forward": { + "count": 1, + "forbidden": false + }, + "like": { + "count": 440, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "559611166", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "559611166" + }, + "id_str": "722800493104988181", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/86fbb87fdf4d5ec1ba3bb7b56131d8265d36ffcd.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/8263502/dynamic", + "label": "", + "mid": 8263502, + "name": "橙飞一下", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "24分钟前", + "pub_ts": 1667128504, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1696003200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "小火锅自助【官客旋转小火锅,天津,南开区,西南角,火锅,自助餐】", + "text": "小火锅自助【官客旋转小火锅,天津,南开区,西南角,火锅,自助餐】", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "小火锅自助【官客旋转小火锅,天津,南开区,西南角,火锅,自助餐】" + }, + "major": { + "archive": { + "aid": "559611166", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1De4y127gB", + "cover": "http://i1.hdslb.com/bfs/archive/d4369b1167ce3cf8020d96b747e5b3abf378f08e.jpg", + "desc": "店名:官客·自助旋转小火锅;\n地址:天津南开区南开五马路与广开中街交口\n(近西南角地铁站);\n价格:29元;\n\n标准的旋转小火锅自助,没有肉类,菜品干净,麻酱味道可以。菜品穿了签子,不是用夹子的。\n下午也营业,适合近的人来尝尝。", + "disable_preview": 0, + "duration_text": "08:20", + "jump_url": "//www.bilibili.com/video/BV1De4y127gB", + "stat": { + "danmaku": "84", + "play": "1.3万" + }, + "title": "简简单单吃个小火锅,银耳好好吃!天津西南角旋转小火锅29元一位", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_interaction": { + "items": [ + { + "desc": { + "rich_text_nodes": [ + { + "orig_text": "daitouemabi:", + "rid": "346339495", + "text": "daitouemabi:", + "type": "RICH_TEXT_NODE_TYPE_AT" + }, + { + "orig_text": "对于我这种一顿张亮四十多的人来说任何自助小火锅都是划算的", + "text": "对于我这种一顿张亮四十多的人来说任何自助小火锅都是划算的", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "对于我这种一顿张亮四十多的人来说任何自助小火锅都是划算的" + }, + "type": 1 + } + ] + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 125, + "forbidden": false + }, + "forward": { + "count": 10, + "forbidden": false + }, + "like": { + "count": 1274, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "304540547", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "304540547" + }, + "id_str": "722800475917779008", + "modules": { + "module_author": { + "decorate": { + "card_url": "http://i0.hdslb.com/bfs/vip/f11e84bd3da5902ea912145cd7cb3d54c04c3c27.png", + "fan": { + "color": "", + "is_fan": false, + "num_str": "", + "number": 0 + }, + "id": 6, + "jump_url": "https://www.bilibili.com/h5/mall/preview/feed/6?navhide=1&isdiy=0", + "name": "喂看见耳朵啦", + "type": 2 + }, + "face": "https://i2.hdslb.com/bfs/face/d20e0d85266199514a582a692e5c6b37633a7eeb.jpg", + "face_nft": false, + "following": true, + "jump_url": "//space.bilibili.com/8931689/dynamic", + "label": "", + "mid": 8931689, + "name": "桔子味的天", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "与他人联合创作", + "pub_location_text": "", + "pub_time": "24分钟前", + "pub_ts": 1667128500, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1674576000000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "304540547", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "合作视频" + }, + "bvid": "BV1EP411P7Hm", + "cover": "http://i2.hdslb.com/bfs/archive/d6589e112d3d0c26282dfd83be38df1e59a1f67c.jpg", + "desc": "啊是宁波女仆", + "disable_preview": 0, + "duration_text": "00:24", + "jump_url": "//www.bilibili.com/video/BV1EP411P7Hm", + "stat": { + "danmaku": "0", + "play": "338" + }, + "title": "凯申口音の女仆装", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "取消关注", + "type": "THREE_POINT_FOLLOWING" + }, + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 4, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 101, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "219580392", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "219580392" + }, + "id_str": "722799788730351736", + "modules": { + "module_author": { + "face": "https://archive.biliimg.com/bfs/archive/1d720064ed34ba4c19326a77b17a9404351c3a8d.jpg", + "face_nft": false, + "following": false, + "jump_url": "//www.bilibili.com/video/av219580392", + "label": "合集", + "mid": 219580392, + "name": "纪录片《流言终结者》", + "pub_action": "探索哥t更新了合集", + "pub_time": "27分钟前", + "pub_ts": 1667128340, + "type": "AUTHOR_TYPE_UGC_SEASON" + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "type": "MAJOR_TYPE_UGC_SEASON", + "ugc_season": { + "aid": 219580392, + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "合集" + }, + "cover": "http://i0.hdslb.com/bfs/archive/b94c2e41853f2f2e3a57023a39b8837c8810456b.jpg", + "desc": "安全气囊爆炸可能使人爆头?", + "disable_preview": 0, + "duration_text": "02:32", + "jump_url": "//www.bilibili.com/video/BV1j8411Y7Fi", + "stat": { + "danmaku": "0", + "play": "85" + }, + "title": "流言终结者:安全气囊爆炸可能使人爆头?" + } + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 0, + "forbidden": false + }, + "forward": { + "count": 0, + "forbidden": false + }, + "like": { + "count": 12, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_UGC_SEASON", + "visible": true + } + ], + "offset": "722799788730351736", + "update_baseline": "722806776626413588", + "update_num": 1 + } +} +``` + +
\ No newline at end of file diff --git a/dynamic/detail.md b/dynamic/detail.md new file mode 100644 index 0000000..6f7da04 --- /dev/null +++ b/dynamic/detail.md @@ -0,0 +1,269 @@ +# 获取动态详情 + +> https://api.bilibili.com/x/polymer/web-dynamic/v1/detail + +请求方式:`GET` + +是否需要登录:`否` + +## URL参数 + +| 参数名 | 类型 | 必填 | 内容 | 备注 | +|-----------------|-----|-----|--------|-----| +| timezone_offset | num | | `-480` | | +| id | num | √ | 动态id | | + +## Json回复 + +### 根对象 + +| 字段名 | 类型 | 内容 | 备注 | +|---------|-----|------|--------------------------| +| code | num | 响应码 | 0:成功
4101139:4101139 | +| message | str | | | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +### `data`对象 + +| 字段名 | 类型 | 内容 | 备注 | +|------|-----|-----|-----| +| item | obj | | | + +### `data`对象 -> `item`对象 + +参照 [获取动态列表](./all.md#获取动态列表) + +## 请求示例 + +```shell +curl -L -X GET 'https://api.bilibili.com/x/polymer/web-dynamic/v1/detail?id=724328028268658744' +``` + +## 响应示例 + +
+点击查看 + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "item": { + "basic": { + "comment_id_str": "724328028268658744", + "comment_type": 17, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "724328032624443401" + }, + "id_str": "724328028268658744", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/876bf5dfa8c583acb5f8689fc923077f6a2aba23.jpg", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/11357018/dynamic", + "label": "", + "mid": 11357018, + "name": "动画魂-Anitama", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "2022-11-03 22:02", + "pub_ts": 1667484162, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1685808000000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "恭喜 @羽希plume @晕乎菌 中奖,已私信联系。——全天加码放水,红包力度很大,打开手淘搜“我爱你红包”,红包每天可以领,积少成多。 ——明天早上9点开另外一则抽奖,有打扰请多保函。\n", + "text": "恭喜 @羽希plume @晕乎菌 中奖,已私信联系。——全天加码放水,红包力度很大,打开手淘搜“我爱你红包”,红包每天可以领,积少成多。 ——明天早上9点开另外一则抽奖,有打扰请多保函。\n", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "恭喜 @羽希plume @晕乎菌 中奖,已私信联系。——全天加码放水,红包力度很大,打开手淘搜“我爱你红包”,红包每天可以领,积少成多。 ——明天早上9点开另外一则抽奖,有打扰请多保函。\n" + }, + "major": null, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 5, + "forbidden": false + }, + "forward": { + "count": 1, + "forbidden": false + }, + "like": { + "count": 170, + "forbidden": false, + "status": false + } + } + }, + "orig": { + "basic": { + "comment_id_str": "", + "comment_type": 0, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "" + }, + "id_str": "720590749615259664", + "modules": { + "module_author": { + "face": "https://i2.hdslb.com/bfs/face/876bf5dfa8c583acb5f8689fc923077f6a2aba23.jpg", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/11357018/dynamic", + "label": "", + "mid": 11357018, + "name": "动画魂-Anitama", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "", + "pub_time": "", + "pub_ts": 1666614008, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1685808000000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "​双11天猫红包,超大力度提前发放\n活动很猛,红包很大,加额加量!\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n最高可领取28888元\n\n一天可领3次,今天红包额度最大\n越早领取得现金概率越大!\n抽奖=转发+关注", + "text": "​双11天猫红包,超大力度提前发放\n活动很猛,红包很大,加额加量!\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n最高可领取28888元\n\n一天可领3次,今天红包额度最大\n越早领取得现金概率越大!\n抽奖=转发+关注", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E4%BA%92%E5%8A%A8%E6%8A%BD%E5%A5%96%23", + "orig_text": "#互动抽奖#", + "text": "#互动抽奖#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "orig_text": "\n转+评,留言你领到多少红包\n评论区随机抽取2位,每人补贴50零花钱 ", + "text": "\n转+评,留言你领到多少红包\n评论区随机抽取2位,每人补贴50零花钱 ", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "​双11天猫红包,超大力度提前发放\n活动很猛,红包很大,加额加量!\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n打开手淘搜“我爱你红包”\n最高可领取28888元\n\n一天可领3次,今天红包额度最大\n越早领取得现金概率越大!\n抽奖=转发+关注#互动抽奖#\n转+评,留言你领到多少红包\n评论区随机抽取2位,每人补贴50零花钱 " + }, + "major": { + "draw": { + "id": 210334026, + "items": [ + { + "height": 672, + "size": 134.85938, + "src": "https://i0.hdslb.com/bfs/new_dyn/37c21f8864e47cbeeb7c3e3a66bb250b11357018.jpg", + "tags": [], + "width": 576 + } + ] + }, + "type": "MAJOR_TYPE_DRAW" + }, + "topic": null + } + }, + "type": "DYNAMIC_TYPE_DRAW", + "visible": true + }, + "type": "DYNAMIC_TYPE_FORWARD", + "visible": true + } + } +} +``` + +
\ No newline at end of file diff --git a/dynamic/dynamic_enum.md b/dynamic/dynamic_enum.md new file mode 100644 index 0000000..b204ce6 --- /dev/null +++ b/dynamic/dynamic_enum.md @@ -0,0 +1,220 @@ +# 动态类型 + +| 类型 | 说明 | 示例 | +|-------------------------------|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| DYNAMIC_TYPE_NONE | 无效动态 | [716510857084796964](https://t.bilibili.com/716510857084796964) | +| DYNAMIC_TYPE_FORWARD | 动态转发 | | +| DYNAMIC_TYPE_AV | 投稿视频 | | +| DYNAMIC_TYPE_PGC | 剧集(番剧、电影、纪录片) | | +| DYNAMIC_TYPE_COURSES | | | +| DYNAMIC_TYPE_WORD | 纯文字动态 | [718377531474968613](https://t.bilibili.com/718377531474968613) | +| DYNAMIC_TYPE_DRAW | 带图动态 | [718384798557536290](https://t.bilibili.com/718384798557536290) | +| DYNAMIC_TYPE_ARTICLE | 投稿专栏 | [718372214316990512](https://t.bilibili.com/718372214316990512) | +| DYNAMIC_TYPE_MUSIC | 音乐 | | +| DYNAMIC_TYPE_COMMON_SQUARE | 装扮
剧集点评
普通分享 | [551309621391003098](https://t.bilibili.com/551309621391003098)
[716503778995470375](https://t.bilibili.com/716503778995470375)
[716481612656672789](https://t.bilibili.com/716481612656672789) | +| DYNAMIC_TYPE_COMMON_VERTICAL | | | +| DYNAMIC_TYPE_LIVE | 直播间分享 | [216042859353895488](https://t.bilibili.com/216042859353895488) | +| DYNAMIC_TYPE_MEDIALIST | 收藏夹 | [534428265320147158](https://t.bilibili.com/534428265320147158) | +| DYNAMIC_TYPE_COURSES_SEASON | 课程 | [717906712866062340](https://t.bilibili.com/717906712866062340) | +| DYNAMIC_TYPE_COURSES_BATCH | | | +| DYNAMIC_TYPE_AD | | | +| DYNAMIC_TYPE_APPLET | | | +| DYNAMIC_TYPE_SUBSCRIPTION | | | +| DYNAMIC_TYPE_LIVE_RCMD | 直播开播 | [718371505648435205](https://t.bilibili.com/718371505648435205) | +| DYNAMIC_TYPE_BANNER | | | +| DYNAMIC_TYPE_UGC_SEASON | 合集更新 | [718390979031203873](https://t.bilibili.com/718390979031203873) | +| DYNAMIC_TYPE_SUBSCRIPTION_NEW | | | + +# 富文本节点类型 + +| 类型 | 说明 | 示例 | +|---------------------------------|------|-----------------------------------------------------------------| +| RICH_TEXT_NODE_TYPE_NONE | | | +| RICH_TEXT_NODE_TYPE_TEXT | 文字节点 | [721295772787671059](https://t.bilibili.com/721295772787671059) | +| RICH_TEXT_NODE_TYPE_AT | @用户 | [721296515797090324](https://t.bilibili.com/721296515797090324) | +| RICH_TEXT_NODE_TYPE_LOTTERY | 互动抽奖 | [720907383182721040](https://t.bilibili.com/720907383182721040) | +| RICH_TEXT_NODE_TYPE_VOTE | 投票 | [721203899129659408](https://t.bilibili.com/721203899129659408) | +| RICH_TEXT_NODE_TYPE_TOPIC | 话题 | [721188862459641879](https://t.bilibili.com/721188862459641879) | +| RICH_TEXT_NODE_TYPE_GOODS | 商品链接 | [721282703208480790](https://t.bilibili.com/721282703208480790) | +| RICH_TEXT_NODE_TYPE_BV | 视频链接 | [716752002311258165](https://t.bilibili.com/716752002311258165) | +| RICH_TEXT_NODE_TYPE_AV | | | +| RICH_TEXT_NODE_TYPE_EMOJI | 表情 | [716751108968546393](https://t.bilibili.com/716751108968546393) | +| RICH_TEXT_NODE_TYPE_USER | | | +| RICH_TEXT_NODE_TYPE_CV | | | +| RICH_TEXT_NODE_TYPE_VC | | | +| RICH_TEXT_NODE_TYPE_WEB | 网页链接 | [716751027361022055](https://t.bilibili.com/716751027361022055) | +| RICH_TEXT_NODE_TYPE_TAOBAO | | | +| RICH_TEXT_NODE_TYPE_MAIL | 邮箱地址 | [721314095109767220](https://t.bilibili.com/721314095109767220) | +| RICH_TEXT_NODE_TYPE_OGV_SEASON | 剧集信息 | [721282046064853080](https://t.bilibili.com/721282046064853080) | +| RICH_TEXT_NODE_TYPE_OGV_EP | | | +| RICH_TEXT_NODE_TYPE_SEARCH_WORD | | | + +# 作者类型 + +| 类型 | 说明 | 示例 | +|------------------------|------|-----| +| AUTHOR_TYPE_NONE | | | +| AUTHOR_TYPE_NORMAL | 普通更新 | | +| AUTHOR_TYPE_PGC | 剧集更新 | | +| AUTHOR_TYPE_UGC_SEASON | 合集更新 | | + +| 类型 | 说明 | 示例 | +|-----------------|-----|-----| +| EMOJI_TYPE_NONE | | | +| EMOJI_TYPE_OLD | | | +| EMOJI_TYPE_NEW | | | +| EMOJI_TYPE_VIP | | | + +# 相关内容卡片类型 + +| 类型 | 说明 | 示例 | +|-------------------------|------|--------------------------------------------------------------------------| +| ADDITIONAL_TYPE_NONE | | | +| ADDITIONAL_TYPE_PGC | | | +| ADDITIONAL_TYPE_GOODS | 商品信息 | | +| ADDITIONAL_TYPE_VOTE | 投票 | [716365292050055176](https://t.bilibili.com/716365292050055176) | +| ADDITIONAL_TYPE_COMMON | 一般类型 | 游戏
[716357878942793745](https://t.bilibili.com/716357878942793745) | +| ADDITIONAL_TYPE_MATCH | | | +| ADDITIONAL_TYPE_UP_RCMD | | | +| ADDITIONAL_TYPE_UGC | 视频跳转 | [716489253410832401](https://t.bilibili.com/716489253410832401) | +| ADDITIONAL_TYPE_RESERVE | | 直播预约
[716524987542929443](https://t.bilibili.com/716524987542929443) | + +| 类型 | 说明 | 示例 | +|-------------------------------|-----|-----| +| ADDITIONAL_BUTTON_TYPE_NONE | | | +| ADDITIONAL_BUTTON_TYPE_JUMP | | | +| ADDITIONAL_BUTTON_TYPE_BUTTON | | | + +| 类型 | 说明 | 示例 | +|----------------------------------|-----|-----| +| ADDITIONAL_BUTTON_STATUS_NONE | | | +| ADDITIONAL_BUTTON_STATUS_UNCHECK | | | +| ADDITIONAL_BUTTON_STATUS_CHECK | | | + +| 类型 | 说明 | 示例 | +|-------------------------------|-----|-----| +| ADD_BUTTON_CLICK_TYPE_NONE | | | +| ADD_BUTTON_CLICK_TYPE_RESERVE | | | + +| 类型 | 说明 | 示例 | +|-------------------------|-----|-----| +| DISABLE_STATE_HIGHLIGHT | | | +| DISABLE_STATE_GRAY | | | + +| 类型 | 说明 | 示例 | +|----------------------------|-----|-----| +| ADD_BUTTON_BG_STYLE_FILL | | | +| ADD_BUTTON_BG_STYLE_STROKE | | | +| ADD_BUTTON_BG_STYLE_GRAY | | | + +| 类型 | 说明 | 示例 | +|----------------------------------|-----|-----| +| HIGHLIGHT_TEXT_STYLE_TYPE_NONE | | | +| HIGHLIGHT_TEXT_STYLE_TYPE_ACTIVE | | | + +# 动态主体类型 + +| 类型 | 说明 | 示例 | +|-----------------------------|-------|-----------------------------------------------------------------| +| MAJOR_TYPE_NONE | 动态失效 | [716510857084796964](https://t.bilibili.com/716510857084796964) | +| MAJOR_TYPE_ARCHIVE | 视频 | [716526237365829703](https://t.bilibili.com/716526237365829703) | +| MAJOR_TYPE_PGC | 剧集更新 | [645981661420322824](https://t.bilibili.com/645981661420322824) | +| MAJOR_TYPE_COURSES | | | +| MAJOR_TYPE_DRAW | 带图动态 | [716358050743582725](https://t.bilibili.com/716358050743582725) | +| MAJOR_TYPE_ARTICLE | | | +| MAJOR_TYPE_MUSIC | 音频更新 | | +| MAJOR_TYPE_COMMON | 一般类型 | [716481612656672789](https://t.bilibili.com/716481612656672789) | +| MAJOR_TYPE_LIVE | 直播间分享 | [267505569812738175](https://t.bilibili.com/267505569812738175) | +| MAJOR_TYPE_MEDIALIST | | | +| MAJOR_TYPE_APPLET | | | +| MAJOR_TYPE_SUBSCRIPTION | | | +| MAJOR_TYPE_LIVE_RCMD | 直播状态 | | +| MAJOR_TYPE_UGC_SEASON | 合计更新 | [716509100448415814](https://t.bilibili.com/716509100448415814) | +| MAJOR_TYPE_SUBSCRIPTION_NEW | | | + +| 类型 | 说明 | 示例 | +|-----------------|-----|-----| +| MEDIA_TYPE_NONE | | | +| MEDIA_TYPE_UGC | | | +| MEDIA_TYPE_PGC | | | +| MEDIA_TYPE_LIVE | | | + +| 类型 | 说明 | 示例 | +|--------------------------|-----|-----| +| PGC_SUB_TYPE_NONE | | | +| PGC_SUB_TYPE_BANGUMI | | | +| PGC_SUB_TYPE_MOVIE | | | +| PGC_SUB_TYPE_DOCUMENTARY | | | +| PGC_SUB_TYPE_DOMESTIC | | | +| PGC_SUB_TYPE_TV | | | + +| 类型 | 说明 | 示例 | +|----------------------|-----|-----| +| DRAW_TAG_TYPE_NONE | | | +| DRAW_TAG_TYPE_COMMON | | | +| DRAW_TAG_TYPE_GOODS | | | +| DRAW_TAG_TYPE_USER | | | +| DRAW_TAG_TYPE_TOPIC | | | +| DRAW_TAG_TYPE_LBS | | | + +| 类型 | 说明 | 示例 | +|----------------------------------|-----|-----| +| MAJOR_COMMON_STYLE_TYPE_NONE | | | +| MAJOR_COMMON_STYLE_TYPE_SQUARE | | | +| MAJOR_COMMON_STYLE_TYPE_VERTICAL | | | + +| 类型 | 说明 | 示例 | +|---------------------|-----|-----| +| RESERVE_TYPE_NONE | | | +| RESERVE_TYPE_RECALL | | | + +| 类型 | 说明 | 示例 | +|--------------------------|-----|-----| +| LIVE_STATE_TYPE_NONE | | | +| LIVE_STATE_TYPE_LIVE | | | +| LIVE_STATE_TYPE_ROTATION | | | + +| 类型 | 说明 | 示例 | +|----------------------------------|-----|-----| +| SUBSCRIPTION_NEW_STYLE_TYPE_NONE | | | +| SUBSCRIPTION_NEW_STYLE_TYPE_DRAW | | | +| SUBSCRIPTION_NEW_STYLE_TYPE_LIVE | | | + +| 类型 | 说明 | 示例 | +|------------------------------|---------|-----| +| THREE_POINT_DELETE | 删除 | | +| THREE_POINT_REPORT | 举报 | | +| THREE_POINT_FOLLOWING | 关注/取消关注 | | +| THREE_POINT_TOP | 置顶/取消置顶 | | +| THREE_POINT_UNFAV | | | +| THREE_POINT_UNSUBS | | | +| THREE_POINT_TOPIC_REPORT | | | +| THREE_POINT_TOPIC_IRRELEVANT | | | +| THREE_POINT_RCMD_RESOURCE | | | +| THREE_POINT_RCMD_FEEDBACK | | | + +| 类型 | 说明 | 示例 | +|--------------------|-----|-----| +| FOLD_TYPE_NONE | | | +| FOLD_TYPE_PUBLISH | | | +| FOLD_TYPE_FREQUENT | | | +| FOLD_TYPE_UNITE | | | +| FOLD_TYPE_LIMIT | | | + +| 类型 | 说明 | 示例 | +|------------------------------|-----|-----| +| DYN_STATUS_TYPE_NONE | | | +| DYN_STATUS_TYPE_NORMAL | | | +| DYN_STATUS_TYPE_AUDITING | | | +| DYN_STATUS_TYPE_SELF_VISIBLE | | | +| DYN_STATUS_TYPE_DELETED | | | + +| 类型 | 说明 | 示例 | +|---------------|-----|-----| +| SCENE_DETAIL | | | +| SCENE_HOT | | | +| SCENE_GENERAL | | | +| SCENE_SPACE | | | +| SCENE_TOPIC | | | + + diff --git a/dynamic/space.md b/dynamic/space.md new file mode 100644 index 0000000..c801efb --- /dev/null +++ b/dynamic/space.md @@ -0,0 +1,1142 @@ +# 获取用户空间动态 + +> 接口URL + +请求方式:`GET` + +是否需要登录:`否` + +## URL参数 + +| 参数名 | 类型 | 必填 | 内容 | 备注 | +|-----------------|-----|-----|--------|-----| +| offset | str | | 分页偏移量 | | +| host_mid | str | √ | 用户UID | | +| timezone_offset | num | | `-480` | | + +## Json回复 + +参照 [获取动态列表](./all.md#获取动态列表) + +## 请求示例 + +```shell +curl -L -X GET 'https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/space?host_mid=1' +``` + +## 响应示例 + +
+点击查看 + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "has_more": false, + "items": [ + { + "basic": { + "comment_id_str": "463864834570585963", + "comment_type": 17, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "463864834566075427" + }, + "id_str": "463864834570585963", + "modules": { + "module_author": { + "face": "http://i0.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/1/dynamic", + "label": "", + "mid": 1, + "name": "bishi", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "2020-12-02", + "pub_ts": 1606840348, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1816099200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "好家伙", + "text": "好家伙", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "好家伙" + }, + "major": null, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 979, + "forbidden": false + }, + "forward": { + "count": 81, + "forbidden": false + }, + "like": { + "count": 7694, + "forbidden": false, + "status": false + } + } + }, + "orig": { + "basic": { + "comment_id_str": "", + "comment_type": 0, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "" + }, + "id_str": "459720423056997502", + "modules": { + "module_author": { + "decorate": { + "card_url": "http://i0.hdslb.com/bfs/garb/item/3fc3f5914f0bcbefac9e9fa96aec454cf347287a.png", + "fan": { + "color": "#ec3d3d", + "is_fan": true, + "num_str": "004156", + "number": 4156 + }, + "id": 1418, + "jump_url": "https://www.bilibili.com/h5/mall/fans/recommend/1431?navhide=1&mid=249608727&from=dynamic&isdiy=0", + "name": "2020拜年祭粉丝专属", + "type": 3 + }, + "face": "https://i0.hdslb.com/bfs/face/e422a095e58305218e2745714ceb4c9754e752a7.jpg", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/249608727/dynamic", + "label": "", + "mid": 249608727, + "name": "杨可爱Ukulele", + "official_verify": { + "desc": "全民音乐UP主年度30强", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "https://i0.hdslb.com/bfs/face/c93e1eeb77b1bb0753eff243d49c006bf18d69c5.png", + "image_enhance": "https://i0.hdslb.com/bfs/face/c93e1eeb77b1bb0753eff243d49c006bf18d69c5.png", + "image_enhance_frame": "", + "name": "梦塔·雪谜城", + "pid": 299 + }, + "pub_action": "投稿了视频", + "pub_time": "", + "pub_ts": 1605875402, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1793462400000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E9%87%91%E7%A7%8B%E9%9F%B3%E4%B9%90%E5%AD%A3%23", + "orig_text": "#金秋音乐季#", + "text": "#金秋音乐季#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "orig_text": "\n大家推荐给我很多神曲 一直没机会做\n这不\n杨同学带着《酒醉的蝴蝶》《爱河》《黑人抬棺》《最炫民族风》..等10余位选手来了\n改编成中国风之后 好像 有点 串味儿了\n大家三连之后再细细观看可好?", + "text": "\n大家推荐给我很多神曲 一直没机会做\n这不\n杨同学带着《酒醉的蝴蝶》《爱河》《黑人抬棺》《最炫民族风》..等10余位选手来了\n改编成中国风之后 好像 有点 串味儿了\n大家三连之后再细细观看可好?", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "#金秋音乐季#\n大家推荐给我很多神曲 一直没机会做\n这不\n杨同学带着《酒醉的蝴蝶》《爱河》《黑人抬棺》《最炫民族风》..等10余位选手来了\n改编成中国风之后 好像 有点 串味儿了\n大家三连之后再细细观看可好?" + }, + "major": { + "archive": { + "aid": "970285943", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV12p4y167Kq", + "cover": "http://i0.hdslb.com/bfs/archive/20c86c66df71770a7a91cc0871b455d1c582094b.jpg", + "desc": "大家好,今天想要跟大家分享我的快乐源泉,以及去KTV的必点神曲\n大家如果觉得十首看了还不过瘾的话\n这样\n点赞过十万 热评第一说出啥改编我就出啥 (前提是我做得来...\n\n(“土味”只是一个外号,它们其实不土,它们只是快乐的传递者\n 大部分的填词都是根据原版歌曲填哒,偶尔有些小发挥,大家当看娱乐视频就好啦)\n--------------------\n原唱:崔伟立、凤凰传奇、Vicetone&Tony Igy、神马乐团、筷子兄弟、慕容晓晓、李佳璐\n改编编曲/演唱/尤克里里:杨可爱\n改编填词:不迟等\n混音:", + "disable_preview": 0, + "duration_text": "06:12", + "jump_url": "//www.bilibili.com/video/BV12p4y167Kq", + "stat": { + "danmaku": "3519", + "play": "153万" + }, + "title": "没内味儿?我把十五年最火的10首土味神曲做成了一首中国风..", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + "type": "DYNAMIC_TYPE_FORWARD", + "visible": true + }, + { + "basic": { + "comment_id_str": "269459814293507419", + "comment_type": 17, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "269459814290043403" + }, + "id_str": "269459814293507419", + "modules": { + "module_author": { + "face": "http://i0.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/1/dynamic", + "label": "", + "mid": 1, + "name": "bishi", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "2019-06-27", + "pub_ts": 1561576902, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1816099200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "来一锄头!", + "text": "来一锄头!", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "来一锄头!" + }, + "major": null, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 1233, + "forbidden": false + }, + "forward": { + "count": 32, + "forbidden": false + }, + "like": { + "count": 8428, + "forbidden": false, + "status": false + } + } + }, + "orig": { + "basic": { + "comment_id_str": "", + "comment_type": 0, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "" + }, + "id_str": 4038269986840689, + "modules": { + "module_author": { + "face": "http://i0.hdslb.com/bfs/face/210cac322eb3a689f63f3a19d59ea641347c3c52.jpg", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/10410/dynamic", + "label": "", + "mid": 10410, + "name": "hotfloor", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_time": "", + "pub_ts": 1327584664, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1700150400000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "205419", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1bx411w7SF", + "cover": "http://i1.hdslb.com/bfs/archive/5607be9a736a426ae21e3e59fad664296f91df8e.png", + "desc": "原创 拖到今天才做完了……总之祝各位新年快乐,做这个只是为了感谢这一年陪伴我们的各种新番,与新番一起成长的UP主们,和浪费我们大半人生的bili,谢谢你们带给我们的欢笑和泪水,即使是世界末日也不会忘记…… PS.感谢哦拖拖帮忙取标题 下载:http://pan.baidu.com/s/1c0ImLva 密码:8xb4 原曲MV联动av210810 自己的MADlist-->mylist27438", + "disable_preview": 0, + "duration_text": "04:49", + "jump_url": "//www.bilibili.com/video/BV1bx411w7SF", + "stat": { + "danmaku": "2.4万", + "play": "54.6万" + }, + "title": "【MAD】[送给所有热爱bili的各位]干杯", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + "type": "DYNAMIC_TYPE_FORWARD", + "visible": true + }, + { + "basic": { + "comment_id_str": "26050777", + "comment_type": 11, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "26050777" + }, + "id_str": "269003035929570655", + "modules": { + "module_author": { + "face": "http://i0.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/1/dynamic", + "label": "", + "mid": 1, + "name": "bishi", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "2019-06-25", + "pub_ts": 1561470550, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1816099200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E5%B9%B2%E6%9D%AF%E5%8D%81%E5%91%A8%E5%B9%B4%23", + "orig_text": "#干杯十周年#", + "text": "#干杯十周年#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "orig_text": "Yo,My Friend,Nice to see you again.", + "text": "Yo,My Friend,Nice to see you again.", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "jump_url": "https://www.bilibili.com/blackboard/bilibili2009.html", + "orig_text": "https://www.bilibili.com/blackboard/bilibili2009.html", + "text": "网页链接", + "type": "RICH_TEXT_NODE_TYPE_WEB" + } + ], + "text": "#干杯十周年#Yo,My Friend,Nice to see you again.https://www.bilibili.com/blackboard/bilibili2009.html" + }, + "major": { + "draw": { + "id": 26050777, + "items": [ + { + "height": 1360, + "size": 500, + "src": "https://i0.hdslb.com/bfs/active/1ddb2cb9a1edb74ba7c4f0e15c1bbef9dc3ce548.jpg", + "tags": [], + "width": 935 + } + ] + }, + "type": "MAJOR_TYPE_DRAW" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 1515, + "forbidden": false + }, + "forward": { + "count": 214, + "forbidden": false + }, + "like": { + "count": 11041, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_DRAW", + "visible": true + }, + { + "basic": { + "comment_id_str": "264471510427272642", + "comment_type": 17, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "264471510424746690" + }, + "id_str": "264471510427272642", + "modules": { + "module_author": { + "face": "http://i0.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/1/dynamic", + "label": "", + "mid": 1, + "name": "bishi", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "", + "pub_location_text": "", + "pub_time": "2019-06-13", + "pub_ts": 1560415472, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1816099200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "圈错号了", + "text": "圈错号了", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/33ad6000d9f9f168a0976bc60937786f239e5d8c.png", + "size": 1, + "text": "[呆]", + "type": 1 + }, + "orig_text": "[呆]", + "text": "[呆]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "orig_text": "//", + "text": "//", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "orig_text": "@柴刀娘木木", + "rid": "9", + "text": "@柴刀娘木木", + "type": "RICH_TEXT_NODE_TYPE_AT" + }, + { + "orig_text": ":", + "text": ":", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "orig_text": "@bishi", + "rid": "1", + "text": "@bishi", + "type": "RICH_TEXT_NODE_TYPE_AT" + }, + { + "orig_text": "我来组成分母,测试欧气,我要是中了再抽人送出", + "text": "我来组成分母,测试欧气,我要是中了再抽人送出", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/6c49d226e76c42cd8002abc47b3112bc5a92f66a.png", + "size": 1, + "text": "[偷笑]", + "type": 1 + }, + "orig_text": "[偷笑]", + "text": "[偷笑]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + } + ], + "text": "圈错号了[呆]//@柴刀娘木木:@bishi我来组成分母,测试欧气,我要是中了再抽人送出[偷笑]" + }, + "major": null, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 1013, + "forbidden": false + }, + "forward": { + "count": 109, + "forbidden": false + }, + "like": { + "count": 4751, + "forbidden": false, + "status": false + } + } + }, + "orig": { + "basic": { + "comment_id_str": "", + "comment_type": 0, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "" + }, + "id_str": "264180341709040397", + "modules": { + "module_author": { + "decorate": { + "card_url": "http://i0.hdslb.com/bfs/garb/item/fe745063c05881face209a772d17bb056a4034f1.png", + "fan": { + "color": "#6857ea", + "is_fan": true, + "num_str": "001647", + "number": 1647 + }, + "id": 5203, + "jump_url": "https://www.bilibili.com/h5/mall/fans/recommend/5235?navhide=1&mid=12&from=dynamic&isdiy=0", + "name": "BML2021粉丝专属", + "type": 3 + }, + "face": "http://i2.hdslb.com/bfs/face/4f640086bc17e180faf8ad6b86b5bf4be24eb9f1.jpg", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/12/dynamic", + "label": "", + "mid": 12, + "name": "MagicBear", + "official_verify": { + "desc": "", + "type": 0 + }, + "pendant": { + "expire": 0, + "image": "https://i0.hdslb.com/bfs/face/a959c72407b2ac553d4328fd76d55d0134e20f65.png", + "image_enhance": "https://i0.hdslb.com/bfs/face/a959c72407b2ac553d4328fd76d55d0134e20f65.png", + "image_enhance_frame": "", + "name": "异常生物", + "pid": 460 + }, + "pub_action": "", + "pub_time": "", + "pub_ts": 1560347679, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1761580800000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "https://i0.hdslb.com/bfs/activity-plat/static/20220608/e369244d0b14644f5e1a06431e22a4d5/0DFy9BHgwE.gif", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d7e624d13d3e134251e4174a7318c19a8edbd71.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/uckjAv3Npy.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": { + "rich_text_nodes": [ + { + "orig_text": "​互动抽奖", + "text": "​互动抽奖", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E8%BD%AC%E5%8F%91%E6%8A%BD%E5%A5%96%23", + "orig_text": "#转发抽奖#", + "text": "#转发抽奖#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "jump_url": "//search.bilibili.com/all?keyword=%23PC%E7%A1%AC%E4%BB%B6%23", + "orig_text": "#PC硬件#", + "text": "#PC硬件#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "jump_url": "//search.bilibili.com/all?keyword=%23%E6%97%A7%E8%B4%A7%E6%B8%85%E7%90%86%E8%AE%A1%E5%88%92%23", + "orig_text": "#旧货清理计划#", + "text": "#旧货清理计划#", + "type": "RICH_TEXT_NODE_TYPE_TOPIC" + }, + { + "orig_text": " 很久以前购入然后一直沒用上的SSD一枚 型号:PX-G512M6e ", + "text": " 很久以前购入然后一直沒用上的SSD一枚 型号:PX-G512M6e ", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + }, + { + "emoji": { + "icon_url": "http://i0.hdslb.com/bfs/emote/6ea59c827c414b4a2955fe79e0f6fd3dcd515e24.png", + "size": 1, + "text": "[tv_doge]", + "type": 1 + }, + "orig_text": "[tv_doge]", + "text": "[tv_doge]", + "type": "RICH_TEXT_NODE_TYPE_EMOJI" + }, + { + "orig_text": " 关注并转发抽奖送出", + "text": " 关注并转发抽奖送出", + "type": "RICH_TEXT_NODE_TYPE_TEXT" + } + ], + "text": "​互动抽奖#转发抽奖##PC硬件##旧货清理计划# 很久以前购入然后一直沒用上的SSD一枚 型号:PX-G512M6e [tv_doge] 关注并转发抽奖送出" + }, + "major": { + "draw": { + "id": 24303852, + "items": [ + { + "height": 1242, + "size": 150.93652, + "src": "https://i0.hdslb.com/bfs/album/cd767602a291a5b7d4deebd8c65ebeeb0dfce1a2.jpg", + "tags": [], + "width": 2688 + } + ] + }, + "type": "MAJOR_TYPE_DRAW" + }, + "topic": null + } + }, + "type": "DYNAMIC_TYPE_DRAW", + "visible": true + }, + "type": "DYNAMIC_TYPE_FORWARD", + "visible": true + }, + { + "basic": { + "comment_id_str": "55", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "55" + }, + "id_str": 76690937085980, + "modules": { + "module_author": { + "face": "http://i0.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/1/dynamic", + "label": "", + "mid": 1, + "name": "bishi", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "2009-07-13", + "pub_ts": 1247496094, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1816099200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "55", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1xx411c7Ug", + "cover": "http://i0.hdslb.com/bfs/archive/c392288c19bbdf3762919774bce01c76dc346344.jpg", + "desc": "没有听过这首歌的话会是人参的一大遗憾呢..(望天", + "disable_preview": 0, + "duration_text": "01:38", + "jump_url": "//www.bilibili.com/video/BV1xx411c7Ug", + "stat": { + "danmaku": "2965", + "play": "116.6万" + }, + "title": "【天哥版】最春哥", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 20434, + "forbidden": false + }, + "forward": { + "count": 585, + "forbidden": false + }, + "like": { + "count": 27958, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + }, + { + "basic": { + "comment_id_str": "16", + "comment_type": 1, + "like_icon": { + "action_url": "", + "end_url": "", + "id": 0, + "start_url": "" + }, + "rid_str": "16" + }, + "id_str": 55783037337604, + "modules": { + "module_author": { + "face": "http://i0.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", + "face_nft": false, + "following": null, + "jump_url": "//space.bilibili.com/1/dynamic", + "label": "", + "mid": 1, + "name": "bishi", + "official_verify": { + "desc": "", + "type": -1 + }, + "pendant": { + "expire": 0, + "image": "", + "image_enhance": "", + "image_enhance_frame": "", + "name": "", + "pid": 0 + }, + "pub_action": "投稿了视频", + "pub_location_text": "", + "pub_time": "2009-07-09", + "pub_ts": 1247073333, + "type": "AUTHOR_TYPE_NORMAL", + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": 1816099200000, + "label": { + "bg_color": "#FB7299", + "bg_style": 1, + "border_color": "", + "img_label_uri_hans": "", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/8d4f8bfc713826a5412a0a27eaaac4d6b9ede1d9.png", + "img_label_uri_hant": "", + "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/VEW8fCC0hg.png", + "label_theme": "annual_vip", + "path": "", + "text": "年度大会员", + "text_color": "#FFFFFF", + "use_img_label": true + }, + "nickname_color": "#FB7299", + "status": 1, + "theme_type": 0, + "type": 2 + } + }, + "module_dynamic": { + "additional": null, + "desc": null, + "major": { + "archive": { + "aid": "16", + "badge": { + "bg_color": "#FB7299", + "color": "#FFFFFF", + "text": "投稿视频" + }, + "bvid": "BV1xx411c7mi", + "cover": "http://i1.hdslb.com/bfs/archive/ef521697c031bd2b0aab5c8aab3abe1ea0ca63b9.jpg", + "desc": "CRUCIS FATAL FAKE : Fate Stay Night的同人格斗游戏. MV制作 : yaomenghua 天下格斗之同人堂", + "disable_preview": 0, + "duration_text": "09:43", + "jump_url": "//www.bilibili.com/video/BV1xx411c7mi", + "stat": { + "danmaku": "6205", + "play": "141.8万" + }, + "title": "【FATE相关】CRUCIS FATAL FAKE MV 《Faker》", + "type": 1 + }, + "type": "MAJOR_TYPE_ARCHIVE" + }, + "topic": null + }, + "module_more": { + "three_point_items": [ + { + "label": "举报", + "type": "THREE_POINT_REPORT" + } + ] + }, + "module_stat": { + "comment": { + "count": 13354, + "forbidden": false + }, + "forward": { + "count": 473, + "forbidden": false + }, + "like": { + "count": 39657, + "forbidden": false, + "status": false + } + } + }, + "type": "DYNAMIC_TYPE_AV", + "visible": true + } + ], + "offset": "", + "update_baseline": "", + "update_num": 0 + } +} +``` + +
\ No newline at end of file From 6c355c0c3301376580334e8ca170774ff4acde21 Mon Sep 17 00:00:00 2001 From: lb-chc <69136546+lb-chc@users.noreply.github.com> Date: Wed, 21 Jun 2023 23:37:14 +0800 Subject: [PATCH 041/159] =?UTF-8?q?=E4=BD=BFAPI=E8=BF=94=E5=9B=9E=E5=80=BC?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E7=94=A8=E6=88=B7=E6=94=B6=E8=97=8F=E7=9A=84?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=90=88=E9=9B=86=20(#448)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 使API返回值包含用户收藏的视频合集 #443 * 修正错字 --- 用户/space.md | 3652 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3652 insertions(+) create mode 100644 用户/space.md diff --git a/用户/space.md b/用户/space.md new file mode 100644 index 0000000..74f5f8c --- /dev/null +++ b/用户/space.md @@ -0,0 +1,3652 @@ +# 用户空间相关 + +- [主页](#主页) + - [置顶视频](#置顶视频) + - [查询用户置顶视频](#查询用户置顶视频) + - [设置置顶视频](#设置置顶视频) + - [取消置顶视频](#取消置顶视频) + - [代表作视频](#代表作视频) + - [查询用户代表作视频列表](#查询用户代表作视频列表) + - [添加代表作视频](#添加代表作视频) + - [删除代表作视频](#删除代表作视频) + - [个人TAG](#个人TAG) + - [查看用户个人TAG](#查看用户个人TAG) + - [修改个人TAG](#修改个人TAG) + - [空间公告](#空间公告) + - [查看用户空间公告](#查看用户空间公告) + - [修改空间公告](#修改空间公告) + - [主页板块布局与权限](#主页板块布局与权限) + - [查询空间设置](#查询空间设置) + - [调整空间板块布局](#调整空间板块布局) + - [修改空间隐私权限](#修改空间隐私权限) + - [查询用户最近玩过的游戏](#查询用户最近玩过的游戏) + - [获取用户最近投币的视频明细](#获取用户最近投币的视频明细) +- [投稿](#投稿) + - [查询用户投稿视频明细](#查询用户投稿视频明细) + - [查询用户投稿相簿预览](#查询用户投稿相簿预览) + - [查询用户投稿相簿明细](#查询用户投稿相簿明细) +- [频道](#频道) + - [查询用户频道列表](#查询用户频道列表) + - [查询用户频道中的视频](#查询用户频道中的视频) + - [创建频道](#创建频道) + - [修改频道](#修改频道) + - [删除频道](#删除频道) + - [频道添加视频](#频道添加视频) + - [频道删除视频](#频道删除视频) + - [调整频道视频排序](#调整频道视频排序) + - [检查频道中有无失效视频](#检查频道中有无失效视频) +- [收藏](#收藏) + - [查询用户创建的视频收藏夹](#查询用户创建的视频收藏夹) + - [查询用户收藏的视频收藏夹](#查询用户收藏的视频收藏夹) +- [课程](#课程) + - [查询用户发布的课程列表](#查询用户发布的课程列表) +- [订阅](#订阅) + - [查询用户追番预览列表](#查询用户追番预览列表) + - [查询用户追番(追剧)明细](#查询用户追番(追剧)明细) + - [查询用户关注的TAG(话题)](#查询用户关注的TAG(话题)) + +--- + +## 主页 + + + +### 置顶视频 + +#### 查询用户置顶视频 + +>http://api.bilibili.com/x/space/top/arc + +*请求方式:GET* + +粉丝在其主页上可见 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| vmid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ---------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53016:没有置顶视频 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | ------------------------------ | ------------------------------------------------------------ | +| aid | num | 稿件avid | | +| videos | num | 视频分P总数 | 默认为1 | +| tid | num | 分区tid | | +| tname | str | 子分区名称 | | +| copyright | num | 是否转载 | 1:原创
2:转载 | +| pic | str | 视频封面图片url | | +| title | str | 稿件标题 | | +| pubdate | num | 稿件发布时间 | 时间戳 | +| ctime | num | 用户提交稿件的时间 | 时间戳 | +| desc | str | 视频简介 | | +| state | num | 视频状态 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`state`备注 | +| attribute | num | 稿件属性位配置 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`attribute`备注 | +| duration | num | 视频总计持续时长(所有分P) | 单位为秒 | +| rights | obj | 视频属性标志 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`rights`对象 | +| owner | obj | 视频UP主信息 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`owner`对象 | +| stat | obj | 视频状态数 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`stat`对象 | +| dynamic | str | 视频同步发布的的动态的文字内容 | 无为空 | +| cid | num | 视频1P cid | | +| dimension | obj | 视频1P分辨率 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`dimension`对象 | +| bvid | str | 稿件bvid | | +| reason | str | 置顶视频备注 | | +| inter_video | bool | 是否为合作视频 | false:否
true:是 | + +**示例:** + +查询用户`mid=23215368`的置顶视频 + +```shell +curl -G 'http://api.bilibili.com/x/space/top/arc' \ +--data-urlencode 'vmid=23215368' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "aid": 37896701, + "videos": 1, + "tid": 28, + "tname": "原创音乐", + "copyright": 1, + "pic": "http://i2.hdslb.com/bfs/archive/cc9e72822d68fffdd0406144f1b5348a13c89652.jpg", + "title": "燃烧吧!铃声!把主流手机铃声编成一首曲子", + "pubdate": 1544469671, + "ctime": 1544469671, + "desc": "各品牌的手机铃声大合奏,毫无违和感~", + "state": 0, + "attribute": 16768, + "duration": 208, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 1, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 23215368, + "name": "Wayjon冰冰酱", + "face": "http://i2.hdslb.com/bfs/face/7c9715f1768191137eb7ebf91918ca0f99532012.jpg" + }, + "stat": { + "aid": 37896701, + "view": 1058237, + "danmaku": 16821, + "reply": 3725, + "favorite": 76888, + "coin": 100694, + "share": 17091, + "now_rank": 0, + "his_rank": 0, + "like": 90521, + "dislike": 0 + }, + "dynamic": "#编曲##FL##纯音乐#", + "cid": 66621209, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV18t411q7zz", + "reason": "", + "inter_video": false + } +} +``` + +
+ +#### 设置置顶视频 + +> http://api.bilibili.com/x/space/top/arc/set + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------------ | -------------------------------- | +| aid | num | 置顶目标稿件avid | 必要(可选) | avid与bvid任选一个 | +| bvid | str | 置顶目标稿件bvid | 必要(可选) | avid与bvid任选一个 | +| reason | str | 置顶视频备注 | 非必要 | 置顶备注最大40字符
默认为空 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-304:未修改
-400:请求错误
53014:稿件已失效
53015:备注过长
53017:置顶非自己的稿件 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | + +**示例:** + +置顶视频`av98948772`/`BV1n741127LD` + +avid方式: + +```shell +curl 'http://api.bilibili.com/x/space/top/arc/set' \ +--data-urlencode 'aid=98948772' \ +-b 'SESSDATA=xxx' +``` + +bvid方式: + +```shell +curl 'http://api.bilibili.com/x/space/top/arc/set' \ +--data-urlencode 'bvid=BV1n741127LD' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +#### 取消置顶视频 + +> http://api.bilibili.com/x/space/top/arc/cancel + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---- | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误(重复取消) | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | + +**示例:** + +```shell +curl 'http://api.bilibili.com/x/space/top/arc/cancel' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +### 代表作视频 + +#### 查询用户代表作视频列表 + +> http://api.bilibili.com/x/space/masterpiece + +*请求方式:GET* + +新访客在其主页上可见 + +最多可以设置3个 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| vmid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ------ | ---------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | array | 代表作列表 | | + +`data`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ------- | ------------------------- | +| 0 | obj | 代表作1 | 无则为空 | +| 1 | obj | 代表作2 | 无则为空 | +| 2 | obj | 代表作3 | 无则为空
最多设置3个 | + +`data`数组中的对象: + +同[查询用户置顶视频](#查询用户置顶视频)中的`data`对象 + +**示例:** + +查询用户`mid=23215368`的代表作视频列表 + +```shell +curl -G 'http://api.bilibili.com/x/space/masterpiece' \ +--data-urlencode 'vmid=23215368' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": [{ + "aid": 37896701, + "videos": 1, + "tid": 28, + "tname": "原创音乐", + "copyright": 1, + "pic": "http://i2.hdslb.com/bfs/archive/cc9e72822d68fffdd0406144f1b5348a13c89652.jpg", + "title": "燃烧吧!铃声!把主流手机铃声编成一首曲子", + "pubdate": 1544469671, + "ctime": 1544469671, + "desc": "各品牌的手机铃声大合奏,毫无违和感~", + "state": 0, + "attribute": 16768, + "duration": 208, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 1, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 23215368, + "name": "Wayjon冰冰酱", + "face": "http://i2.hdslb.com/bfs/face/7c9715f1768191137eb7ebf91918ca0f99532012.jpg" + }, + "stat": { + "aid": 37896701, + "view": 1058241, + "danmaku": 16821, + "reply": 3725, + "favorite": 76888, + "coin": 100694, + "share": 17091, + "now_rank": 0, + "his_rank": 0, + "like": 90521, + "dislike": 0 + }, + "dynamic": "#编曲##FL##纯音乐#", + "cid": 66621209, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV18t411q7zz", + "reason": "", + "inter_video": false + }, { + "aid": 39596658, + "videos": 1, + "tid": 21, + "tname": "日常", + "copyright": 1, + "pic": "http://i2.hdslb.com/bfs/archive/431e51d0e40e3461e1c1b0f59c755ae8843b1adb.jpg", + "title": "MY2018 - 纪念我的2018年", + "pubdate": 1546328392, + "ctime": 1546328392, + "desc": "", + "state": 0, + "attribute": 16768, + "duration": 239, + "mission_id": 10996, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 1, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 23215368, + "name": "Wayjon冰冰酱", + "face": "http://i2.hdslb.com/bfs/face/7c9715f1768191137eb7ebf91918ca0f99532012.jpg" + }, + "stat": { + "aid": 39596658, + "view": 1518, + "danmaku": 16, + "reply": 40, + "favorite": 22, + "coin": 60, + "share": 9, + "now_rank": 0, + "his_rank": 0, + "like": 112, + "dislike": 0 + }, + "dynamic": "#vlog##记录##生活记录#", + "cid": 69561078, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1Jt411B7La", + "reason": "", + "inter_video": false + }, { + "aid": 44721369, + "videos": 1, + "tid": 28, + "tname": "原创音乐", + "copyright": 1, + "pic": "http://i0.hdslb.com/bfs/archive/9887797402599c42f74a7624f3db4a92a0ebf465.jpg", + "title": "【铃声串烧系列】华米两开花;中华有为,国之荣耀!把主流手机铃声编成一首曲子", + "pubdate": 1551128445, + "ctime": 1551128445, + "desc": "把主流手机铃声编成一首曲子,这一版用华为的铃声作为主旋律,毫无违和感~伴随着2019mwc的开幕,希望国产厂商能获得全世界的目光,并且将属于中国人的科技自信传递到全世界!", + "state": 0, + "attribute": 16768, + "duration": 174, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 1, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 23215368, + "name": "Wayjon冰冰酱", + "face": "http://i2.hdslb.com/bfs/face/7c9715f1768191137eb7ebf91918ca0f99532012.jpg" + }, + "stat": { + "aid": 44721369, + "view": 306757, + "danmaku": 7713, + "reply": 1520, + "favorite": 17216, + "coin": 16489, + "share": 2917, + "now_rank": 0, + "his_rank": 0, + "like": 21439, + "dislike": 0 + }, + "dynamic": "#铃声##纯音乐##音乐#【铃声串烧】Mix Ringtones!船新的版本来啦!这一版用华为的铃声作为主旋律,毫无违和感~伴随着2019mwc的开幕,希望国产厂商能获得全世界的目光,并且将属于中国人的科技自信传递到全世界!", + "cid": 78290138, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1vb411879C", + "reason": "", + "inter_video": false + }] +} +``` + +
+ +#### 添加代表作视频 + +> http://api.bilibili.com/x/space/masterpiece/add + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +代表作上限为3个稿件 + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------------ | -------------------------------- | +| aid | num | 置顶目标稿件avid | 必要(可选) | avid与bvid任选一个 | +| bvid | str | 置顶目标稿件bvid | 必要(可选) | avid与bvid任选一个 | +| reason | str | 代表作备注 | 非必要 | 置顶备注最大40字符
默认为空 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53014:稿件已失效
53015:备注过长
53017:置顶非自己的稿件
53019:达到上限
53020:已经存在该稿件 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | + +**示例:** + +添加视频`av94916552`/`BV1ZE411K7ux`到代表作列表 + +avid方式: + +```shell +curl 'http://api.bilibili.com/x/space/masterpiece/add' \ +--data-urlencode 'aid=94916552' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +bvid方式: + +```shell +curl 'http://api.bilibili.com/x/space/masterpiece/add' \ +--data-urlencode 'bvid=BV1ZE411K7ux' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +#### 删除代表作视频 + +> http://api.bilibili.com/x/space/masterpiece/cancel + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------------ | ------------------ | +| aid | num | 要删除的目标稿件avid | 必要(可选) | avid与bvid任选一个 | +| bvid | str | 要删除的目标稿件bvid | 必要(可选) | avid与bvid任选一个 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53021:置顶列表中没有该视频 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | 作用尚不明确 | + +**示例:** + +删除置顶视频`av59765630`/`BV1Yt41137T6` + +avid方式: + +```shell +curl 'api.bilibili.com/x/space/masterpiece/cancel' \ +--data-urlencode 'aid=59765630' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +bvid方式: + +```shell +curl 'http://api.bilibili.com/x/space/masterpiece/cancel' \ +--data-urlencode 'bvid=BV1Yt41137T6' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +### 个人TAG + +#### 查看用户个人TAG + +> http://api.bilibili.com/x/space/acc/tags + +*请求方式:GET* + +上限5条,且内容由用户自定义 + +带有转义 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ----- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | array | 信息本体 | | + +`data`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------- | ------------- | +| 0 | obj | 套了个娃 | 只有1项??? | + +`data`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ----- | ----------- | ---- | +| mid | num | 目标用户mid | | +| tags | array | TAG名称 | | + +`data`数组中的对象中的`tags`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------- | ------- | +| 0 | str | TAG1 | | +| n | str | TAG(n+1) | | +| …… | str | …… | | +| 4 | str | TAG5 | 上限5条 | + +**示例:** + +查看用户`mid=53456`的个人TAG + +```shell +curl -G 'http://api.bilibili.com/x/space/acc/tags' \ +--data-urlencode 'mid=53456' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": [ + { + "mid": 53456, + "tags": [ + "游戏", + "音乐", + "warma", + "搞笑", + "动画" + ] + } + ] +} +``` + +
+ +#### 修改个人TAG + +> http://api.bilibili.com/x/space/acc/tags/set + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +鉴权方式:Cookie中`DedeUserID`存在且不为0 + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ------------------------------------------------------------ | +| tags | strs | 要设置的TAG内容 | 非必要 | 删除公告留空或省去即可
各TAG长度小于10字符
最多5个TAG
各TAG之间用","(%2C)分隔
重复TAG无效 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误(超出长度限制) | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | + +**示例:** + +修改个人TAG为`minecraft,技术宅,大佬,小哥哥,可爱` + +```shell +curl 'http://api.bilibili.com/x/space/acc/tags/set' \ +--data-urlencode 'tags=minecraft,技术宅,大佬,小哥哥,可爱' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx;DedeUserID=1' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +### 空间公告 + +#### 查看用户空间公告 + +> http://api.bilibili.com/x/space/notice + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | str | 公告信息 | 无则为空 | + +**示例:** + +查看用户`mid=53456`的空间公告 + +```shell +curl -G 'http://api.bilibili.com/x/space/notice' \ +--data-urlencode 'mid=53456' +``` + +
+查看响应示例: + +```json +{ + "code":0, + "message":"0", + "ttl":1, + "data":"我的微博 @_warma_\n直播录像上传到:warma养鸽场\n头像画师是:微博@Dr-H_喵_\n横幅画师:@薬屋" +} +``` + +
+ +#### 修改空间公告 + +> http://api.bilibili.com/x/space/notice/set + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | --------------------------------------- | +| notice | str | 要设置的公告内容 | 非必要 | 删除公告留空或省去即可
少于150字符 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-304:未修改
-400:请求错误(超出长度限制) | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | 作用尚不明确 | + +**示例:** + +修改个人空间公告为`鸽子` + +```shell +curl 'http://api.bilibili.com/x/space/notice/set' \ +--data-urlencode 'notice=鸽子' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +### 主页板块布局与权限 + +#### 查询空间设置 + +> http://space.bilibili.com/ajax/settings/getSettings + +*请求方式:GET* + +注:带有转义 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------ | ------------------- | -------- | ---- | +| status | bool | 用户是否存在 | true:存在
false:不存在 | +| data | 用户存在时:obj
用户不存在时:str| 用户存在时:信息本体
用户不存在时:错误信息 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---------------------- | ----- | ---------------- | ------------ | +| privacy | obj | 空间隐私权限 | | +| index_order | array | 空间板块布局 | | +| theme | str | default主题? | 作用尚不明确 | +| theme_preview_img_path | str | 主题预览图路径? | 作用尚不明确 | +| toutu | obj | 空间头图 | | + +`privacy`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | -------------- | ------------------------------ | +| bangumi | num | 追番及追剧 | 0:隐藏
1:公开
**下同** | +| bbq | num | 轻视频 | | +| channel | num | 频道 | | +| coins_video | num | 最近投币的视频 | | +| comic | num | 追漫 | | +| dress_up | num | 装扮 | | +| fav_video | num | 收藏夹 | | +| groups | num | 圈子? | 作用尚不明确 | +| likes_video | num | 最近点赞的视频 | | +| played_game | num | 最近玩过的游戏 | | +| tags | num | 订阅标签 | | +| user_info | num | 个人资料 | | + +`index_order`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------- | -------------------------------------------- | +| 0 | obj | 板块1 | 根据板块布局顺序排序
先左侧布局后右侧布局 | +| n | obj | 板块(n+1) | | +| …… | obj | …… | …… | + +`index_order`数组内对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | -------- | ---- | +| id | num | 板块编号 | | +| name | str | 板块名称 | | + +`toutu`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------------- | ---- | -------------------- | -------------------------------------------------- | +| sid | num | 空间头图ID | | +| expire | num | 到期时间? | 时间戳?
作用尚不明确 | +| s_img | str | 空间头图小图相对路径 | 完整url为`http://i0.hdslb.com/`+相对路径 | +| l_img | str | 空间头图相对路径 | **同上** | +| android_img | str | 空 | 注:**手机端头图与web端不同,需要用另一个api获取** | +| iphone_img | str | 空 | | +| ipad_img | str | 空 | | +| thumbnail_img | str | 缩略图 | | +| platform | num | 0 | 作用尚不明确 | + +**示例:** + +查看`mid=2`的空间设置 + +```shell +curl -G 'http://space.bilibili.com/ajax/settings/getSettings' \ +--data-urlencode 'mid=2' +``` + +
+查看响应示例: + +```json +{ + "status":true, + "data":{ + "privacy":{ + "bangumi":1, + "bbq":1, + "channel":1, + "coins_video":0, + "comic":1, + "dress_up":1, + "fav_video":0, + "groups":0, + "likes_video":0, + "played_game":1, + "tags":1, + "user_info":1 + }, + "index_order":[ + { + "id":1, + "name":"我的稿件" + }, + { + "id":8, + "name":"我的专栏" + }, + { + "id":7, + "name":"我的频道" + }, + { + "id":2, + "name":"我的收藏夹" + }, + { + "id":3, + "name":"订阅番剧" + }, + { + "id":4, + "name":"订阅标签" + }, + { + "id":5, + "name":"最近投币的视频" + }, + { + "id":6, + "name":"我的圈子" + }, + { + "id":9, + "name":"我的相簿" + }, + { + "id":21, + "name":"公告" + }, + { + "id":22, + "name":"直播间" + }, + { + "id":23, + "name":"个人资料" + }, + { + "id":24, + "name":"官方活动" + }, + { + "id":25, + "name":"最近玩过的游戏" + } + ], + "theme":"default", + "theme_preview_img_path":"", + "toutu":{ + "sid":1, + "expire":2861874560, + "s_img":"bfs/space/768cc4fd97618cf589d23c2711a1d1a729f42235.png", + "l_img":"bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", + "android_img":"", + "iphone_img":"", + "ipad_img":"", + "thumbnail_img":"", + "platform":0 + } + } +} +``` + +
+ +#### 调整空间板块布局 + +> http://space.bilibili.com/ajax/settings/setIndexOrder + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +鉴权方式:Cookie中`DedeUserID`及`DedeUserID__ckMd5`存在且不为0,referer为 `.bilibili.com`域名下 + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ----------- | ---- | ------------------------ | ------ | ------------------------------------------------------------ | +| index_order | nums | 布局列表 | 必要 | 每个值之间用","(%2C)分隔
先左侧布局再右侧布局
值的意义见下表 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +布局参数`index_order`: + +| 值 | 含义 | +| ---- | ------------------------------------ | +| 1 | (左侧)我的稿件 | +| 2 | (左侧)我的收藏夹 | +| 3 | (左侧)订阅番剧 | +| 4 | (左侧)订阅标签 | +| 5 | (左侧)最近投币的视频 | +| 6 | (左侧)我的圈子**(此板块被隐藏)** | +| 7 | (左侧)我的频道 | +| 8 | (左侧)我的专栏 | +| 9 | (左侧)我的相簿 | +| 21 | (右侧)公告 | +| 22 | (右侧)直播间 | +| 23 | (右侧)个人资料 | +| 24 | (右侧)官方活动 | +| 25 | (右侧)最近玩的游戏 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------ | ---- | -------- | ----------------------------------- | +| ststus | bool | 操作结果 | true:操作成功
false:操作失败 | +| data | str | 错误信息 | 正确时无此项 | + +**示例:** + +调整空间布局为: + +>我的稿件 直播间 +>我的专栏 个人资料 +>订阅番剧 公告 +>我的收藏夹 官方活动 +>我的相簿 最近玩的游戏 +>最近投币的视频 +>订阅标签 +>我的频道 + +```shell +curl 'http://space.bilibili.com/ajax/settings/setIndexOrder' \ +--data-urlencode 'index_order=1,8,3,2,9,5,4,7,22,23,21,24,25,6' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;' \ +-e 'https://www.bilibili.com' +``` + +
+查看响应示例: + +```json +{ + "status": true +} +``` + +
+ +#### 修改空间隐私权限 + +> http://space.bilibili.com/ajax/settings/setPrivacy + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +鉴权方式:Cookie中`DedeUserID`及`DedeUserID__ckMd5`存在且不为0,referer为 `.bilibili.com`域名下 + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ----------- | ---- | ------------------------ | ------ | ---------------------------------- | +| fav_video | num | 收藏视频 | 非必要 | 0:隐藏
1:公开
**下同** | +| bangumi | num | 追番及追剧 | 非必要 | | +| tags | num | 关注的TAG | 非必要 | | +| coins_video | num | 投币的视频 | 非必要 | | +| user_info | num | 个人信息 | 非必要 | | +| played_game | num | 玩过的游戏 | 非必要 | | +| csrf | nstr | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------ | ---- | -------- | ----------------------------------- | +| ststus | bool | 操作结果 | true:操作成功
false:操作失败 | +| data | str | 错误信息 | 正确时无此项 | + +**示例:** + +设置`关注的TAG`为隐藏 + +```shell +curl 'http://space.bilibili.com/ajax/settings/setPrivacy' \ +--data-urlencode 'tags=0' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;' \ +-e 'https://www.bilibili.com' +``` + +
+查看响应示例: + +```json +{ + "status": true +} +``` + +
+ +### 查询用户最近玩过的游戏 + +> http://api.bilibili.com/x/space/lastplaygame + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ------------------------------- | -------- | ---------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | 隐藏时:null
公开时:array | 信息本体 | | + +`data`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------- | ---------------- | +| 0 | obj | 游戏1 | | +| n | obj | 游戏(n+1) | 项数为总计游戏数 | +| …… | obj | …… | …… | + +`data`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | --------------- | ---- | +| website | str | 游戏主页链接url | | +| image | str | 游戏图片url | | +| name | str | 游戏名 | | + +**示例:** + +查询`mid=2`的最近玩过的游戏 + +```shell +curl -G 'http://api.bilibili.com/x/space/lastplaygame' \ +--data-urlencode 'mid=2' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": [ + { + "website": "https://game.bilibili.com/fgo/event_meihosou", + "image": "http://i0.hdslb.com/bfs/game/f7d4ee0877089e4079b8f0b4f5c95dd4ceba512a.png", + "name": "命运-冠位指定(Fate/GO)" + }, + { + "website": "https://game.bilibili.com/pcr/xxtix", + "image": "http://i0.hdslb.com/bfs/game/7922ecea5cc76fe3c8c177e1d4a6c8cf1c36a700.jpg", + "name": "公主连结Re:Dive" + }, + { + "website": "https://game.bilibili.com/dwbgx/", + "image": "http://i0.hdslb.com/bfs/game/6d5b2df70dfa987408d8d09110cdc327949885e3.png", + "name": "大王不高兴" + }, + { + "website": "https://game.bilibili.com/bangdream/1stanniversary-yxzx/", + "image": "http://i0.hdslb.com/bfs/game/4a7d0b7272dffe5a489ee935b6bd2d4f7d5f1257.png", + "name": "BanG Dream!" + }, + { + "website": "http://www.biligame.com/detail/?id=101772", + "image": "http://i0.hdslb.com/bfs/game/8e8b04e7bd2170c2ba2c9f563a62c72bac2eba2c.jpg", + "name": "明日方舟" + } + ] +} +``` + +
+ +### 获取用户最近投币的视频明细 + +> http://api.bilibili.com/x/space/coin/video + +*请求方式:GET* + +认证方式:Cookie(SESSDATA) + +如设置隐私查看自己的需要认证 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| vmid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ------------------------------- | -------- | ---------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | 隐藏时:null
公开时:array | 信息本体 | | + +`data`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | ---- | +| 0 | obj | 投币视频1 | | +| n | obj | 投币视频(n+1) | | +| …… | obj | …… | | + +`data`数组中的对象: + +基本同[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的data对象 + +**示例:** + +查看用户`mid=15858903`的最近投币视频 + +```shell +curl -G 'http://space.bilibili.com/x/space/coin/video' \ +--data-urlencode 'vmid=15858903' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": [ + { + "aid": 669644066, + "videos": 1, + "tid": 75, + "tname": "动物圈", + "copyright": 2, + "pic": "http://i1.hdslb.com/bfs/archive/0f73a68b8f449cc72e9ef109685bd295dc0c0c9d.jpg", + "title": "在人类幼崽身上用尽了温柔", + "pubdate": 1600608261, + "ctime": 1600608261, + "desc": "https://weibo.com/tv/show/1034:4551253766897703?from=old_pc_videoshow", + "state": 0, + "attribute": 16384, + "duration": 29, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 0, + "no_reprint": 0, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 258457966, + "name": "卧龙寺", + "face": "http://i2.hdslb.com/bfs/face/f868d1f522733fdcf72a6267e0237157dd0e9948.jpg" + }, + "stat": { + "aid": 669644066, + "view": 3412898, + "danmaku": 719, + "reply": 1481, + "favorite": 21909, + "coin": 2864, + "share": 13702, + "now_rank": 0, + "his_rank": 0, + "like": 86970, + "dislike": 0 + }, + "dynamic": "", + "cid": 237319289, + "dimension": { + "width": 576, + "height": 1024, + "rotate": 0 + }, + "bvid": "BV1sa4y1j7jk", + "coins": 1, + "time": 1601802763, + "ip": "", + "inter_video": false + }, + { + "aid": 202267998, + "videos": 1, + "tid": 138, + "tname": "搞笑", + "copyright": 1, + "pic": "http://i0.hdslb.com/bfs/archive/ca7746f2207114513f1a421d7f744523275ee679.jpg", + "title": "充 电 器 の 痛", + "pubdate": 1601750952, + "ctime": 1601750952, + "desc": "这个简介吓到我了!", + "state": 0, + "attribute": 16512, + "duration": 50, + "mission_id": 14725, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 0, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 129922746, + "name": "-白糖洒一地-", + "face": "http://i0.hdslb.com/bfs/face/1f581f3b20a380c2fd13ecb8bbe409f8b49c6418.jpg" + }, + "stat": { + "aid": 202267998, + "view": 109, + "danmaku": 2, + "reply": 11, + "favorite": 5, + "coin": 9, + "share": 0, + "now_rank": 0, + "his_rank": 0, + "like": 20, + "dislike": 0 + }, + "dynamic": "", + "cid": 241861687, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1oh411X7iA", + "coins": 2, + "time": 1601773750, + "ip": "", + "inter_video": false + }, + { + "aid": 839722373, + "videos": 1, + "tid": 208, + "tname": "校园学习", + "copyright": 1, + "pic": "http://i2.hdslb.com/bfs/archive/11ed53241ceab314c919adba9f85582d24d9313c.jpg", + "title": "“白piáo”用日语到底怎么说?油管人气日语老师来教你!", + "pubdate": 1601026026, + "ctime": 1601026026, + "desc": "志方老师的B站用语日语课又来了~\n欢迎大家来看哦,\n如果喜欢我们的作品的话,欢迎大家用2~3连+转发来支持我们~\n如果拒绝的话,也可以用日语在评论和弹幕里刷上一波~即可以锻炼日语又可以拒绝我们,岂不美哉~~", + "state": 0, + "attribute": 16768, + "duration": 310, + "mission_id": 14655, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 1, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 677926489, + "name": "日语志方老师", + "face": "http://i2.hdslb.com/bfs/face/d465e5cd42e3523a52b3bef38dce7b23627b7723.jpg" + }, + "stat": { + "aid": 839722373, + "view": 130688, + "danmaku": 1320, + "reply": 799, + "favorite": 3722, + "coin": 5883, + "share": 339, + "now_rank": 0, + "his_rank": 0, + "like": 17585, + "dislike": 0 + }, + "dynamic": "志方老师的B站用语日语课又来了~\n欢迎大家来看哦,\n如果喜欢我们的作品的话,欢迎大家用2~3连+转发来支持我们~\n如果拒绝的话,也可以用日语在评论和弹幕里刷上一波~即可以锻炼日语又可以拒绝我们,岂不美哉~~", + "cid": 238876133, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1n54y117kq", + "coins": 2, + "time": 1601036198, + "ip": "", + "inter_video": false + } + ] +} +``` + +
+ +## 投稿 + + + +### 查询用户投稿视频明细 + +> http://api.bilibili.com/x/space/arc/search + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------- | ---- | ------------ | ------ | ------------------------------------------------------------ | +| mid | num | 目标用户mid | 必要 | | +| order | str | 排序方式 | 非必要 | 默认为pubdate
最新发布:pubdate
最多播放:click
最多收藏:stow | +| tid | num | 筛选目标分区 | 非必要 | 默认为0
0:不进行分区筛选
分区tid为所筛选的分区 | +| keyword | str | 关键词筛选 | 非必要 | 用于使用关键词搜索该UP主视频稿件 | +| pn | num | 页码 | 必要 | | +| ps | num | 每页项数 | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
-412:请求被拦截 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| --------------- | ---- | -------------- | ---- | +| list | obj | 列表信息 | | +| page | obj | 页面信息 | | +| episodic_button | obj | “播放全部“按钮 | | + +`data`中的`list`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ------ | ---------------- | ---- | +| tlist | obj | 投稿视频分区索引 | | +| vlist | array | 投稿视频列表 | | + +`list`中的`tlist`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | ------------ | --------------------- | +| {tid} | obj | 该分区的详情 | 字段名为存在的分区tid | +| …… | obj | …… | 向下扩展 | + +`tlist`中的`{tid}`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | -------------------- | ---- | +| count | num | 投稿至该分区的视频数 | | +| name | str | 该分区名称 | | +| tid | num | 该分区tid | | + +`list`中的`vlist`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | ---- | +| 0 | obj | 投稿视频1 | | +| n | obj | 投稿视频(n+1) | | +| …… | obj | …… | …… | + +`list`中的`vlist`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| -------------- | ---- | -------------- | ---------------------------- | +| aid | num | 稿件avid | | +| author | str | 视频UP主 | 不一定为目标用户(合作视频) | +| bvid | str | 稿件bvid | | +| comment | num | 视频评论数 | | +| copyright | str | 空 | 作用尚不明确 | +| created | num | 投稿时间 | 时间戳 | +| description | str | 视频简介 | | +| hide_click | bool | false | 作用尚不明确 | +| is_pay | num | 0 | 作用尚不明确 | +| is_union_video | num | 是否为合作视频 | 0:否
1:是 | +| length | str | 视频长度 | MM:SS | +| mid | num | 视频UP主mid | 不一定为目标用户(合作视频) | +| pic | str | 视频封面 | | +| play | num | 视频播放次数 | | +| review | num | 0 | 作用尚不明确 | +| subtitle | str | 空 | 作用尚不明确 | +| title | str | 视频标题 | | +| typeid | num | 视频分区tid | | +| video_review | num | 视频弹幕数 | | + +`data`中的`page`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | ---------- | ---- | +| count | num | 总计稿件数 | | +| pn | num | 当前页码 | | +| ps | num | 每页项数 | | + +`data`中的`episodic_button`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ------------- | ---- | +| text | str | 按钮文字 | | +| uri | str | 全部播放页url | | + +**示例:** + +`pn`(页码)和`ps`(每页项数)只改变`vlist`中成员的多少与内容 + +以每页2项查询用户`mid=53456`的第1页投稿视频明细 + +```shell +curl -G 'http://api.bilibili.com/x/space/arc/search' \ +--data-urlencode 'mid=53456' \ +--data-urlencode 'ps=2' \ +--data-urlencode 'pn=1' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "list": { + "tlist": { + "1": { + "tid": 1, + "count": 26, + "name": "动画" + }, + "160": { + "tid": 160, + "count": 42, + "name": "生活" + }, + "211": { + "tid": 211, + "count": 3, + "name": "美食" + }, + "3": { + "tid": 3, + "count": 33, + "name": "音乐" + }, + "4": { + "tid": 4, + "count": 72, + "name": "游戏" + } + }, + "vlist": [ + { + "comment": 3558, + "typeid": 47, + "play": 1275661, + "pic": "//i2.hdslb.com/bfs/archive/90157806a34646ac2d4c6af3e8b6156cb3460d14.jpg", + "subtitle": "", + "description": "第一期:BV1ak4y1B7aG\n第二期:BV1eA411Y7FN\n脚本/绘画/配音/动画/片尾曲:warma\n第三期终于做完啦!这是一个以我平时发呆的时候想到的一些灵感组成的冷笑话合集,名字叫《沃玛的生活》,可以当作日常搞笑单元小动画来看。\n如果你喜欢这个系列的话请点赞投币收藏一键三连给我一些继续制作的动力吧,我真的非常非常需要更多的动力!\n祝看得开心~\n我的微博:@_warma_", + "copyright": "", + "title": "【warma】沃玛的新番更新!从现在开始放飞自我【沃玛的生活/第三期】", + "review": 0, + "author": "Warma", + "mid": 53456, + "created": 1605844817, + "length": "05:16", + "video_review": 7470, + "aid": 585275804, + "bvid": "BV1sz4y1y7KJ", + "hide_click": false, + "is_pay": 0, + "is_union_video": 0, + "is_steins_gate": 0 + }, + { + "comment": 2979, + "typeid": 21, + "play": 840676, + "pic": "//i2.hdslb.com/bfs/archive/b43f88c6ebae8fdc7dfb663f6f6f2931b924c763.jpg", + "subtitle": "", + "description": "前一阵子过生日,大家的礼物经过几番转寄终于收到了~于是录了这期礼物开箱视频。\n现在也在感慨,大家的礼物真的都太强了,居然这些全都是手工做的,真的好厉害!\n这些手工礼物背后得花多少时间和心力啊……这些对我来说都是无价的礼物,制作礼物的大家真的有心了,谢谢!!\n收到这些礼物真的很开心,视频的封面也是在这样激动的情况下画出来的,祝你看得开心~\n我的微博:@_warma_", + "copyright": "", + "title": "【warma】来开箱!大家寄来的生日礼物", + "review": 0, + "author": "Warma", + "mid": 53456, + "created": 1604635221, + "length": "24:28", + "video_review": 10476, + "aid": 287744380, + "bvid": "BV1xf4y1q7XN", + "hide_click": false, + "is_pay": 0, + "is_union_video": 0, + "is_steins_gate": 0 + } + ] + }, + "page": { + "pn": 1, + "ps": 2, + "count": 176 + }, + "episodic_button": { + "text": "播放全部", + "uri": "//www.bilibili.com/medialist/play/53456?from=space" + } + } +} +``` + +
+ +### 查询用户投稿相簿预览 + +> http://api.bilibili.com/x/space/album/index + +*请求方式:GET* + +所有类型的相簿 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------ | ------ | ------- | +| mid | num | 目标用户mid | 必要 | | +| ps | num | 获取的相簿量 | 非必要 | 默认为8 定义域 1-大于1700 (注意滥用风险) | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ------ | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | array | 相簿列表 | | + +`data`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | ---- | +| 0 | obj | 相簿内容1 | | +| n | obj | 相簿内容(n+1) | | +| …… | obj | …… | …… | + +`data`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ------ | ----------- | -------------- | +| count | num | 总计图片数 | | +| ctime | num | 发布时间 | 时间戳 | +| description | str | 简介 | | +| doc_id | num | 相簿id | 非动态!!! | +| like | num | 点赞数 | | +| pictures | array | 图片内容 | | +| poster_uid | num | 上传用户mid | | +| title | str | 标题 | 动态内容无 | +| view | num | 浏览数 | | + +`data`数组中的对象中的`pictures`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | --------------------- | +| 0 | obj | 内容图片1 | | +| n | obj | 内容图片(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | …… | + +`pictures`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ---- | -------- | ----------- | +| img_height | num | 图片高度 | | +| img_size | num | 图片大小 | 单位为KByte | +| img_src | str | 图片url | | +| img_width | num | 图片宽度 | | + +**示例:** + +查询用户`mid=53456`的投稿相簿预览 + +```shell +curl -G 'http://api.bilibili.com/x/space/album/index' \ +--data-urlencode 'mid=53456' \ +--data-urlencode 'ps=2' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": [{ + "doc_id": 60470424, + "poster_uid": 53456, + "title": "", + "description": "你醒啦![tv_大佬]\n之前说到过的百万粉纪念的视频已经定时在了今天下午七点,欢迎来看呀!", + "pictures": [{ + "img_src": "https://i0.hdslb.com/bfs/album/2840366e30bf7c0aba9da5adde1a771255a57bc7.jpg", + "img_width": 625, + "img_height": 134, + "img_size": 14 + }], + "count": 1, + "ctime": 1583444859, + "view": 1677521, + "like": 29974 + }, { + "doc_id": 58962388, + "poster_uid": 53456, + "title": "", + "description": "上次的那些写实儿童画发出来啦!可以打印下来辟邪[tv_大佬]", + "pictures": [{ + "img_src": "https://i0.hdslb.com/bfs/album/8acaf7c7897cb858cccab36c33a5e875adfef177.jpg", + "img_width": 2172, + "img_height": 3258, + "img_size": 2831 + }, { + "img_src": "https://i0.hdslb.com/bfs/album/1611b6b56d3d4328889a62b9f9bdc92e9d065532.jpg", + "img_width": 3456, + "img_height": 5184, + "img_size": 3024 + }, { + "img_src": "https://i0.hdslb.com/bfs/album/f3a30a2ef5b39711af8b945d54d85ffd1e932b8a.jpg", + "img_width": 1200, + "img_height": 757, + "img_size": 313 + }], + "count": 3, + "ctime": 1582881332, + "view": 1176646, + "like": 25734 + }] +} +``` + +
+ +### 查询用户投稿相簿明细 + +> http://api.vc.bilibili.com/link_draw/v1/doc/doc_list + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| --------- | ---- | ----------- | ------ | ------------------------------------------------------------ | +| uid | num | 目标用户mid | 必要 | | +| page_num | num | 页码 | 非必要 | 默认为1 | +| page_size | num | 每页项数 | 非必要 | 默认为20 | +| biz | str | 查询类型 | 非必要 | 全部:all
绘画:draw
摄影:photo
日常:daily
默认为all | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------- | +| code | num | 返回值 | 0:成功 | +| msg | str | 错误信息 | 默认为success | +| message | str | 错误信息 | 默认为success | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ------ | -------- | ---- | +| items | array | 相簿列表 | | + +`items`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | ---- | +| 0 | obj | 相簿内容1 | | +| n | obj | 相簿内容(n+1) | | +| …… | obj | …… | …… | + +`items`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ------ | ----------- | -------------- | +| count | num | 总计图片数 | | +| ctime | num | 发布时间 | 时间戳 | +| description | str | 简介 | | +| doc_id | num | 相簿id | 非动态!!! | +| like | num | 点赞数 | | +| pictures | array | 图片内容 | | +| poster_uid | num | 上传用户mid | | +| title | str | 标题 | 动态内容无 | +| view | num | 浏览数 | | + +`items`数组中的对象中的`pictures`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | --------------------- | +| 0 | obj | 内容图片1 | | +| n | obj | 内容图片(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | …… | + +`pictures`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ---- | -------- | ----------- | +| img_height | num | 图片高度 | | +| img_size | num | 图片大小 | 单位为KByte | +| img_src | str | 图片url | | +| img_width | num | 图片宽度 | | + +**示例:** + +查询用户`mid=53456`的投稿明细中的全部类型 + +```shell +curl -G 'http://api.vc.bilibili.com/link_draw/v1/doc/doc_list' \ +--data-urlencode 'uid=2' \ +--data-urlencode 'page_num=1' \ +--data-urlencode 'page_size=2' \ +--data-urlencode 'biz=all' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "msg": "success", + "message": "success", + "data": { + "items": [{ + "doc_id": 59015720, + "poster_uid": 2, + "title": "", + "description": "6影是真的无脑,2个宝石都护不住(设计师:这真是太酷了)", + "pictures": [{ + "img_src": "http://i0.hdslb.com/bfs/album/8456f050ec8639c6e0cef36aba27bfdedc550590.jpg", + "img_width": 1824, + "img_height": 840, + "img_size": 1024 + }], + "count": 1, + "ctime": 1582894607, + "view": 707073, + "like": 7055 + }, { + "doc_id": 46853140, + "poster_uid": 2, + "title": "", + "description": "#年度报告# #新年Flag# https://www.bilibili.com/blackboard/timemachine2019.html\n决定了,这就是我的新年Flag!今年我一定要…", + "pictures": [{ + "img_src": "http://i0.hdslb.com/bfs/album/5b3ae76f79d7cf2501afc3ca7c7da509dcf0e38a.jpg", + "img_width": 1125, + "img_height": 2184, + "img_size": 465 + }, { + "img_src": "http://i0.hdslb.com/bfs/album/87789fe9644337a1f7e6a0655a32584705af8bda.jpg", + "img_width": 1125, + "img_height": 2184, + "img_size": 421 + }, { + "img_src": "http://i0.hdslb.com/bfs/album/f752d7f3bb7952f6c0013b3f48ddcb07060b4721.jpg", + "img_width": 1125, + "img_height": 2184, + "img_size": 524 + }, { + "img_src": "http://i0.hdslb.com/bfs/active/7a52a411bccb716c8e67fe70e6c330d5209346de.jpg", + "img_width": 1125, + "img_height": 2184, + "img_size": 534 + }], + "count": 4, + "ctime": 1577966163, + "view": 833193, + "like": 5667 + }] + } +} +``` + +
+ +## 频道 + + + +### 查询用户频道列表 + +> http://api.bilibili.com/x/space/channel/list + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | -------- | +| code | num | 返回值 | 0:成功 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | 无则为空 所有频道内均无视频则为空,此时code为0 | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ------ | ---------- | ---- | +| count | num | 总计频道数 | | +| list | array | 频道列表 | | + +`data`中的`list`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | --------------------- | +| 0 | obj | 频道1 | | +| n | obj | 频道(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | …… | + +`data`中的`list`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | -------------- | -------- | +| cid | num | 频道id | | +| count | num | 频道内含视频数 | | +| cover | str | 封面图片url | | +| intro | str | 简介 | 无则为空 | +| mid | num | 创建用户mid | | +| mtime | num | 创建时间 | 时间戳 | +| name | str | 标题 | | + +**示例:** + +查询用户`mid=53456`的频道列表 + +```shell +curl -G 'http://api.bilibili.com/x/space/channel/list' \ +--data-urlencode 'mid=53456' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "count": 6, + "list": [{ + "cid": 100249, + "mid": 53456, + "name": "【实况】动物之森", + "intro": "", + "mtime": 1579898830, + "count": 2, + "cover": "http://i1.hdslb.com/bfs/archive/6a7ed9483c34e839dfca981b9e2b94cd4c4efa0a.jpg" + }, { + "cid": 79323, + "mid": 53456, + "name": "忆雨", + "intro": "忆雨出现过的视频", + "mtime": 1562535222, + "count": 7, + "cover": "http://i2.hdslb.com/bfs/archive/1783e4f03042b282495799adda1cb56270cea647.jpg" + }, { + "cid": 79322, + "mid": 53456, + "name": "大画家", + "intro": "", + "mtime": 1562535122, + "count": 6, + "cover": "http://i0.hdslb.com/bfs/archive/9c85a14e805c6c23cb7a42e1dbef97821bb68960.jpg" + }, { + "cid": 77758, + "mid": 53456, + "name": "灭火器", + "intro": "", + "mtime": 1561270856, + "count": 4, + "cover": "http://i2.hdslb.com/bfs/archive/0073208d086b4ebe9cdc540e7664aa74b483aeb6.jpg" + }, { + "cid": 75696, + "mid": 53456, + "name": "沃玛小剧场", + "intro": "", + "mtime": 1559129460, + "count": 5, + "cover": "http://i2.hdslb.com/bfs/archive/db2b20ecdb6ed013fc3780b0e741ea88d46b5b40.jpg" + }, { + "cid": 170, + "mid": 53456, + "name": "爆炸电台", + "intro": "闲聊的电台", + "mtime": 1503298893, + "count": 7, + "cover": "http://i2.hdslb.com/bfs/archive/73d77bc6bb0d44b239fd4f5a2682fe3144e81692.jpg" + }] + } +} +``` + +
+ + + +### 查询用户频道中的视频 + +> http://api.bilibili.com/x/space/channel/video + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | --------- | +| mid | num | 目标用户mid | 必要 | | +| cid | num | 目标频道id | 必要 | | +| pn | num | 页码 | 非必要 | 默认为1 | +| ps | num | 每页项数 | 非必要 | 默认为100 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
-404:无用户对应的频道 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | -------- | ---- | +| list | obj | 频道信息 | | +| page | obj | 页面信息 | | + +`data`中的`list`对象: + +| 字段 | 类型 | 内容 | 备注 | +| -------- | ------ | -------------- | -------- | +| archives | array | 包含的视频列表 | | +| cid | num | 频道id | | +| count | num | 频道内含视频数 | | +| cover | str | 封面图片url | | +| intro | str | 简介 | 无则为空 | +| mid | num | 创建用户mid | | +| mtime | num | 创建时间 | 时间戳 | +| name | str | 标题 | | + +`list`中的`archives`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | --------------------- | +| 0 | obj | 视频1 | | +| n | obj | 视频(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | …… | + +`list`中的`archives`数组中的对象: + +基本同「[视频详细信息](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/video/info.md#视频详细信息(avid/bvid互转))」中的data对象 + +`data`中的`page`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | ---------- | ---- | +| count | num | 总计视频数 | | +| num | num | 当前页码 | | +| size | num | 每页项数 | | + +**示例:** + +查询用户`mid=53456`的频道`170`中的视频 + +```shell +curl -G 'http://api.bilibili.com/x/space/channel/video' \ +--data-urlencode 'mid=53456' \ +--data-urlencode 'cid=170' \ +--data-urlencode 'ps=2' \ +--data-urlencode 'pn=1' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "list": { + "cid": 170, + "mid": 53456, + "name": "爆炸电台", + "intro": "闲聊的电台", + "mtime": 1503298893, + "count": 7, + "cover": "http://i2.hdslb.com/bfs/archive/73d77bc6bb0d44b239fd4f5a2682fe3144e81692.jpg", + "archives": [{ + "aid": 87673204, + "videos": 1, + "tid": 21, + "tname": "日常", + "copyright": 1, + "pic": "http://i0.hdslb.com/bfs/archive/5387bdcbbe4d5551adbf0ee2e607e4b7d3d8f2f0.jpg", + "title": "【warma爆炸电台】迟来的自我介绍【第八期】", + "pubdate": 1581244539, + "ctime": 1581244540, + "desc": "时隔半年的新的一期爆炸电台来啦,这是我的一系列杂谈聊天电台,这次因为多了很多新关注的朋友们,所以来做个自我介绍吧!\n画师:Dr-H_喵_ 动画:K_Lacid\n结尾提到的壁纸稍后在动态发原图,动态壁纸在steam那个壁纸软件的创意工坊里搜warma能找到\n\n往期的电台:\n第一期:av6786024 \n第三期:av13619263\n第四期:av18862091\n第五期:av25092410\n第六期:av42492515\n第七期:av62910468", + "state": 0, + "attribute": 16512, + "duration": 2388, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 0, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 53456, + "name": "Warma", + "face": "http://i1.hdslb.com/bfs/face/c1bbee6d255f1e7fc434e9930f0f288c8b24293a.jpg" + }, + "stat": { + "aid": 87673204, + "view": 1383542, + "danmaku": 88908, + "reply": 9237, + "favorite": 32929, + "coin": 68849, + "share": 5140, + "now_rank": 0, + "his_rank": 52, + "like": 116164, + "dislike": 0 + }, + "dynamic": "来做个自我介绍吧! #warma##沃玛##爆炸电台#", + "cid": 149793525, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1D7411t7Be", + "inter_video": false + }, { + "aid": 62910468, + "videos": 1, + "tid": 21, + "tname": "日常", + "copyright": 1, + "pic": "http://i2.hdslb.com/bfs/archive/4bd598f71a144d4505e259b143c0de0bf27968b2.jpg", + "title": "【warma爆炸电台】居然收到了几千条问题!【第七期】", + "pubdate": 1565345410, + "ctime": 1565338559, + "desc": "时隔半年的爆炸电台第七期终于来啦!在这一期里回答了很多问题,祝看得开心!此外,就在昨天,50万订阅了…真的谢谢大家!\n也欢迎来看往期的电台:\n第一期:av6786024 (2016年10月)\n第二期:av10373352(2017年5月)\n第三期:av13619263(2017年8月)\n第四期:av18862091(2018年1月)\n第五期:av25092410(2018年6月)\n第六期:av42492515(2019年2月)", + "state": 0, + "attribute": 16512, + "duration": 1987, + "mission_id": 11740, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 0, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 53456, + "name": "Warma", + "face": "http://i1.hdslb.com/bfs/face/c1bbee6d255f1e7fc434e9930f0f288c8b24293a.jpg" + }, + "stat": { + "aid": 62910468, + "view": 455277, + "danmaku": 19383, + "reply": 2108, + "favorite": 10507, + "coin": 19422, + "share": 1208, + "now_rank": 0, + "his_rank": 0, + "like": 31515, + "dislike": 0 + }, + "dynamic": "爆炸电台 第七期 来啦!", + "cid": 109284065, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1gt411K7Ga", + "inter_video": false + }] + }, + "page": { + "count": 7, + "num": 1, + "size": 2 + } + } +} +``` + +
+ +### 创建频道 + +> http://api.bilibili.com/x/space/channel/add + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +创建成功后会返回新建频道的id + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---- | +| name | str | 频道名 | 必要 | | +| intro | str | 频道简介 | 非必要 | | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53001:频道名字数超过限制
53002:频道简介字数超过限制
53004:创建的频道已经满额
53007:频道名称已经存在
53024:编辑内容命中敏感信息 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 数据本体 | 成功有此项 | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ------ | ---- | +| cid | num | 频道id | | + +**示例:** + +创建名为`test1`的频道,简介为空 + +```shell +curl 'http://api.bilibili.com/x/space/channel/add' \ +--data-urlencode 'name=test1' \ +--data-urlencode 'intro=' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "cid": 138996 + } +} +``` + +
+ +### 修改频道 + +> http://api.bilibili.com/x/space/channel/edit + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---- | +| cid | num | 频道id | 必要 | | +| name | str | 频道名 | 必要 | | +| intro | str | 频道简介 | 非必要 | | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53001:频道名字数超过限制
53002:频道简介字数超过限制
53007:频道名称已经存在
53024:编辑内容命中敏感信息 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | + +**示例:** + +修改频道`138996`名称为`测试`,简介为`123456` + +```shell +curl 'http://api.bilibili.com/x/space/channel/edit' \ +--data-urlencode 'cid=138996' \ +--data-urlencode 'name=测试' \ +--data-urlencode 'intro=123456' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +### 删除频道 + +> http://api.bilibili.com/x/space/channel/del + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---- | +| cid | num | 需要删除的频道id | 必要 | | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | + +**示例:** + +删除频道`138996` + +```shell +curl 'http://api.bilibili.com/x/space/channel/del' \ +--data-urlencode 'cid=138996' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +### 频道添加视频 + +> http://api.bilibili.com/x/space/channel/video/add + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +仅能添加自己是UP主的视频 + +如添加多个视频,仅会添加正确的 + +**注:完成后需要使用接口「查询用户频道中的视频」刷新** + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---------------------- | +| cid | num | 频道id | 必要 | | +| aids | nums | 要添加的目标稿件avid | 必要 | 多个使用","(%2C)分隔 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ----- | ---------------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
-404:无此项
53003:本频道里的视频已满
53006:提交视频已失效或频道里有(非该视频UP主) | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | array | 出错稿件avid列表 | | + +`data`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ------------------- | ---- | +| 0 | num | 出错稿件avid1 | | +| n | num | 出错稿件avid(n+1) | | +| …… | num | …… | …… | + +**示例:** + +向频道`138995`中添加视频`av583785685`和`av243322853` + +```shell +curl 'http://api.bilibili.com/x/space/channel/video/add' \ +--data-urlencode 'cid=138995' \ +--data-urlencode 'aids=583785685,243322853' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": [] +} +``` + +
+ +### 频道删除视频 + +> http://api.bilibili.com/x/space/channel/video/del + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +**注:完成后需要使用接口「查询用户频道中的视频」刷新** + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---- | +| cid | num | 频道id | 必要 | | +| aid | num | 要删除的目标稿件avid | 必要 | | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
-404:无此项
53008:频道内没有视频
53009:频道内没有该视频 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | + +**示例:** + +删除频道`138995`中的视频`av583785685` + +```shell +curl 'http://api.bilibili.com/x/space/channel/video/del' \ +--data-urlencode 'cid=138995' \ +--data-urlencode 'aid=583785685' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +### 调整频道视频排序 + +> http://api.bilibili.com/x/space/channel/video/sort + +*请求方式:POST* + +认证方式:Cookie(SESSDATA) + +**正文参数( application/x-www-form-urlencoded ):** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ------------------------------------------------------------ | +| cid | num | 频道id | 必要 | | +| aid | num | 要移动的目标稿件avid | 必要 | | +| to | num | 视频排序倒数位置 | 非必要 | 默认为1
1为列表底部,视频总数为首端
与显示顺序恰好相反 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | + +**示例:** + +调整`138995`中的视频`av583785685`位置为倒数第2 + +```shell +curl 'http://api.bilibili.com/x/space/channel/video/sort' \ +--data-urlencode 'cid=138995' \ +--data-urlencode 'aid=583785685' \ +--data-urlencode 'to=2' \ +--data-urlencode 'csrf=xxx' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +### 检查频道中有无失效视频 + +> http://api.bilibili.com/x/space/channel/video/check + +*请求方式:GET* + +认证方式:Cookie(SESSDATA) + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ---------- | ------ | ---- | +| cid | num | 目标频道id | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误
-404:无此项
53005:频道内有失效视频 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | + +**示例:** + +检查频道`138995` + +```shell +curl -G 'http://api.bilibili.com/x/space/channel/video/check +--data-urlencode 'cid=138995' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1 +} +``` + +
+ +## 收藏 + + + +### 查询用户创建的视频收藏夹 + +> http://api.bilibili.com/x/v3/fav/folder/created/list-all + +*请求方式:GET* + +认证方式:Cookie(SESSDATA) + +查看私有收藏夹时需要认证 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| up_mid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ----------------------------- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | 隐藏时:null
公开时:obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | --------------------------------------- | -------------- | ---- | +| count | num | 创建的收藏夹数 | | +| list | 无收藏夹时:null
有收藏夹时:array | 收藏夹列表 | | + +`data`中的`list`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | --------------------- | +| 0 | obj | 收藏夹1 | | +| n | obj | 收藏夹(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | | + +`data`中的`list`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | ---------------- | --------------- | +| id | num | 收藏夹mlid | | +| fid | num | 原始收藏夹mlid | 去除两位mid尾号 | +| mid | num | 创建用户mid | | +| attr | num | 收藏夹属性位配置 | | +| title | str | 收藏夹标题 | | +| fav_state | num | 0 | 作用尚不明确 | +| media_count | num | 收藏夹总计视频数 | | + +`attr`属性位二进制值表: + +| 位 | 内容 | 备注 | +| --------------- | ---------------- | -------------------------------- | +| 0 | 是否为默认收藏夹 | 0:默认收藏夹
1:其他收藏夹 | +| 1 | 私有收藏夹 | 0:公开
1:私有 | +| 其他有待补充... | | | + +**示例:** + +查询用户`mid=7792521`的收藏夹列表 + +```shell +curl -G 'http://api.bilibili.com/x/v3/fav/folder/created/list-all' \ +--data-urlencode 'up_mid=7792521' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "count": 5, + "list": [{ + "id": 44233921, + "fid": 442339, + "mid": 7792521, + "attr": 0, + "title": "默认收藏夹", + "fav_state": 0, + "media_count": 85 + }, { + "id": 936347621, + "fid": 9363476, + "mid": 7792521, + "attr": 22, + "title": "放假君的鬼畜私房歌", + "fav_state": 0, + "media_count": 2 + }, { + "id": 845218621, + "fid": 8452186, + "mid": 7792521, + "attr": 22, + "title": "♪一言不合就开唱♪", + "fav_state": 0, + "media_count": 4 + }, { + "id": 844998121, + "fid": 8449981, + "mid": 7792521, + "attr": 22, + "title": "个人作品精选", + "fav_state": 0, + "media_count": 25 + }, { + "id": 381779121, + "fid": 3817791, + "mid": 7792521, + "attr": 22, + "title": "鬼畜小课堂", + "fav_state": 0, + "media_count": 25 + }] + } +} +``` + +
+ +### 查询用户收藏的视频收藏夹 + +> http://api.bilibili.com/x/v3/fav/folder/collected/list + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| ps | num | 每页项数 | 必要 | 定义域 1 - 大于70 | +| pn | num | 页码 | 必要 | | +| up_mid | num | 目标用户mid | 必要 | | +| platform | str | 平台类型 | 非必要 | 填写web 返回值才会包含用户收藏的视频合集 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ----------------------------- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
40022:签名过长 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | 隐藏时:null
公开时:obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | --------------------------------------- | -------------- | ---- | +| count | num | 创建的收藏夹数 | | +| list | 无收藏夹时:null
有收藏夹时:array | 收藏夹列表 | | + +`data`中的`list`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | --------------------- | +| 0 | obj | 收藏夹1 | | +| n | obj | 收藏夹(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | | + +`data`中的`list`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | ------------------ | ----------------------------------------- | +| id | num | 收藏夹ml | | +| fid | num | 原始收藏夹mlid | 去除两位mid尾号 | +| mid | num | 创建用户mid | | +| attr | num | 收藏夹属性 | 转换成8-bit二进制处理
详细说明见下表 | +| title | str | 收藏夹标题 | | +| cover | str | 收藏夹封面图片url | | +| upper | obj | 收藏夹创建用户信息 | | +| cover_type | num | 2 | 作用尚不明确 | +| intro | str | 空 | 作用尚不明确 | +| ctime | num | 创建时间 | 时间戳 | +| mtime | num | 审核时间 | 时间戳 | +| state | num | 0 | 作用尚不明确 | +| fav_state | num | 0 | 作用尚不明确 | +| media_count | num | 收藏夹总计视频数 | | + +`attr`属性二进制值表: + +| 其他有待补充... | 1:默认收藏夹 | 0:公开性 | +| --------------- | -------------------------------- | -------------------- | +| | 0:默认收藏夹
1:其他收藏夹 | 0:公开
1:私有 | + +`data`中的`list`数组中的对象中的`upper`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---------- | ------------ | +| mid | num | 创建人mid | | +| name | str | 创建人昵称 | | +| face | str | 空 | 作用尚不明确 | + +**示例:** + +查询用户`mid=293793435`的收藏夹收藏列表 + +```shell +curl -G 'http://api.bilibili.com/x/v3/fav/folder/collected/list' \ +--data-urlencode 'up_mid=293793435' \ +--data-urlencode 'ps=20' \ +--data-urlencode 'pn=1' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "count": 2, + "list": [{ + "id": 496307088, + "fid": 4963070, + "mid": 412466388, + "attr": 22, + "title": "入站必刷", + "cover": "http://i0.hdslb.com/bfs/archive/baae2b4050363c0ab45465b7cf696b8304fdaca8.jpg", + "upper": { + "mid": 412466388, + "name": "热门菌", + "face": "" + }, + "cover_type": 2, + "intro": "", + "ctime": 1563394571, + "mtime": 1563394571, + "state": 0, + "fav_state": 0, + "media_count": 55 + }, { + "id": 381779121, + "fid": 3817791, + "mid": 7792521, + "attr": 22, + "title": "鬼畜小课堂", + "cover": "http://i2.hdslb.com/bfs/archive/09a668cfdb38fb3a85f905c10f48a2947e36a695.jpg", + "upper": { + "mid": 7792521, + "name": "还有一天就放假了", + "face": "" + }, + "cover_type": 2, + "intro": "", + "ctime": 1553700224, + "mtime": 1557291666, + "state": 0, + "fav_state": 0, + "media_count": 25 + }] + } +} +``` + +
+ +## 课程 + + + +### 查询用户发布的课程列表 + +> http://api.bilibili.com/pugv/app/web/season/page + +*请求方式:GET* + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | -------- | +| mid | num | 目标用户mid | 必要 | | +| pn | num | 页码 | 非必要 | 默认为1 | +| ps | num | 每页项数 | 非必要 | 默认为20 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ---------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ---- | ----- | -------- | ---- | +| list | array | 课程列表 | | +| page | obj | 页面信息 | | + +`data`中的`page`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | -------------- | ------------------------------------- | +| next | bool | 是否存在下一页 | false:最后一页
true:存在下一页 | +| num | num | 当前页码 | | +| size | num | 每页项数 | | +| total | num | 总计项数 | | + +`data`中的`list`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | -------------------------- | +| 0 | obj | 课程1 | | +| n | obj | 课程(n+1) | 按照目标用户的发布顺序排列 | +| …… | obj | …… | | + +`data`中的`list`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| --------- | ---- | ------------ | ------------- | +| cover | str | 课程封面url | | +| ep_count | num | 课程集数 | | +| link | str | 课程页面url | 手机版页面url | +| page | num | 1 | 作用尚不明确 | +| play | num | 课程播放数 | | +| season_id | num | 课程ssid | | +| status | str | 更新状态说明 | | +| subtitle | str | 课程副标题 | | +| title | str | 课程标题 | | + +**示例:** + +查询用户`mid=33683045`的课程发布列表 + +```shell +curl -G 'http://api.bilibili.com/pugv/app/web/season/page' \ +--data-urlencode 'mid=33683045' \ +--data-urlencode 'ps=5' \ +--data-urlencode 'pn=1' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "data": { + "items": [ + { + "cover": "http://i0.hdslb.com/bfs/archive/596575057885fff7f0ceff047437186cba459358.jpg", + "ep_count": 10, + "link": "https://m.bilibili.com/cheese/play/ss80", + "page": 1, + "play": 174467, + "season_id": 80, + "status": "共10期", + "subtitle": "百科全书式军事科普短视频系列", + "title": "《战忽知道》第一季" + }, + { + "cover": "http://i0.hdslb.com/bfs/archive/322aa94d27cece62d2a859caf71ac2426f29eee2.jpg", + "ep_count": 1, + "link": "https://m.bilibili.com/cheese/play/ss145", + "page": 1, + "play": 22155, + "season_id": 145, + "status": "更新至第1期", + "subtitle": "此课程为《局座:第四次工业革命来了》部分集数,请谨慎购买", + "title": "【体验课】局座讲5G:5G如何改变我们的生活?" + }, + { + "cover": "http://i0.hdslb.com/bfs/archive/b9794ac4507f8764e219df413b661b5faf499a19.jpg", + "ep_count": 10, + "link": "https://m.bilibili.com/cheese/play/ss113", + "page": 1, + "play": 49833, + "season_id": 113, + "status": "更新至第10期", + "subtitle": "百科全书式军事科普短视频系列", + "title": "《战忽知道》第二季" + }, + { + "cover": "http://i0.hdslb.com/bfs/archive/7351fcb33592a4bc7aac9f71d421b4b5ce0177d3.jpg", + "ep_count": 10, + "link": "https://m.bilibili.com/cheese/play/ss51", + "page": 1, + "play": 4981037, + "season_id": 51, + "status": "共10期", + "subtitle": "洞悉国际局势,学习战略思维", + "title": "局座的国际战略课" + }, + { + "cover": "http://i0.hdslb.com/bfs/archive/31e2a170b5a815e34f0537a2727b28f1b87dca18.jpg", + "ep_count": 10, + "link": "https://m.bilibili.com/cheese/play/ss121", + "page": 1, + "play": 30754, + "season_id": 121, + "status": "更新至第10期", + "subtitle": "百科全书式军事科普短视频系列", + "title": "《战忽知道》第三季" + } + ], + "page": { + "next": true, + "num": 1, + "size": 5, + "total": 8 + } + }, + "message": "success" +} +``` + +
+ +## 订阅 + + + +### 查询用户追番预览列表 + +> http://space.bilibili.com/ajax/Bangumi/getList + +*请求方式:GET* + +认证方式:Cookie(SESSDATA) + +如设置隐私查看自己的需要认证 + +带有转义,且只能获取最多15条 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------ | ------------------------ | ---------------------------------- | --------------------------- | +| status | bool | 状态 | false:失败
true:成功 | +| data | 失败:str
成功:obj | 失败:错误信息
成功:信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------ | ----- | ------------ | ------------ | +| count | num | 总计追番数 | | +| pages | num | 0 | 作用尚不明确 | +| result | array | 追番预览列表 | | + +`data`中的`result`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | -------------------------- | +| 0 | obj | 追番1 | | +| n | obj | 追番(n+1) | 按照目标用户的关注顺序排列 | +| …… | obj | …… | | +| 14 | obj | 追番15 | 最后一项 | + +`data`中的`result`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| --------------- | ---- | --------------- | --------------------------------- | +| brief | str | 简介 | | +| cover | str | 封面图片url | | +| evaluate | str | 空 | | +| favorites | num | 追番数 | | +| is_finish | num | 是否已完结 | 0:未完结
1:已完结 | +| last_ep_index | num | 0 | 作用尚不明确 | +| newest_ep_index | num | 最新一话 | 可能为0 | +| season_id | str | 番剧ssid | | +| share_url | str | 播放页面链接url | | +| title | str | 标题 | | +| total_count | num | 总计集数 | 未完结:-1
已完结:非0正整数 | + +**示例:** + +查看用户`mid=14082`的追番预览列表 + +```shell +curl -G 'http://space.bilibili.com/ajax/Bangumi/getList' \ +--data-urlencode 'mid=14082' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "status": true, + "data": { + "count": 25, + "pages": 0, + "result": [{ + "season_id": "29310", + "share_url": "http:\/\/bangumi.bilibili.com\/anime\/29310\/", + "title": "异度侵入 ID:INVADED", + "is_finish": 1, + "favorites": 3479220, + "newest_ep_index": 13, + "last_ep_index": 0, + "total_count": 13, + "cover": "http:\/\/i0.hdslb.com\/bfs\/bangumi\/image\/9bf9e66968f85b33ec3769a16c86b36dc984abbc.png", + "evaluate": "", + "brief": "本片讲述利用能检测出人们杀意的装置以及利用思想粒子做出的“井”,来探知事件真相的科幻故事。" + }, { + "season_id": "25739", + "share_url": "http:\/\/bangumi.bilibili.com\/anime\/25739\/", + "title": "关于我转生变成史莱姆这档事", + "is_finish": 1, + "favorites": 5518829, + "newest_ep_index": 0, + "last_ep_index": 0, + "total_count": 27, + "cover": "http:\/\/i0.hdslb.com\/bfs\/bangumi\/a4c0e0ccc44fe3949a734f546cf5bb07da925bad.png", + "evaluate": "", + "brief": "史莱姆生活,开始了。\n上班族的三上悟在道路上被歹徒给刺杀身亡后,回过神来发现自己转生到了异世界。\n不..." + }, + ………… + ] + } +} +``` + +
+ +### 查询用户追番(追剧)明细 + +> http://api.bilibili.com/x/space/bangumi/follow/list + +*请求方式:GET* + +认证方式:Cookie(SESSDATA) + +如设置隐私查看自己的需要认证 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | -------------------- | +| vmid | num | 目标用户mid | 必要 | | +| pn | num | 页码 | 非必要 | 默认为1 | +| ps | num | 每页项数 | 非必要 | 默认为15 定义域1-30 | +| type | num | 查询类型 | 必要 | 1:追番
2:追剧 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ---------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ----- | ---------- | ---- | +| list | array | 追番列表 | | +| pn | num | 当前页码 | | +| ps | num | 每页项数 | | +| total | num | 总计追番数 | | + +`data`中的`list`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | -------------------------- | +| 0 | obj | 追番1 | | +| n | obj | 追番(n+1) | 按照目标用户的关注顺序排列 | +| …… | obj | …… | | + +`data`中的`list`数组中的对象: + +基本同「番剧详细信息」中的result对象(未完工) + +**示例:** + +查看用户`mid=14082`的追番明细 + +```shell +curl -G 'http://api.bilibili.com/x/space/bangumi/follow/list' \ +--data-urlencode 'vmid=14082' \ +--data-urlencode 'type=1' \ +--data-urlencode 'ps=2' \ +--data-urlencode 'pn=1' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "list": [{ + "season_id": 29310, + "media_id": 28224080, + "season_type": 1, + "season_type_name": "番剧", + "title": "异度侵入 ID:INVADED", + "cover": "http://i0.hdslb.com/bfs/bangumi/image/9bf9e66968f85b33ec3769a16c86b36dc984abbc.png", + "total_count": 13, + "is_finish": 1, + "is_started": 1, + "is_play": 1, + "badge": "会员专享", + "badge_type": 0, + "rights": { + "allow_review": 1, + "is_selection": 1, + "selection_style": 1 + }, + "stat": { + "follow": 3475768, + "view": 87500861, + "danmaku": 1334654, + "reply": 316632, + "coin": 835150, + "series_follow": 3475242, + "series_view": 87500861 + }, + "new_ep": { + "id": 307774, + "index_show": "全13话", + "cover": "http://i0.hdslb.com/bfs/archive/3dce2b856a7b0ea667aa288b51b7c0478fa56c4d.jpg", + "title": "13", + "long_title": "CHANNELEDⅡ", + "pub_time": "2020-03-23 00:30:00", + "duration": 1481000 + }, + "rating": { + "score": 9.8, + "count": 262589 + }, + "square_cover": "http://i0.hdslb.com/bfs/bangumi/image/664dbf039ec2da8dd982b697a108e28e87b9897e.jpg", + "season_status": 13, + "season_title": "TV", + "badge_ep": "会员", + "media_attr": 196608, + "season_attr": 0, + "evaluate": "本片讲述利用能检测出人们杀意的装置以及利用思想粒子做出的“井”,来探知事件真相的科幻故事。...", + "areas": [{ + "id": 2, + "name": "日本" + }], + "subtitle": "", + "first_ep": 307446, + "can_watch": 1, + "series": { + "series_id": 4760, + "title": "ID:INVADED", + "season_count": 1, + "new_season_id": 29310 + }, + "publish": { + "pub_time": "2020-01-06 00:30:00", + "pub_time_show": "敬请期待", + "release_date": "2020-01-06", + "release_date_show": "2020年1月6日" + }, + "mode": 2, + "section": [{ + "section_id": 39327, + "season_id": 29310, + "limit_group": 328, + "watch_platform": 15, + "copyright": "dujia", + "ban_area_show": 1 + }, { + "section_id": 39633, + "season_id": 29310, + "limit_group": 328, + "watch_platform": 15, + "type": 1, + "copyright": "dujia", + "title": "其他", + "ban_area_show": 1 + }, { + "section_id": 44101, + "season_id": 29310, + "limit_group": 316, + "watch_platform": 15, + "type": 4, + "copyright": "ugc", + "ban_area_show": 1 + }], + "url": "https://www.bilibili.com/bangumi/play/ss29310", + "follow_status": 2, + "is_new": 0, + "progress": "", + "both_follow": true + }, { + "season_id": 25739, + "media_id": 139252, + "season_type": 1, + "season_type_name": "番剧", + "title": "关于我转生变成史莱姆这档事", + "cover": "http://i0.hdslb.com/bfs/bangumi/a4c0e0ccc44fe3949a734f546cf5bb07da925bad.png", + "total_count": 27, + "is_finish": 1, + "is_started": 1, + "is_play": 1, + "badge": "会员专享", + "badge_type": 0, + "rights": { + "allow_review": 1, + "is_selection": 1, + "selection_style": 1 + }, + "stat": { + "follow": 5516519, + "view": 246739631, + "danmaku": 3802465, + "reply": 460225, + "coin": 1338958, + "series_follow": 5516535, + "series_view": 246739631 + }, + "new_ep": { + "id": 316957, + "index_show": "全27话", + "cover": "http://i0.hdslb.com/bfs/archive/81d07d1a478ce3a6209b557e14df9b9c78c42abb.jpg", + "title": "OAD03", + "long_title": "外传:利姆鲁的华丽教师生活 其一", + "pub_time": "2020-03-27 00:00:03", + "duration": 1493000 + }, + "rating": { + "score": 9.4, + "count": 83354 + }, + "square_cover": "http://i0.hdslb.com/bfs/bangumi/8d9f5b4a566d0547bc2e3f6f733b732a09c0d3d4.jpg", + "season_status": 13, + "season_title": "TV", + "badge_ep": "会员", + "media_attr": 0, + "season_attr": 0, + "evaluate": "史莱姆生活,开始了。\n上班族的三上悟在道路上被歹徒给刺杀身亡后,回过神来发现自己转生到了异世界。\n不过,自己居然是“史莱姆”!\n他在得到利姆鲁这个名字后开始了自己的史莱姆人生,随着与各个种族相处交流的...", + "areas": [{ + "id": 2, + "name": "日本" + }], + "subtitle": "", + "first_ep": 250460, + "can_watch": 1, + "series": { + "series_id": 4188, + "title": "关于我转生变成史莱姆这档事", + "season_count": 1, + "new_season_id": 25739 + }, + "publish": { + "pub_time": "2018-10-02 00:30:00", + "pub_time_show": "2018年10月02日00:30", + "release_date": "2018-10-02", + "release_date_show": "2018年10月2日" + }, + "mode": 2, + "section": [{ + "section_id": 34988, + "season_id": 25739, + "limit_group": 328, + "watch_platform": 15, + "copyright": "bilibili", + "ban_area_show": 1 + }], + "url": "https://www.bilibili.com/bangumi/play/ss25739", + "follow_status": 2, + "is_new": 0, + "progress": "", + "both_follow": true + }], + "pn": 1, + "ps": 2, + "total": 25 + } +} +``` + +
+ + + + + +### 查询用户关注的TAG(话题) + +> http://space.bilibili.com/ajax/tags/getSubList + +*请求方式:GET* + +认证方式:Cookie(SESSDATA) + +如设置隐私查看自己的需要认证 + +带有转义 + +只显示前100个 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------ | ---------------------------- | -------------------------------------- | --------------------------- | +| ststus | bool | 返回值 | false:错误
true:正确 | +| data | 错误时:str
正确时:obj | 错误时:错误信息
正确时:数据本体 | 正确时不返回错误信息 | + +`data`对象: + +| 字段 | 类型 | 内容 | 备注 | +| ----- | ----- | ----------- | ---- | +| tags | array | 关注TAG列表 | | +| count | num | 关注TAG的数 | | + +`data`中的`tags`数组: + +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------------- | -------- | +| 0 | obj | 关注TAG1 | | +| n | obj | 关注TAG(n+1) | | +| …… | obj | …… | …… | +| 99 | obj | 关注TAG100 | 最后一项 | + +`data`中的`tags`数组中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| ------------- | ---- | ------------------- | ------------ | +| archive_count | num | 0 | 作用尚不明确 | +| cover | str | TAG图片url | 无则为空 | +| name | str | TAG名 | | +| notify | num | 1 | 作用尚不明确 | +| tag_id | num | tag_id | | +| updated_ts | str | 1970-01-01 08:00:00 | 作用尚不明确 | + +**示例:** + +查询用户`mid=2`的关注TAG + +```shell +curl -G 'http://space.bilibili.com/ajax/tags/getSubList' \ +--data-urlencode 'mid=2' \ +-b 'SESSDATA=xxx' +``` + +
+查看响应示例: + +```json +{ + "status": true, + "data": { + "tags": [{ + "name": "豪宅", + "cover": "", + "tag_id": 47637, + "notify": 1, + "archive_count": 0, + "updated_ts": "1970-01-01 08:00:00" + }, { + "name": "死亡搁浅", + "cover": "", + "tag_id": 1737239, + "notify": 1, + "archive_count": 0, + "updated_ts": "1970-01-01 08:00:00" + }, + ………… + ], + "count": 58 + } +} +``` + +
From 0abdd4b847c8a90e628d41c6fbc4f0a21227b1a5 Mon Sep 17 00:00:00 2001 From: icyu <62145553+vapehacker@users.noreply.github.com> Date: Fri, 23 Jun 2023 13:49:03 +0800 Subject: [PATCH 042/159] =?UTF-8?q?=E4=BF=AE=E6=94=B9wbi=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E6=B5=81=E7=A8=8B=E6=8F=8F=E8=BF=B0=20(#718)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/misc/sign/wbi.md | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/docs/misc/sign/wbi.md b/docs/misc/sign/wbi.md index aa11a05..98df0c0 100644 --- a/docs/misc/sign/wbi.md +++ b/docs/misc/sign/wbi.md @@ -43,7 +43,7 @@ 72136226c6a73669787ee4fd02a74c27 ``` -3. 将欲签名的请求参数排序后编码 +3. 为参数中添加`wts`时间戳 若下方内容为欲签名的请求参数(以 js obj 为例) @@ -51,14 +51,29 @@ { foo: '114', bar: '514', - baz: 1919810 + zab: 1919810 } ``` - 那么按照 Key 排序并进行 url query 编码后的结果应为: + `wts`字段的值应为以秒为单位的 Unix TimeStamp,如`1684746387` + + 将`wts`参数添加在参数列表中,即: + + ```javascript + { + foo: '114', + bar: '514', + zab: 1919810, + wts: 1684746387 + } + ``` + +4. 将欲签名的请求参数排序后编码 + + 按照 Key 升序排序并进行 url query 编码后的结果应为: ``` - bar=514&baz=1919810&foo=114 + bar=514&foo=114&wts=1684746387&zab=1919810 ``` 请注意,如果参数值为中文或特殊字符,则进行 url query 编码后的字符串中参数值对应的字母必须是**大写字母** (部分库会编码为小写字母) @@ -78,34 +93,24 @@ bar=%E4%BA%94%E4%B8%80%E5%9B%9B&baz=1919810&foo=one%20one%20four ``` -4. 为参数中添加`wts`时间戳 - - `wts`字段的值应为以秒为单位的 Unix TimeStamp,如`1684746387` - - 将`wts`参数添加在参数列表最后,即: - - ``` - bar=514&baz=1919810&foo=114&wts=1684746387 - ``` - 5. 计算`w_rid`并添加在其后 在上一步得出的 url query 字符串后拼接第 2 步计算得出的`mixin_key`(作为盐) ``` - bar=514&baz=1919810&foo=114&wts=168474638772136226c6a73669787ee4fd02a74c27 + bar=514&foo=114&wts=1684746387&zab=191981072136226c6a73669787ee4fd02a74c27 ``` 对这个整体进行 **md5 Hash 运算**(32-bit 字符小写),得到的值便是 Wbi Sign,也就是参数`w_rid` ``` - d3cbd2a2316089117134038bf4caf442 + 90efcab09403023875b8516f07e9f9de ``` 最后一步,把这个计算出的值作为参数`w_rid`添加在原始参数列表后,也就完成了一次 Wbi Sign,可以调用 REST API 进行请求了 ``` - bar=514&baz=1919810&foo=114&wts=1684746387&w_rid=d3cbd2a2316089117134038bf4caf442 + bar=514&foo=114&wts=1684746387&zab=1919810&w_rid=90efcab09403023875b8516f07e9f9de ``` ## Wbi签名算法实现Demo From 33696c0fc333f4af94ab430ad985ec6beaf20faf Mon Sep 17 00:00:00 2001 From: aaa1115910 <34527143+aaa1115910@users.noreply.github.com> Date: Sun, 25 Jun 2023 19:46:51 +0800 Subject: [PATCH 043/159] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?`bilibili.polymer.list.list.proto`=20=E5=88=B0=20`bilibili.poly?= =?UTF-8?q?mer.list.v1.list.proto`=20(#720)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grpc_api/bilibili/polymer/list/{ => v1}/list.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename grpc_api/bilibili/polymer/list/{ => v1}/list.proto (94%) diff --git a/grpc_api/bilibili/polymer/list/list.proto b/grpc_api/bilibili/polymer/list/v1/list.proto similarity index 94% rename from grpc_api/bilibili/polymer/list/list.proto rename to grpc_api/bilibili/polymer/list/v1/list.proto index 82e7a65..9d619e0 100644 --- a/grpc_api/bilibili/polymer/list/list.proto +++ b/grpc_api/bilibili/polymer/list/v1/list.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.polymer.list; +package bilibili.polymer.list.v1; // service List { From a8742859fc4a41d6a4fabccf56bb70063a15c942 Mon Sep 17 00:00:00 2001 From: 7rikka Date: Wed, 28 Jun 2023 17:57:02 +0800 Subject: [PATCH 044/159] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Wbi=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E7=9A=84Java=E5=AE=9E=E7=8E=B0=20(#722)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/misc/sign/wbi.md | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/docs/misc/sign/wbi.md b/docs/misc/sign/wbi.md index 98df0c0..9aa4088 100644 --- a/docs/misc/sign/wbi.md +++ b/docs/misc/sign/wbi.md @@ -422,3 +422,60 @@ func main() { fmt.Println(string(body)) } ``` +### Java + +需要 `hutool` 依赖 + +```java +package com.example.demo; + +import cn.hutool.crypto.SecureUtil; + +import java.util.*; + +public class WbiTest { + private static final int[] mixinKeyEncTab = new int[]{ + 46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, + 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, + 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11, + 36, 20, 34, 44, 52 + }; + + public static String getMixinKey(String imgKey, String subKey) { + String s = imgKey + subKey; + StringBuilder key = new StringBuilder(); + for (int i = 0; i < 32; i++) { + key.append(s.charAt(mixinKeyEncTab[i])); + } + return key.toString(); + } + + public static void main(String[] args) { + String imgKey = "653657f524a547ac981ded72ea172057"; + String subKey = "6e4909c702f846728e64f6007736a338"; + String mixinKey = getMixinKey(imgKey, subKey); + System.out.println(mixinKey); + //72136226c6a73669787ee4fd02a74c27 + //{ + // foo: '114', + // bar: '514', + // zab: 1919810 + //} + LinkedHashMap map = new LinkedHashMap<>(); + map.put("foo", "114"); + map.put("bar", "514"); + map.put("zab", 1919810); + map.put("wts", System.currentTimeMillis() / 1000); + StringJoiner param = new StringJoiner("&"); + //排序 + 拼接字符串 + map.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .forEach(entry -> param.add(entry.getKey() + "=" + entry.getValue().toString())); + String s = param + mixinKey; + String wbiSign = SecureUtil.md5(s); + System.out.println(wbiSign); + String finalParam = param + "&w_rid=" + wbiSign; + System.out.println(finalParam); + } +} +``` \ No newline at end of file From 63deb66605188519d6a22b8e9bc396aca72182ad Mon Sep 17 00:00:00 2001 From: kurisu_u <73207840+lanyeeee@users.noreply.github.com> Date: Wed, 28 Jun 2023 18:18:33 +0800 Subject: [PATCH 045/159] =?UTF-8?q?=E7=BB=99Wbi=E7=AD=BE=E5=90=8D=E7=AE=97?= =?UTF-8?q?=E6=B3=95=E7=9A=84Demo=E6=B7=BB=E5=8A=A0C#=E5=AE=9E=E7=8E=B0=20?= =?UTF-8?q?(#719)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 社会易姐QwQ <45892418+SocialSisterYi@users.noreply.github.com> --- docs/misc/sign/wbi.md | 132 +++++++++++++++++++++++++++--------------- 1 file changed, 86 insertions(+), 46 deletions(-) diff --git a/docs/misc/sign/wbi.md b/docs/misc/sign/wbi.md index 9aa4088..5f46543 100644 --- a/docs/misc/sign/wbi.md +++ b/docs/misc/sign/wbi.md @@ -115,7 +115,7 @@ ## Wbi签名算法实现Demo -该 Demo 提供 [Python](#Python)、[JavaScript](#JavaScript)、[Golang](#Golang) 语言 +该 Demo 提供 [Python](#Python)、[JavaScript](#JavaScript)、[Golang](#Golang)、[C#](#CSharp) 语言 ### Python @@ -422,60 +422,100 @@ func main() { fmt.Println(string(body)) } ``` -### Java -需要 `hutool` 依赖 +### CSharp -```java -package com.example.demo; +无需依赖外部库 -import cn.hutool.crypto.SecureUtil; +```cs +using System.Security.Cryptography; +using System.Text; +using System.Text.Json.Nodes; -import java.util.*; +class Program +{ + private static HttpClient _httpClient = new(); -public class WbiTest { - private static final int[] mixinKeyEncTab = new int[]{ - 46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, - 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, - 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11, - 36, 20, 34, 44, 52 + private static readonly int[] MixinKeyEncTab = + { + 46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, 33, 9, 42, 19, 29, 28, 14, 39, + 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, + 57, 62, 11, 36, 20, 34, 44, 52 }; - public static String getMixinKey(String imgKey, String subKey) { - String s = imgKey + subKey; - StringBuilder key = new StringBuilder(); - for (int i = 0; i < 32; i++) { - key.append(s.charAt(mixinKeyEncTab[i])); - } - return key.toString(); + //对 imgKey 和 subKey 进行字符顺序打乱编码 + private static string GetMixinKey(string orig) + { + return MixinKeyEncTab.Aggregate("", (s, i) => s + orig[i])[..32]; } - public static void main(String[] args) { - String imgKey = "653657f524a547ac981ded72ea172057"; - String subKey = "6e4909c702f846728e64f6007736a338"; - String mixinKey = getMixinKey(imgKey, subKey); - System.out.println(mixinKey); - //72136226c6a73669787ee4fd02a74c27 - //{ - // foo: '114', - // bar: '514', - // zab: 1919810 - //} - LinkedHashMap map = new LinkedHashMap<>(); - map.put("foo", "114"); - map.put("bar", "514"); - map.put("zab", 1919810); - map.put("wts", System.currentTimeMillis() / 1000); - StringJoiner param = new StringJoiner("&"); - //排序 + 拼接字符串 - map.entrySet().stream() - .sorted(Map.Entry.comparingByKey()) - .forEach(entry -> param.add(entry.getKey() + "=" + entry.getValue().toString())); - String s = param + mixinKey; - String wbiSign = SecureUtil.md5(s); - System.out.println(wbiSign); - String finalParam = param + "&w_rid=" + wbiSign; - System.out.println(finalParam); + private static Dictionary EncWbi(Dictionary parameters, string imgKey, + string subKey) + { + string mixinKey = GetMixinKey(imgKey + subKey); + string currTime = DateTimeOffset.Now.ToUnixTimeSeconds().ToString(); + //添加 wts 字段 + parameters["wts"] = currTime; + // 按照 key 重排参数 + parameters = parameters.OrderBy(p => p.Key).ToDictionary(p => p.Key, p => p.Value); + //过滤 value 中的 "!'()*" 字符 + parameters = parameters.ToDictionary( + kvp => kvp.Key, + kvp => new string(kvp.Value.Where(chr => !"!'()*".Contains(chr)).ToArray()) + ); + // 序列化参数 + string query = new FormUrlEncodedContent(parameters).ReadAsStringAsync().Result; + //计算 w_rid + using MD5 md5 = MD5.Create(); + byte[] hashBytes = md5.ComputeHash(Encoding.UTF8.GetBytes(query + mixinKey)); + string wbiSign = BitConverter.ToString(hashBytes).Replace("-", "").ToLower(); + parameters["w_rid"] = wbiSign; + + return parameters; + } + + // 获取最新的 img_key 和 sub_key + private static async Task<(string, string)> GetWbiKeys() + { + HttpResponseMessage responseMessage = await _httpClient.SendAsync(new HttpRequestMessage + { + Method = HttpMethod.Get, + RequestUri = new Uri("https://api.bilibili.com/x/web-interface/nav"), + }); + + JsonNode response = JsonNode.Parse(await responseMessage.Content.ReadAsStringAsync())!; + + string imgUrl = (string)response["data"]!["wbi_img"]!["img_url"]!; + imgUrl = imgUrl.Split("/")[^1].Split(".")[0]; + + string subUrl = (string)response["data"]!["wbi_img"]!["sub_url"]!; + subUrl = subUrl.Split("/")[^1].Split(".")[0]; + return (imgUrl, subUrl); + } + + public static async Task Main() + { + var (imgKey, subKey) = await GetWbiKeys(); + + Dictionary signedParams = EncWbi( + parameters: new Dictionary + { + { "foo", "114" }, + { "bar", "514" }, + { "baz", "1919810" } + }, + imgKey: imgKey, + subKey: subKey + ); + + string query = await new FormUrlEncodedContent(signedParams).ReadAsStringAsync(); + + Console.WriteLine(query); } } +``` +输出内容为进行 Wbi 签名的后参数的 url query 形式 + +``` +bar=514&baz=1919810&foo=114&wts=1687541921&w_rid=26e82b1b9b3a11dbb1807a9228a40d3b ``` \ No newline at end of file From 95efa217a8acedcbf7316f550d78a6089d989114 Mon Sep 17 00:00:00 2001 From: maimierjiafude <35167402+maimierjiafude@users.noreply.github.com> Date: Fri, 30 Jun 2023 00:34:59 +0800 Subject: [PATCH 046/159] Update relation.md (#725) * Update relation.md * Update relation.md fix error word --- docs/user/relation.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/user/relation.md b/docs/user/relation.md index 1ac2891..273607a 100644 --- a/docs/user/relation.md +++ b/docs/user/relation.md @@ -1582,7 +1582,7 @@ curl -G 'https://api.bilibili.com/x/relation/relations' \ | 字段 | 类型 | 内容 | 备注 | | ----- | ---- | ---------- | ---- | -| tagid | num | 分组 id | | +| tagid | num | 分组 id | -10:特别关注
0:默认分组 | | name | str | 分组名称 | | | count | num | 分组成员数 | | | tip | str | 提示信息 | | @@ -1653,7 +1653,7 @@ curl 'https://api.bilibili.com/x/relation/tags' \ | access_key | str | APP 登录 Token | APP 方式必要 | | | tagid | num | 分组 id | 必要 | | | order_type | str | 排序方式 | 非必要 | 按照关注顺序排列:留空
按照最常访问排列:attention | -| ps | num | 每页项数 | 非必要 | 默认为 50 | +| ps | num | 每页项数 | 非必要 | 默认为 20 | | pn | num | 页数 | 非必要 | 默认为1 | **json回复:** @@ -1675,6 +1675,38 @@ curl 'https://api.bilibili.com/x/relation/tags' \ | n | obj | 成员信息(n+1) | 按照添加顺序排序 | | …… | obj | …… | …… | +`data` 中的对象: + +| 字段 | 类型 | 内容 | 备注 | +| --------------- | ---- | ----------- | -------------- | +| mid | num | 用户id | | +| attribute | num | 0 | | +| tag | null | null | | +| special | num | 0 | | +| contract_info | json | 空的 | | +| uname | str | 用户名 | | +| face | str | 头像地址 | | +| sign | str | 个人简介 | | +| face_nft | int | ntf头像 | | +| official_verify | json | 官方认证 | 具体见下 | +| vip | json | 大会员 | 参考大会员文档 | +| live | json | 直播状态 | 具体见下 | +| nft_icon | str | 显示nft角标 | | +| rec_reason | str | | | +| track_id | str | | | + +`data`对象中的`official_verify`: +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ------------ | ---- | +| type | num | 0 | | +| desc | str | 官方认证内容 | | + +`data`对象中的`live`: +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | -------- | -------------------- | +| live_status | num | 0或1 | 0:未开播,1:已直播 | +| jump_url | str | 直播链接 | + **示例:** 以每页2项的方式获取了id为`207542`分组的第1页的粉丝明细,按照关注顺序 From fd313b8c1cd2dcbcaf22c5aa68930dbf9354b690 Mon Sep 17 00:00:00 2001 From: 7rikka Date: Fri, 30 Jun 2023 12:27:43 +0800 Subject: [PATCH 047/159] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Wbi=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E7=9A=84Java=E5=AE=9E=E7=8E=B0=20(#726)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/misc/sign/wbi.md | 60 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/docs/misc/sign/wbi.md b/docs/misc/sign/wbi.md index 5f46543..4fc802f 100644 --- a/docs/misc/sign/wbi.md +++ b/docs/misc/sign/wbi.md @@ -115,7 +115,7 @@ ## Wbi签名算法实现Demo -该 Demo 提供 [Python](#Python)、[JavaScript](#JavaScript)、[Golang](#Golang)、[C#](#CSharp) 语言 +该 Demo 提供 [Python](#Python)、[JavaScript](#JavaScript)、[Golang](#Golang)、[C#](#CSharp) 语言、[Java](#Java) ### Python @@ -518,4 +518,62 @@ class Program ``` bar=514&baz=1919810&foo=114&wts=1687541921&w_rid=26e82b1b9b3a11dbb1807a9228a40d3b +``` + +### Java + +需要 `hutool` 依赖 + +```java +package com.example.demo; + +import cn.hutool.crypto.SecureUtil; + +import java.util.*; + +public class WbiTest { + private static final int[] mixinKeyEncTab = new int[]{ + 46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, + 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, + 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11, + 36, 20, 34, 44, 52 + }; + + public static String getMixinKey(String imgKey, String subKey) { + String s = imgKey + subKey; + StringBuilder key = new StringBuilder(); + for (int i = 0; i < 32; i++) { + key.append(s.charAt(mixinKeyEncTab[i])); + } + return key.toString(); + } + + public static void main(String[] args) { + String imgKey = "653657f524a547ac981ded72ea172057"; + String subKey = "6e4909c702f846728e64f6007736a338"; + String mixinKey = getMixinKey(imgKey, subKey); + System.out.println(mixinKey); + //72136226c6a73669787ee4fd02a74c27 + //{ + // foo: 'one one four', + // bar: '五一四', + // baz: 1919810 + //} + LinkedHashMap map = new LinkedHashMap<>(); + map.put("foo", "one one four"); + map.put("bar", "五一四"); + map.put("baz", 1919810); + map.put("wts", System.currentTimeMillis() / 1000); + StringJoiner param = new StringJoiner("&"); + //排序 + 拼接字符串 + map.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .forEach(entry -> param.add(entry.getKey() + "=" + URLUtil.encode(entry.getValue().toString()))); + String s = param + mixinKey; + String wbiSign = SecureUtil.md5(s); + System.out.println(wbiSign); + String finalParam = param + "&w_rid=" + wbiSign; + System.out.println(finalParam); + } +} ``` \ No newline at end of file From 901e787fc655962b88dac9896b25f41d796cd2c9 Mon Sep 17 00:00:00 2001 From: cctyl <34262992+cctyl@users.noreply.github.com> Date: Sat, 1 Jul 2023 18:44:49 -0700 Subject: [PATCH 048/159] =?UTF-8?q?feature:=20App=20Sign=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0java=E7=89=88=E6=9C=AC=E5=AE=9E=E7=8E=B0=20(#729)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feature: App Sign 添加java版本实现 * modify: 优化签名代码以及文档 --- docs/misc/sign/APP.md | 70 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/docs/misc/sign/APP.md b/docs/misc/sign/APP.md index b2cc7c2..7c4f899 100644 --- a/docs/misc/sign/APP.md +++ b/docs/misc/sign/APP.md @@ -23,7 +23,7 @@ ## Demo -该 Demo 提供 [Python](#Python) 语言例程 +该 Demo 提供 [Python](#Python) 和 [Java](#Java) 语言例程 使用 appkey = `1d8b6e7d45233436`, appsec = `560c52ccd288fed045859ed18bffd973` 对如下 `params` 参数进行签名 @@ -63,3 +63,71 @@ print(query) {'appkey': '1d8b6e7d45233436', 'id': 114514, 'str': '1919810', 'test': 'いいよ,こいよ', 'sign': '01479cf20504d865519ac50f33ba3a7d'} appkey=1d8b6e7d45233436&id=114514&str=1919810&test=%E3%81%84%E3%81%84%E3%82%88%EF%BC%8C%E3%81%93%E3%81%84%E3%82%88&sign=01479cf20504d865519ac50f33ba3a7d ``` + +### Java + + +```java +package io.github.cctyl; + +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.net.URLEncoder; +import java.util.TreeMap; + +/** + * @author cctyl + */ +public class AppSigner { + + private static final String APP_KEY = "1d8b6e7d45233436"; + private static final String APP_SEC = "560c52ccd288fed045859ed18bffd973"; + + public static String appSign(Map params) { + // 为请求参数进行 APP 签名 + params.put("appkey", APP_KEY); + // 按照 key 重排参数 + Map sortedParams = new TreeMap<>(params); + // 序列化参数 + StringBuilder queryBuilder = new StringBuilder(); + for (Map.Entry entry : sortedParams.entrySet()) { + if (queryBuilder.length() > 0) { + queryBuilder.append('&'); + } + queryBuilder + .append(URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8)) + .append('=') + .append(URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8)); + } + return generateMD5(queryBuilder .append(APP_SEC).toString()); + } + + private static String generateMD5(String input) { + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + byte[] digest = md.digest(input.getBytes()); + StringBuilder sb = new StringBuilder(); + for (byte b : digest) { + sb.append(String.format("%02x", b)); + } + return sb.toString(); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + return null; + } + + public static void main(String[] args) { + Map params = new HashMap<>(); + params.put("id", "114514"); + params.put("str", "1919810"); + params.put("test", "いいよ,こいよ"); + System.out.println(appSign(params)); + } +} +``` + +输出结果为:01479cf20504d865519ac50f33ba3a7d From d023b55918b3d171eca0e9092f7e55a20a10cf0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=AE=87?= <63290381+xiaoyv404@users.noreply.github.com> Date: Sun, 2 Jul 2023 17:37:01 +0800 Subject: [PATCH 049/159] Fix language list error (#731) --- docs/misc/sign/wbi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/misc/sign/wbi.md b/docs/misc/sign/wbi.md index 4fc802f..68ba566 100644 --- a/docs/misc/sign/wbi.md +++ b/docs/misc/sign/wbi.md @@ -115,7 +115,7 @@ ## Wbi签名算法实现Demo -该 Demo 提供 [Python](#Python)、[JavaScript](#JavaScript)、[Golang](#Golang)、[C#](#CSharp) 语言、[Java](#Java) +该 Demo 提供 [Python](#Python)、[JavaScript](#JavaScript)、[Golang](#Golang)、[C#](#CSharp)和[Java](#Java) 语言 ### Python From 7d389d8f72ff77fc53ae909c7dec1dc33c47a32e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AF=92=E5=BD=A4?= <70561268+cxw620@users.noreply.github.com> Date: Mon, 3 Jul 2023 16:44:26 +0800 Subject: [PATCH 050/159] update grpc_api from 7.26.0 (#728) * update package bilibili.pgc.gateway.player.v2 from 7.26.0 * update package bilibili.app.viewunite.v1 from 7.26.0 * delete some unused grpc package based on 7.26.0 * update package bilibili.playershared from 7.26.0 * update package bilibili.polymer.app.search.v1 from 7.26.0 * redir package bilibili.polymer.contract.v1 * update package bilibili.app.dynamic.v2 from 7.26.0 * add package bilibili.app.search.v2 from 7.26.0 * fix: typo --- .../bilibili/app/dynamic/common/dynamic.proto | 22 + grpc_api/bilibili/app/dynamic/v2/campus.proto | 66 + .../bilibili/app/dynamic/v2/dynamic.proto | 2562 +++++++++++++---- grpc_api/bilibili/app/dynamic/v2/opus.proto | 59 + grpc_api/bilibili/app/search/v2/search.proto | 110 + .../bilibili/app/viewunite/v1/viewunite.proto | 6 +- .../broadcast/message/main/search.proto | 29 + .../pgc/gateway/player/v2/playurl.proto | 452 ++- .../pgc/gateway/player/v3/playurl.proto | 32 - .../bilibili/playershared/playershared.proto | 408 +-- .../polymer/app/search/v1/search.proto | 26 +- .../polymer/contract/{ => v1}/contract.proto | 2 +- 12 files changed, 2922 insertions(+), 852 deletions(-) create mode 100644 grpc_api/bilibili/app/dynamic/common/dynamic.proto create mode 100644 grpc_api/bilibili/app/dynamic/v2/campus.proto create mode 100644 grpc_api/bilibili/app/dynamic/v2/opus.proto create mode 100644 grpc_api/bilibili/app/search/v2/search.proto create mode 100644 grpc_api/bilibili/broadcast/message/main/search.proto delete mode 100644 grpc_api/bilibili/pgc/gateway/player/v3/playurl.proto rename grpc_api/bilibili/polymer/contract/{ => v1}/contract.proto (97%) diff --git a/grpc_api/bilibili/app/dynamic/common/dynamic.proto b/grpc_api/bilibili/app/dynamic/common/dynamic.proto new file mode 100644 index 0000000..be54d7e --- /dev/null +++ b/grpc_api/bilibili/app/dynamic/common/dynamic.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package bilibili.app.dynamic.common; + + +// +message ItemWHRatio { + // + int32 ratio = 1; + // + int32 width = 2; + // + int32 height = 3; +} + +// +enum WHRatio { + W_H_RATIO_1_1 = 0; + W_H_RATIO_16_9 = 1; + W_H_RATIO_3_4 = 2; + W_H_RATIO_CUSTOM = 3; +} diff --git a/grpc_api/bilibili/app/dynamic/v2/campus.proto b/grpc_api/bilibili/app/dynamic/v2/campus.proto new file mode 100644 index 0000000..3859c2e --- /dev/null +++ b/grpc_api/bilibili/app/dynamic/v2/campus.proto @@ -0,0 +1,66 @@ + +syntax = "proto3"; + +package bilibili.app.dynamic.v2; + +import "bilibili/app/archive/middleware/v1/preload.proto"; +import "bilibili/pagination/pagination.proto"; +import "bilibili/app/dynamic/common/dynamic.proto"; +import "bilibili/app/dynamic/v2/dynamic.proto"; + +service Campus { + // + rpc WaterFlowRcmd (WaterFlowRcmdReq) returns (WaterFlowRcmdReply); +} + +// +message CampusWaterFlowItem { + // + int32 item_type = 1; + // + bilibili.app.dynamic.common.ItemWHRatio wh_ratio = 2; + // + oneof item { + WFItemDefault item_default = 3; + } +} + +// +message WaterFlowRcmdReq { + // + int64 campus_id = 1; + // + int32 page = 2; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 3; + // + CampusRcmdReqFrom from = 4; +} + +// +message WaterFlowRcmdResp { + // + repeated CampusWaterFlowItem items = 1; + // + bilibili.pagination.FeedPaginationReply offset = 2; +} + +// +message WFItemDefault { + // + string title = 1; + // + string cover = 2; + // + CoverIconWithText bottom_left_1 = 3; + // + CoverIconWithText bottom_left_2 = 4; + // + CoverIconWithText bottom_right_1 = 5; + // + string uri = 6; + // + RcmdReason rcmd_reason = 7; + // + map annotations = 8; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/dynamic/v2/dynamic.proto b/grpc_api/bilibili/app/dynamic/v2/dynamic.proto index 2cb1474..0cb27da 100644 --- a/grpc_api/bilibili/app/dynamic/v2/dynamic.proto +++ b/grpc_api/bilibili/app/dynamic/v2/dynamic.proto @@ -4,101 +4,122 @@ package bilibili.app.dynamic.v2; import "google/protobuf/any.proto"; import "bilibili/app/archive/middleware/v1/preload.proto"; +import "bilibili/dagw/component/avatar/v1/avatar.proto"; -// v2动态 +// v2动态, rpc 按字母顺序排列 service Dynamic { - // 动态视频页 - rpc DynVideo(DynVideoReq) returns (DynVideoReply); + // + rpc AlumniDynamics (AlumniDynamicsReq) returns (AlumniDynamicsReply); + // + rpc CampusBillBoard (CampusBillBoardReq) returns (CampusBillBoardReply); + // + rpc CampusEntryTab(CampusEntryTabReq) returns (CampusEntryTabResp); + // + rpc CampusFeedback(CampusFeedbackReq) returns (CampusFeedbackReply); + // + rpc CampusHomePages(CampusHomePagesReq) returns (CampusHomePagesReply); + // + rpc CampusMateLikeList(CampusMateLikeListReq) returns (CampusMateLikeListReply); + // + rpc CampusMngDetail(CampusMngDetailReq) returns (CampusMngDetailReply); + // + rpc CampusMngQuizOperate(CampusMngQuizOperateReq) returns (CampusMngQuizOperateReply); + // + rpc CampusMngSubmit(CampusMngSubmitReq) returns (CampusMngSubmitReply); + // + rpc CampusRcmd(CampusRcmdReq) returns (CampusRcmdReply); + // + rpc CampusRcmdFeed(CampusRcmdFeedReq) returns (CampusRcmdFeedReply); + // + rpc CampusRecommend(CampusRecommendReq) returns (CampusRecommendReply); + // + rpc CampusRedDot(CampusRedDotReq) returns (CampusRedDotReply); + // + rpc CampusSquare(CampusSquareReq) returns (CampusSquareReply); + // + rpc CampusTopicRcmdFeed(CampusTopicRcmdFeedReq) returns (CampusTopicRcmdFeedReply); + // 动态通用附加卡-follow/取消follow + rpc DynAdditionCommonFollow(DynAdditionCommonFollowReq) returns (DynAdditionCommonFollowReply); // 动态综合页 rpc DynAll(DynAllReq) returns (DynAllReply); - // 批量动态id获取动态详情 - rpc DynDetails(DynDetailsReq) returns (DynDetailsReply); - // 视频页最近访问 - 个人feed流 - rpc DynVideoPersonal(DynVideoPersonalReq) returns (DynVideoPersonalReply); - // 视频页最近访问 - 标记已读 - rpc DynVideoUpdOffset(DynVideoUpdOffsetReq) returns (NoReply); - // 动态通用附加卡-follow/取消follow - rpc DynAdditionCommonFollow(DynAdditionCommonFollowReq) returns(DynAdditionCommonFollowReply); - // 动态点赞 - rpc DynThumb(DynThumbReq) returns(NoReply); - // 动态发布生成临时卡 - rpc DynFakeCard(DynFakeCardReq) returns(DynFakeCardReply); - // 关注推荐up主换一换 - rpc DynRcmdUpExchange(DynRcmdUpExchangeReq) returns(DynRcmdUpExchangeReply); // 综合页最近访问 - 个人feed流 rpc DynAllPersonal(DynAllPersonalReq) returns (DynAllPersonalReply); // 综合页最近访问 - 标记已读 rpc DynAllUpdOffset(DynAllUpdOffsetReq) returns (NoReply); - // 投票操作接口 - rpc DynVote(DynVoteReq) returns (DynVoteReply); - // 网关调用 - 查看更多-列表 - rpc DynMixUpListViewMore(DynMixUpListViewMoreReq) returns (DynMixUpListViewMoreReply); - // 轻浏览 - rpc DynLight(DynLightReq) returns (DynLightReply); // 动态详情页 rpc DynDetail(DynDetailReq) returns (DynDetailReply); - // 点赞列表 - rpc LikeList(LikeListReq) returns (LikeListReply); - // 转发列表 - rpc RepostList(RepostListReq) returns (RepostListRsp); - // 新版动态转发点赞列表 需要登录 - rpc ReactionList(ReactionListReq) returns (ReactionListReply); + // 批量动态id获取动态详情 + rpc DynDetails(DynDetailsReq) returns (DynDetailsReply); + // 动态发布生成临时卡 + rpc DynFakeCard(DynFakeCardReq) returns (DynFakeCardReply); + // + rpc DynFriend(DynFriendReq) returns (DynFriendReply); + // 轻浏览 + rpc DynLight(DynLightReq) returns (DynLightReply); + // 网关调用 - 查看更多-列表 + rpc DynMixUpListViewMore(DynMixUpListViewMoreReq) returns (DynMixUpListViewMoreReply); + // 关注推荐up主换一换 + rpc DynRcmdUpExchange(DynRcmdUpExchangeReq) returns (DynRcmdUpExchangeReply); + // + rpc DynSearch(DynSearchReq) returns (DynSearchReply); + // + rpc DynServerDetails(DynServerDetailsReq) returns (DynServerDetailsReply); // 空间页动态 rpc DynSpace(DynSpaceReq) returns (DynSpaceRsp); + // + rpc DynSpaceSearchDetails(DynSpaceSearchDetailsReq) returns (DynSpaceSearchDetailsReply); + // + rpc DynTab(DynTabReq) returns (DynTabReply); + // 动态点赞 + rpc DynThumb(DynThumbReq) returns (NoReply); // 未登录页分区UP主推荐 rpc DynUnLoginRcmd(DynRcmdReq) returns (DynRcmdReply); - // - rpc DynServerDetails (DynServerDetailsReq) returns (DynServerDetailsReply); - // - rpc DynSearch(DynSearchReq) returns (DynSearchReply); - // - rpc SetDecision(SetDecisionReq) returns (NoReply); - // - rpc AlumniDynamics(AlumniDynamicsReq) returns (AlumniDynamicsReply); - // - rpc CampusRcmd(CampusRcmdReq) returns (CampusRcmdReply); - // - rpc SubscribeCampus(SubscribeCampusReq) returns (NoReply); - // - rpc SetRecentCampus(SetRecentCampusReq) returns (NoReply); - // - rpc DynTab(DynTabReq) returns (DynTabReply); - // - rpc SchoolSearch(SchoolSearchReq) returns (SchoolSearchReply); - // - rpc SchoolRecommend(SchoolRecommendReq) returns (SchoolRecommendReply); - // - rpc DynSpaceSearchDetails(DynSpaceSearchDetailsReq) returns (DynSpaceSearchDetailsReply); - // + // 动态视频页 + rpc DynVideo(DynVideoReq) returns (DynVideoReply); + // 视频页最近访问 - 个人feed流 + rpc DynVideoPersonal(DynVideoPersonalReq) returns (DynVideoPersonalReply); + // 视频页最近访问 - 标记已读 + rpc DynVideoUpdOffset(DynVideoUpdOffsetReq) returns (NoReply); + // + rpc DynVote(DynVoteReq) returns (DynVoteReply); + // + rpc FeedFilter(FeedFilterReq) returns (FeedFilterReply); + // + rpc FetchTabSetting(NoReq) returns (FetchTabSettingReply); + // + rpc HomeSubscribe(HomeSubscribeReq) returns (HomeSubscribeReply); + // + rpc LbsPoi(LbsPoiReq) returns (LbsPoiReply); + // + rpc LegacyTopicFeed(LegacyTopicFeedReq) returns (LegacyTopicFeedReply); + // 点赞列表 + rpc LikeList(LikeListReq) returns (LikeListReply); + // rpc OfficialAccounts(OfficialAccountsReq) returns (OfficialAccountsReply); - // + // rpc OfficialDynamics(OfficialDynamicsReq) returns (OfficialDynamicsReply); - // - rpc CampusRedDot(CampusRedDotReq) returns (CampusRedDotReply); - // - rpc CampusRcmdFeed(CampusRcmdFeedReq) returns (CampusRcmdFeedReply); - // - rpc TopicSquare(TopicSquareReq) returns (TopicSquareReply); - // + // 新版动态转发点赞列表 需要登录 + rpc ReactionList(ReactionListReq) returns (ReactionListReply); + // 转发列表 + rpc RepostList(RepostListReq) returns (RepostListRsp); + // + rpc SchoolRecommend(SchoolRecommendReq) returns (SchoolRecommendReply); + // + rpc SchoolSearch(SchoolSearchReq) returns (SchoolSearchReply); + // + rpc SetDecision(SetDecisionReq) returns (NoReply); + // + rpc SetRecentCampus(SetRecentCampusReq) returns (NoReply); + // + rpc SubscribeCampus(SubscribeCampusReq) returns (NoReply); + // rpc TopicList(TopicListReq) returns (TopicListReply); - // - rpc CampusMateLikeList(CampusMateLikeListReq) returns (CampusMateLikeListReply); - // - rpc CampusFeedback(CampusFeedbackReq) returns (CampusFeedbackReply); - // - rpc CampusBillboard(CampusBillBoardReq) returns (CampusBillBoardReply); - // - rpc CampusBillboardInternal(CampusBillboardInternalReq) returns (CampusBillBoardReply); - // - rpc CampusTopicRcmdFeed(CampusTopicRcmdFeedReq) returns (CampusTopicRcmdFeedReply); -} - -// 综合页请求广告所需字段,由客户端-网关透传 -message AdParam { - // 综合页请求广告所需字段,由客户端-网关透传 - string ad_extra = 1; - // request_id - string request_id = 2; + // + rpc TopicSquare(TopicSquareReq) returns (TopicSquareReply); + // + rpc UnfollowMatch(UnfollowMatchReq) returns (NoReply); + // + rpc UpdateTabSetting(UpdateTabSettingReq) returns (NoReply); } // @@ -115,309 +136,6 @@ enum AddButtonType { bt_button = 2; // 按钮 } -// 动态-附加卡-通用卡 -message AdditionCommon { - // 头部说明文案 - string head_text = 1; - // 标题 - string title = 2; - // 展示图 - string image_url = 3; - // 描述文字1 - string desc_text_1 = 4; - // 描述文字2 - string desc_text_2 = 5; - // 点击跳转链接 - string url = 6; - // 按钮 - AdditionalButton button = 7; - // 头部icon - string head_icon = 8; - // style - ImageStyle style = 9; - // 动态本身的类型 type - string type = 10; - // 附加卡类型 - string card_type = 11; // ogv manga -} - -// 动态-附加卡-电竞卡 -message AdditionEsport { - // 电竞类型 - EspaceStyle style = 1; - oneof item { - // moba类 - AdditionEsportMoba addition_esport_moba = 2; - } - // 动态本身的类型 type - string type = 3; - // 附加卡类型 - string card_type = 4; // ogv manga -} - -// 动态-附加卡-电竞卡-moba类 -message AdditionEsportMoba { - // 头部说明文案 - string head_text = 1; - // 标题 - string title = 2; - // 战队列表 - repeated MatchTeam match_team = 3; - // 比赛信息 - AdditionEsportMobaStatus addition_esport_moba_status = 4; - // 卡片跳转 - string uri = 5; - // 按钮 - AdditionalButton button = 6; - // 副标题 - string sub_title = 7; - // 动态本身的类型 type - string type = 10; - // 附加卡类型 - string card_type = 11; - // 附加卡图标 - string head_icon = 12; -} - -// 动态-附加卡-电竞卡-moba类-比赛信息 -message AdditionEsportMobaStatus { - // 文案类 - repeated AdditionEsportMobaStatusDesc addition_esport_moba_status_desc = 1; - // 比赛状态文案 - string title = 2; - // 比赛状态状态 - int32 status = 3; - // 日间色值 - string color = 4; - // 夜间色值 - string night_color = 5; -} - -// 动态-附加卡-电竞卡-moba类-比赛信息-文案类 -message AdditionEsportMobaStatusDesc { - // 文案 - string title = 1; - // 日间色值 - string color = 2; - // 夜间色值 - string night_color = 3; -} - -// 动态-附加卡-商品卡 -message AdditionGoods { - // 推荐文案 - string rcmd_desc = 1; - // 商品信息 - repeated GoodsItem goods_items = 2; - // 附加卡类型 - string card_type = 3; - // 头部icon - string icon = 4; - // 商品附加卡整卡跳转 - string uri = 5; - // 商品类型 - // 1:淘宝 2:会员购,注:实际是获取的goods_items里面的第一个source_type - int32 source_type = 6; -} - -// up主预约发布卡 -message AdditionUP { - // 标题 - string title = 1; - // 高亮文本,描述文字1 - HighlightText desc_text_1 = 2; - // 描述文字2 - string desc_text_2 = 3; - // 点击跳转链接 - string url = 4; - // 按钮 - AdditionalButton button = 5; - // 附加卡类型 - string card_type = 6; - // 预约人数(用于预约人数变化) - int64 reserve_total = 7; - // 活动皮肤 - AdditionalActSkin act_skin = 8; - // 预约id - int64 rid = 9; - // - int32 lottery_type = 10; - // - HighlightText desc_text3 = 11; - // - int64 up_mid = 12; - // - AdditionUserInfo user_info = 13; - // - string dynamic_id = 14; - // - bool show_text2 = 15; - // - int64 dyn_type = 16; - // - string business_id = 17; -} - -// 动态-附加卡-UGC视频附加卡 -message AdditionUgc { - // 说明文案 - string head_text = 1; - // 稿件标题 - string title = 2; - // 封面 - string cover = 3; - // 描述文字1 - string desc_text_1 = 4; - // 描述文字2 - string desc_text_2 = 5; - // 接秒开 - string uri = 6; - // 时长 - string duration = 7; - // 标题支持换行-标题支持单行和双行,本期不支持填充up昵称,支持双行展示,字段默认为true - bool line_feed = 8; - // 附加卡类型 - string card_type = 9; -} - -// -message AdditionUserInfo { - // - string name = 1; - // - string face = 2; -} - -// 动态-附加卡-投票 -message AdditionVote { - // 封面图 - string image_url = 1; - // 标题 - string title = 2; - // 展示项1 - string text_1 = 3; - // button文案 - string button_text = 4; - // 点击跳转链接 - string url = 5; -} - -// 动态模块-投票 -message AdditionVote2 { - // 投票类型 - AdditionVoteType addition_vote_type = 1; - // 投票ID - int64 vote_id = 2; - // 标题 - string title = 3; - // 已过期: xxx人参与· 投票已过期。button 展示去查看 - // 未过期: xxx人参与· 剩xx天xx时xx分。button展示去投票 - string label = 4; - // 剩余时间 - int64 deadline = 5; - // 生效文案 - string open_text = 6; - // 过期文案 - string close_text = 7; - // 已投票 - string voted_text = 8; - // 投票状态 - AdditionVoteState state = 9; - // 投票信息 - oneof item { - // - AdditionVoteWord addition_vote_word = 10; - // - AdditionVotePic addition_vote_pic = 11; - // - AdditionVoteDefaule addition_vote_defaule = 12; - } - // 业务类型 - // 0:动态投票 1:话题h5组件 - int32 biz_type = 13; - // 投票总人数 - int64 total = 14; - // 附加卡类型 - string card_type = 15; - // 异常提示 - string tips = 16; - // 跳转地址 - string uri = 17; - // 是否投票 - bool is_voted = 18; - // 投票最多多选个数,单选为1 - int32 choice_cnt = 19; - // 是否默认选中分享到动态 - bool defaule_select_share = 20; -} - -// 外露投票 -message AdditionVoteDefaule { - // 图片 多张 - repeated string cover = 1; -} - -// 外露图片类型 -message AdditionVotePic { - // 图片投票详情 - repeated AdditionVotePicItem item = 1; -} - -// 图片投票详情 -message AdditionVotePicItem { - // 选项索引,从1开始 - int32 opt_idx = 1; - // 图片 - string cover = 2; - // 选中状态 - bool is_vote = 3; - // 人数 - int32 total = 4; - // 占比 - double persent = 5; - // 标题文案 - string title = 6; - // 是否投票人数最多的选项 - bool is_max_option = 7; -} - -// 投票状态 -enum AdditionVoteState { - addition_vote_state_none = 0; // - addition_vote_state_open = 1; // - addition_vote_state_close = 2; // -} - -// 投票类型 -enum AdditionVoteType { - addition_vote_type_none = 0; // - addition_vote_type_word = 1; // - addition_vote_type_pic = 2; // - addition_vote_type_default = 3; // -} - -// 外露文字类型 -message AdditionVoteWord { - // 外露文字投票详情 - repeated AdditionVoteWordItem item = 1; -} - -// 外露文字投票详情 -message AdditionVoteWordItem { - // 选项索引,从1开始 - int32 opt_idx = 1; - // 文案 - string title = 2; - // 选中状态 - bool is_vote = 3; - // 人数 - int32 total = 4; - // 占比 - double persent = 5; - // 是否投票人数最多的选项 - bool is_max_option = 6; -} - // 活动皮肤 message AdditionalActSkin { // 动画SVGA资源 @@ -543,6 +261,362 @@ enum AdditionalType { additional_type_up_reservation = 8; // UP主预约卡 } +// 动态-附加卡-专栏 +message AdditionArticle { + // + string title = 1; + // + MdlDynDrawItem cover = 2; + // + string desc_text_left = 3; + // + string desc_text_right = 4; + // + string uri = 5; + // + string card_type = 6; +} + +// 动态-附加卡-通用卡 +message AdditionCommon { + // 头部说明文案 + string head_text = 1; + // 标题 + string title = 2; + // 展示图 + string image_url = 3; + // 描述文字1 + string desc_text_1 = 4; + // 描述文字2 + string desc_text_2 = 5; + // 点击跳转链接 + string url = 6; + // 按钮 + AdditionalButton button = 7; + // 头部icon + string head_icon = 8; + // style + ImageStyle style = 9; + // 动态本身的类型 type + string type = 10; + // 附加卡类型 + string card_type = 11; // ogv manga +} + +// 动态-附加卡-电竞卡 +message AdditionEsport { + // 电竞类型 + EspaceStyle style = 1; + oneof item { + // moba类 + AdditionEsportMoba addition_esport_moba = 2; + } + // 动态本身的类型 type + string type = 3; + // 附加卡类型 + string card_type = 4; // ogv manga +} + +// 动态-附加卡-电竞卡-moba类 +message AdditionEsportMoba { + // 头部说明文案 + string head_text = 1; + // 标题 + string title = 2; + // 战队列表 + repeated MatchTeam match_team = 3; + // 比赛信息 + AdditionEsportMobaStatus addition_esport_moba_status = 4; + // 卡片跳转 + string uri = 5; + // 按钮 + AdditionalButton button = 6; + // 副标题 + string sub_title = 7; + // 动态本身的类型 type + string type = 10; + // 附加卡类型 + string card_type = 11; + // 附加卡图标 + string head_icon = 12; +} + +// 动态-附加卡-电竞卡-moba类-比赛信息 +message AdditionEsportMobaStatus { + // 文案类 + repeated AdditionEsportMobaStatusDesc addition_esport_moba_status_desc = 1; + // 比赛状态文案 + string title = 2; + // 比赛状态状态 + int32 status = 3; + // 日间色值 + string color = 4; + // 夜间色值 + string night_color = 5; +} + +// 动态-附加卡-电竞卡-moba类-比赛信息-文案类 +message AdditionEsportMobaStatusDesc { + // 文案 + string title = 1; + // 日间色值 + string color = 2; + // 夜间色值 + string night_color = 3; +} + +// 动态-附加卡-商品卡 +message AdditionGoods { + // 推荐文案 + string rcmd_desc = 1; + // 商品信息 + repeated GoodsItem goods_items = 2; + // 附加卡类型 + string card_type = 3; + // 头部icon + string icon = 4; + // 商品附加卡整卡跳转 + string uri = 5; + // 商品类型 + // 1:淘宝 2:会员购,注:实际是获取的goods_items里面的第一个source_type + int32 source_type = 6; + // + int32 jump_type = 7; + // + string app_name = 8; + // + string ad_mark_icon = 9; +} + +// 动态-附加卡-直播附加卡 +message AdditionLiveRoom { + // + string title = 1; + // + string cover = 2; + // + VideoBadge badge = 3; + // + CoverIconWithText desc_text_upper = 4; + // + string desc_text_lower = 5; + // + string uri = 6; + // + string card_type = 7; +} + +// 动态-附加卡-UGC视频附加卡 +message AdditionUgc { + // 说明文案 + string head_text = 1; + // 稿件标题 + string title = 2; + // 封面 + string cover = 3; + // 描述文字1 + string desc_text_1 = 4; + // 描述文字2 + string desc_text_2 = 5; + // 接秒开 + string uri = 6; + // 时长 + string duration = 7; + // 标题支持换行-标题支持单行和双行,本期不支持填充up昵称,支持双行展示,字段默认为true + bool line_feed = 8; + // 附加卡类型 + string card_type = 9; +} + +// up主预约发布卡 +message AdditionUP { + // 标题 + string title = 1; + // 高亮文本,描述文字1 + HighlightText desc_text_1 = 2; + // 描述文字2 + string desc_text_2 = 3; + // 点击跳转链接 + string url = 4; + // 按钮 + AdditionalButton button = 5; + // 附加卡类型 + string card_type = 6; + // 预约人数(用于预约人数变化) + int64 reserve_total = 7; + // 活动皮肤 + AdditionalActSkin act_skin = 8; + // 预约id + int64 rid = 9; + // + int32 lottery_type = 10; + // + HighlightText desc_text3 = 11; + // + int64 up_mid = 12; + // + AdditionUserInfo user_info = 13; + // + string dynamic_id = 14; + // + bool show_text2 = 15; + // + int64 dyn_type = 16; + // + string business_id = 17; + // + string badge_text = 18; + // + bool is_premiere = 19; +} + +// +message AdditionUserInfo { + // + string name = 1; + // + string face = 2; +} + +// 动态-附加卡-投票 +message AdditionVote { + // 封面图 + string image_url = 1; + // 标题 + string title = 2; + // 展示项1 + string text_1 = 3; + // button文案 + string button_text = 4; + // 点击跳转链接 + string url = 5; +} + +// 动态模块-投票 +message AdditionVote2 { + // 投票类型 + AdditionVoteType addition_vote_type = 1; + // 投票ID + int64 vote_id = 2; + // 标题 + string title = 3; + // 已过期: xxx人参与· 投票已过期。button 展示去查看 + // 未过期: xxx人参与· 剩xx天xx时xx分。button展示去投票 + string label = 4; + // 剩余时间 + int64 deadline = 5; + // 生效文案 + string open_text = 6; + // 过期文案 + string close_text = 7; + // 已投票 + string voted_text = 8; + // 投票状态 + AdditionVoteState state = 9; + // 投票信息 + oneof item { + // + AdditionVoteWord addition_vote_word = 10; + // + AdditionVotePic addition_vote_pic = 11; + // + AdditionVoteDefaule addition_vote_defaule = 12; + } + // 业务类型 + // 0:动态投票 1:话题h5组件 + int32 biz_type = 13; + // 投票总人数 + int64 total = 14; + // 附加卡类型 + string card_type = 15; + // 异常提示 + string tips = 16; + // 跳转地址 + string uri = 17; + // 是否投票 + bool is_voted = 18; + // 投票最多多选个数,单选为1 + int32 choice_cnt = 19; + // 是否默认选中分享到动态 + bool defaule_select_share = 20; +} + +// 外露投票 +message AdditionVoteDefaule { + // 图片 多张 + repeated string cover = 1; +} + +// 外露图片类型 +message AdditionVotePic { + // 图片投票详情 + repeated AdditionVotePicItem item = 1; +} + +// 图片投票详情 +message AdditionVotePicItem { + // 选项索引,从1开始 + int32 opt_idx = 1; + // 图片 + string cover = 2; + // 选中状态 + bool is_vote = 3; + // 人数 + int32 total = 4; + // 占比 + double persent = 5; + // 标题文案 + string title = 6; + // 是否投票人数最多的选项 + bool is_max_option = 7; +} + +// 投票状态 +enum AdditionVoteState { + addition_vote_state_none = 0; // + addition_vote_state_open = 1; // + addition_vote_state_close = 2; // +} + +// 投票类型 +enum AdditionVoteType { + addition_vote_type_none = 0; // + addition_vote_type_word = 1; // + addition_vote_type_pic = 2; // + addition_vote_type_default = 3; // +} + + +// 外露文字类型 +message AdditionVoteWord { + // 外露文字投票详情 + repeated AdditionVoteWordItem item = 1; +} + +// 外露文字投票详情 +message AdditionVoteWordItem { + // 选项索引,从1开始 + int32 opt_idx = 1; + // 文案 + string title = 2; + // 选中状态 + bool is_vote = 3; + // 人数 + int32 total = 4; + // 占比 + double persent = 5; + // 是否投票人数最多的选项 + bool is_max_option = 6; +} + +// 综合页请求广告所需字段,由客户端-网关透传 +message AdParam { + // 综合页请求广告所需字段,由客户端-网关透传 + string ad_extra = 1; + // request_id + string request_id = 2; +} + // message AlumniDynamicsReply { // @@ -563,6 +637,8 @@ message AlumniDynamicsReq { int32 local_time = 4; // int32 page = 5; + // + int32 from_type = 6; } // @@ -573,6 +649,16 @@ message CampusBannerInfo { string jump_url = 2; } +// +message CampusBillboardInternalReq { + // + int64 mid = 1; + // + int64 campus_id = 2; + // + string version_code = 3; +} + // message CampusBillBoardReply { // @@ -595,6 +681,8 @@ message CampusBillBoardReply { string update_toast = 9; // int64 campus_id = 10; + // + CampusFeatureProgress open_progress = 11; } // @@ -605,16 +693,44 @@ message CampusBillBoardReq { string version_code = 2; // bilibili.app.archive.middleware.v1.PlayerArgs player_args = 3; + // + CampusReqFromType from_type = 4; } -// -message CampusBillboardInternalReq { - // - int64 mid = 1; - // - int64 campus_id = 2; - // - string version_code = 3; +// +message CampusEntryTabReq { + // + int64 campus_id = 1; +} + +// +message CampusEntryTabResp { + // + CampusEntryType entry_type = 1; +} + +// +enum CampusEntryType { + // + NONE = 0; + // + ENTRY_DYNAMIC = 1; + // + ENTRY_HOME = 2; +} + +// +message CampusFeatureProgress { + // + int64 progress_full = 1; + // + int64 progress_achieved = 2; + // + string desc_title = 3; + // + string desc_1 = 4; + // + CampusLabel btn = 5; } // @@ -643,6 +759,50 @@ message CampusFeedbackReq { int32 from = 2; } +// +message CampusHomePagesReply { + // + CampusRcmdTop top = 1; + // + CampusTop campus_top = 2; + // + int32 page_type = 3; +} + +// +message CampusHomePagesReq { + // + int64 campus_id = 1; + // + string campus_name = 2; + // + double lat = 3; + // + double lng = 4; + // + PlayerArgs player_args = 5; + // + int32 page_type = 6; +} + +// +enum CampusHomePageType { + // + PAGE_MAJOR = 0; + // + PAGE_SUBORDINATE = 1; + // + PAGE_MAJOR_DETAIL = 2; +} + +// +message CampusHomeRcmdTopic { + // + ModuleTitle title = 1; + // + repeated TopicItem topic = 2; +} + // message CampusInfo { // @@ -653,6 +813,8 @@ message CampusInfo { string desc = 3; // int64 online = 4; + // + string url = 5; } // @@ -675,6 +837,181 @@ message CampusMateLikeListReply { message CampusMateLikeListReq { // int64 dynamic_id = 1; + // + CampusReqFromType from_type = 2; +} + +// +enum CampusMngAuditStatus { + // + campus_mng_audit_none = 0; + // + campus_mng_audit_in_process = 1; + // + campus_mng_audit_failed = 2; +} + +// +message CampusMngBadge { + // + string title = 1; + // + string badge_url = 2; + // + string upload_hint_msg = 3; +} + +// +message CampusMngBasicInfo { + // + int64 campus_id = 1; + // + string campus_name = 2; + // + string hint_msg = 3; +} + +// +message CampusMngDetailReply { + // + repeated CampusMngItem items = 1; + // + string top_hint_bar_msg = 2; + // + string bottom_submit_hint_msg = 3; + // + int64 campus_id = 4; + // + string campus_name = 5; +} + +// +message CampusMngDetailReq { + // + int64 campus_id = 1; +} + +// +message CampusMngItem { + // + int32 audit_status = 1; + // + string audit_message = 2; + // + int32 item_type = 3; + // + string mng_item_id = 4; + // + bool is_del = 5; + // Oneof field: + oneof item { + // + CampusMngBasicInfo basic_info = 6; + // + CampusMngBadge badge = 7; + // + string slogan = 8; + // + CampusMngQuiz quiz = 9; + } +} + +// +enum CampusMngItemType { + // + campus_mng_none = 0; + // + campus_mng_basic_info = 1; + // + campus_mng_badge = 2; + // + campus_mng_slogan = 3; + // + campus_mng_quiz = 4; +} + +// +message CampusMngQuiz { + // + string title = 1; + // + CampusLabel more_label = 2; + // + string add_label = 3; + // + string submit_label = 4; + // + int64 quiz_count = 5; +} + +// +enum CampusMngQuizAction { + // + campus_mng_quiz_act_list = 0; + // + campus_mng_quiz_act_add = 1; + // + campus_mng_quiz_act_del = 2; +} + +// +message CampusMngQuizDetail { + // + int64 quiz_id = 1; + // + string question = 2; + // + string correct_answer = 3; + // + repeated string wrong_answer_list = 4; + // + int32 audit_status = 5; + // + string audit_message = 6; +} + +// +message CampusMngQuizOperateReply { + // + string toast = 1; + // + repeated CampusMngQuizDetail quiz = 2; + // + int64 quiz_total = 3; +} + +// +message CampusMngQuizOperateReq { + // + int32 action = 1; + // + int64 campus_id = 2; + // + repeated CampusMngQuizDetail quiz = 3; +} + +// +message CampusMngSlogan { + // + string title = 1; + // + string slogan = 2; + // + string input_hint_msg = 3; +} + +// +message CampusMngSubmitReply { + // + string toast = 1; +} + +// +message CampusMngSubmitReq { + // + int64 campus_id = 1; + // + repeated CampusMngItem modified_items = 2; } // @@ -687,6 +1024,14 @@ message CampusNoticeInfo { CampusLabel button = 3; } +// +enum CampusOnlineStatus { + // + campus_online_offline = 0; + // + campus_online_online = 1; +} + // message CampusRcmdFeedReply { // @@ -717,6 +1062,8 @@ message CampusRcmdFeedReq { int32 scroll = 6; // string view_dyn_id = 7; + // + CampusReqFromType from_type = 8; } // @@ -749,6 +1096,8 @@ message CampusRcmdReply { CampusTop campus_top = 3; // int32 page_type = 4; + // + int32 jump_home_pop = 5; } // @@ -763,6 +1112,10 @@ message CampusRcmdReq { double lng = 4; // bilibili.app.archive.middleware.v1.PlayerArgs player_args = 5; + // + CampusReqFromType from_type = 6; + // + CampusHomePageType page_type = 7; } // @@ -793,6 +1146,38 @@ message CampusRcmdTop { CampusLabel reserve_label = 12; // int64 reserve_number = 13; + // + int64 max_reserve = 14; + // + CampusLabel school_label = 15; + // + CampusLabel mng_label = 16; + // + CampusHomeRcmdTopic rcmd_topic = 17; + // + bool audit_before_open = 18; + // + string audit_message = 19; +} + +// +message CampusRecommendReply { + // + repeated RcmdItem items = 1; + // + bool has_more = 2; +} + +// +message CampusRecommendReq { + // + int64 campus_id = 1; + // + int64 page_no = 2; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 3; + // + CampusRcmdReqFrom from = 4; } // @@ -805,6 +1190,16 @@ message CampusRedDotReply { message CampusRedDotReq { // int64 campus_id = 1; + // + CampusReqFromType from_type = 2; +} + +// +enum CampusReqFromType { + // + DYNAMIC = 0; + // + HOME = 1; } // @@ -817,6 +1212,28 @@ message CampusShowTabInfo { int32 type = 3; // int32 red_dot = 4; + // + string icon_url = 5; +} + +// +message CampusSquareReply { + // + string title = 1; + // + repeated RcmdCampusBrief list = 2; + // + CampusLabel button = 3; +} + +// +message CampusSquareReq { + // + int64 campus_id = 1; + // + double lat = 2; + // + double lng = 3; } // @@ -827,6 +1244,7 @@ enum CampusTabType { campus_account = 3; // campus_billboard = 4; // campus_topic = 5; // + campues_other = 6; // } // @@ -853,6 +1271,16 @@ message CampusTop { string campus_badge = 10; // string campus_background = 11; + // + string campus_motto = 12; + // + CampusLabel mng_entry = 13; + // + string campus_intro = 14; + // + string campus_name_link = 15; + // + string bottom_left_text = 16; } // @@ -865,6 +1293,8 @@ message CampusTopicRcmdFeedReply { bool has_more = 3; // string offset = 4; + // + IconButton join_discuss = 5; } // @@ -877,6 +1307,18 @@ message CampusTopicRcmdFeedReq { bilibili.app.archive.middleware.v1.PlayerArgs player_args = 3; // int32 local_time = 4; + // + CampusReqFromType from_type = 5; +} + +// +message CardParagraph { + // + ModuleAdditional additional_card = 1; + // + string biz_id = 3; + // + LinkNodeType biz_type = 2; } // 动态卡片列表 @@ -921,6 +1363,8 @@ message CardVideoUpList { bool show_in_personal = 8; // 是否展示右侧查看更多按钮 bool show_more_button = 9; + // + repeated UpListItem list_second = 10; } // @@ -955,6 +1399,14 @@ message CmtShowItem { string comment = 4; } +// +message Colors { + // + string color_day = 1; + // + string color_night = 2; +} + // 精选评论区 message CommentDetail { // 该功能能不能用 @@ -964,10 +1416,29 @@ message CommentDetail { int64 status = 2; } +// +message Config { + // + bool story_vertical_exp = 1; + // + int64 detail_view_bits = 2; +} + // enum CoverIcon { - cover_icon_none = 0; // 占位 啥都不展示 - cover_icon_play = 1; // 播放icon + cover_icon_none = 0; // 占位 啥都不展示 + cover_icon_play = 1; // 播放icon + cover_icon_danmaku = 2; // + cover_icon_up = 3; // + cover_icon_vt = 4; // ? 竖屏模式 icon +} + +// +message CoverIconWithText { + // + int32 icon = 1; + // + string text = 2; } // 装扮卡片-粉丝勋章信息 @@ -994,29 +1465,6 @@ message DecorateCard { DecoCardFan fan = 4; } -// 文本类型 -enum DescType { - desc_type_none = 0; // 占位 - desc_type_text = 1; // 文本 - desc_type_aite = 2; // @ - desc_type_lottery = 3; // 抽奖 - desc_type_vote = 4; // 投票 - desc_type_topic = 5; // 话题 - desc_type_goods = 6; // 商品 - desc_type_bv = 7; // bv - desc_type_av = 8; // av - desc_type_emoji = 9; // 表情 - desc_type_user = 10; // 外露用户 - desc_type_cv = 11; // 专栏 - desc_type_vc = 12; // 小视频 - desc_type_web = 13; // 网址 - desc_type_taobao = 14; // 淘宝 - desc_type_mail = 15; // 邮箱 - desc_type_ogv_season = 16; // 番剧season - desc_type_ogv_ep = 17; // 番剧ep - desc_type_search_word = 18; // -} - // 文本描述 message Description { // 文本内容 @@ -1041,8 +1489,34 @@ message Description { string orig_text = 10; // int32 emoji_size = 11; + // + EmojiSizeSpec emoji_size_spec = 12; } +// 文本类型 +enum DescType { + desc_type_none = 0; // 占位 + desc_type_text = 1; // 文本 + desc_type_aite = 2; // @ + desc_type_lottery = 3; // 抽奖 + desc_type_vote = 4; // 投票 + desc_type_topic = 5; // 话题 + desc_type_goods = 6; // 商品 + desc_type_bv = 7; // bv + desc_type_av = 8; // av + desc_type_emoji = 9; // 表情 + desc_type_user = 10; // 外露用户 + desc_type_cv = 11; // 专栏 + desc_type_vc = 12; // 小视频 + desc_type_web = 13; // 网址 + desc_type_taobao = 14; // 淘宝 + desc_type_mail = 15; // 邮箱 + desc_type_ogv_season = 16; // 番剧season + desc_type_ogv_ep = 17; // 番剧ep + desc_type_search_word = 18; // +} + + // 尺寸信息 message Dimension { // @@ -1089,6 +1563,10 @@ message DynAllPersonalReply { Relation relation = 5; // 顶部预约卡 TopAdditionUP addition_up = 6; + // + string title = 7; + // + string title_sub = 8; } // 最近访问-个人feed流列表-请求 @@ -1111,6 +1589,8 @@ message DynAllPersonalReq { string from = 8; // 秒开用 bilibili.app.archive.middleware.v1.PlayerArgs player_args = 9; + // + string personal_extra = 10; } // 动态综合页-响应 @@ -1125,6 +1605,8 @@ message DynAllReply { Unfollow unfollow = 4; // 分区UP推荐 DynRegionRcmd region_rcmd = 5; + // + Config config = 6; } // 动态综合页-请求 @@ -1167,6 +1649,71 @@ message DynAllUpdOffsetReq { string read_offset = 2; // 服务端生成的透传上报字段 string footprint = 3; + // + string personal_extra = 4; +} + + +// 动态卡片 +message DynamicItem { + // 动态卡片类型 + DynamicType card_type = 1; + // 转发类型下,源卡片类型 + DynamicType item_type = 2; + // 模块内容 + repeated Module modules = 3; + // 操作相关字段 + Extend extend = 4; + // 该卡片下面是否含有折叠卡 + int32 has_fold = 5; + // 透传到客户端的埋点字段。 + string server_info = 6; +} + +//动态卡片列表 +message DynamicList { + // 动态列表 + repeated DynamicItem list = 1; + // 更新的动态数 + int64 update_num = 2; + // 历史偏移 + string history_offset = 3; + // 更新基础信息 + string update_baseline = 4; + // 是否还有更多数据 + bool has_more = 5; +} + +// 枚举-动态类型 +enum DynamicType { + dyn_none = 0; // 占位 + forward = 1; // 转发 + av = 2; // 稿件: ugc、小视频、短视频、UGC转PGC + pgc = 3; // pgc:番剧、PGC番剧、PGC电影、PGC电视剧、PGC国创、PGC纪录片 + courses = 4; // 付费更新批次 + fold = 5; // 折叠 + word = 6; // 纯文字 + draw = 7; // 图文 + article = 8; // 专栏 原仅phone端 + music = 9; // 音频 原仅phone端 + common_square = 10; // 通用卡 方形 + common_vertical = 11; // 通用卡 竖形 + live = 12; // 直播卡 只有转发态 + medialist = 13; // 播单 原仅phone端 只有转发态 + courses_season = 14; // 付费更新批次 只有转发态 + ad = 15; // 广告卡 + applet = 16; // 小程序卡 + subscription = 17; // 订阅卡 + live_rcmd = 18; // 直播推荐卡 + banner = 19; // 通栏 + ugc_season = 20; // 合集卡 + subscription_new = 21; // 新订阅卡 + story = 22; // + topic_rcmd = 23; // + cour_up = 24; // + topic_set = 25; // + notice = 26; // + text_notice = 27; // } // 动态详情页-响应 @@ -1200,6 +1747,8 @@ message DynDetailReq { int32 local_time = 10; // pattern string pattern = 11; + // + Config config = 12; } // 批量动态id获取动态详情-响应 @@ -1218,6 +1767,8 @@ message DynDetailsReq { int32 local_time = 3; // 秒开参数 bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4; + // + Config config = 5; } // 动态小卡类型 @@ -1245,6 +1796,32 @@ message DynFakeCardReq { string content = 1; } +// +message DynFeatureGate { + // + bool enhanced_interaction = 1; +} + +// +message DynFriendReply { + // + repeated DynamicItem dyn_list = 1; + // + bool has_more = 2; + // + string offset = 3; +} + +// +message DynFriendReq { + // + string offset = 1; + // + int32 local_time = 2; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 3; +} + // 轻浏览-响应 message DynLightReply { // 卡片列表 @@ -1320,6 +1897,14 @@ enum DynModuleType { module_top_tag = 25; // module_topic_brief = 26; // module_title = 27; // + module_button = 28; + module_notice = 29; + module_opus_summary = 30; + module_copyright = 31; + module_paragraph = 32; + module_blocked = 33; + module_text_notice = 34; + module_opus_collection = 35; } // 推荐页-响应 @@ -1376,6 +1961,22 @@ message DynRegionRcmdItem { repeated ModuleRcmd items = 3; } +// +message DynScreenTab { + // + string title = 1; + // + string name = 2; + // + bool default_tab = 3; + // + bool strategy_show_on_entrance = 4; + // + bool strategy_show_on_refresh = 5; + // + bool strategy_show_on_pull_up = 6; +} + // message DynSearchReply { // @@ -1424,6 +2025,8 @@ message DynServerDetailsReq { string platform = 9; // bool is_master = 10; + // + repeated int64 top_dynamic_ids = 11; } // 空间页动态-请求 @@ -1520,12 +2123,16 @@ message DynTab { message DynTabReply { // repeated DynTab dyn_tab = 1; + // + repeated DynScreenTab screen_tab = 2; } // message DynTabReq { // int32 teenagers_mode = 1; + // + CampusReqFromType from_type = 2; } // 动态点赞-请求 @@ -1542,13 +2149,6 @@ message DynThumbReq { ThumbType type = 5; } -// -enum DynUriType { - dyn_uri_type_none = 0; // - dyn_uri_type_direct = 1; // 直接跳转对应uri - dyn_uri_type_suffix = 2; // 作为后缀拼接 -} - // 最近访问-个人feed流列表-响应 message DynVideoPersonalReply { // 动态列表 @@ -1563,6 +2163,10 @@ message DynVideoPersonalReply { Relation relation = 5; // 顶部预约卡 TopAdditionUP addition_up = 6; + // + string title = 7; + // + string title_sub = 8; } // 最近访问-个人feed流列表-请求 @@ -1585,6 +2189,10 @@ message DynVideoPersonalReq { string from = 8; // 秒开参数 bilibili.app.archive.middleware.v1.PlayerArgs player_args = 9; + // + int64 pegasus_avid = 10; + // + string personal_extra = 11; } // 动态视频页-响应 @@ -1628,6 +2236,8 @@ message DynVideoUpdOffsetReq { string read_offset = 2; // 服务端生成的透传上报字段 string footprint = 3; + // + string personal_extra = 4; } // 投票操作-响应 @@ -1652,62 +2262,10 @@ message DynVoteReq { bool share = 5; } -// 动态卡片 -message DynamicItem { - // 动态卡片类型 - DynamicType card_type = 1; - // 转发类型下,源卡片类型 - DynamicType item_type = 2; - // 模块内容 - repeated Module modules = 3; - // 操作相关字段 - Extend extend = 4; - // 该卡片下面是否含有折叠卡 - int32 has_fold = 5; - // 透传到客户端的埋点字段。 - string server_info = 6; -} - -//动态卡片列表 -message DynamicList { - // 动态列表 - repeated DynamicItem list = 1; - // 更新的动态数 - int64 update_num = 2; - // 历史偏移 - string history_offset = 3; - // 更新基础信息 - string update_baseline = 4; - // 是否还有更多数据 - bool has_more = 5; -} - -// 枚举-动态类型 -enum DynamicType { - dyn_none = 0; // 占位 - forward = 1; // 转发 - av = 2; // 稿件: ugc、小视频、短视频、UGC转PGC - pgc = 3; // pgc:番剧、PGC番剧、PGC电影、PGC电视剧、PGC国创、PGC纪录片 - courses = 4; // 付费更新批次 - fold = 5; // 折叠 - word = 6; // 纯文字 - draw = 7; // 图文 - article = 8; // 专栏 原仅phone端 - music = 9; // 音频 原仅phone端 - common_square = 10; // 通用卡 方形 - common_vertical = 11; // 通用卡 竖形 - live = 12; // 直播卡 只有转发态 - medialist = 13; // 播单 原仅phone端 只有转发态 - courses_season = 14; // 付费更新批次 只有转发态 - ad = 15; // 广告卡 - applet = 16; // 小程序卡 - subscription = 17; // 订阅卡 - live_rcmd = 18; // 直播推荐卡 - banner = 19; // 通栏 - ugc_season = 20; // 合集卡 - subscription_new = 21; // 新订阅卡 - story = 22; // - topic_rcmd = 23; // +// +message EmojiSizeSpec { + // + int64 width = 1; } // 表情包类型 @@ -1718,11 +2276,101 @@ enum EmojiType { vip = 3; // 大会员表情 } +// +message EmoteNode { + // + string emote_url = 2; + // + EmoteSize emote_width = 3; + // + ImgInlineCfg inline_img_cfg = 5; + // + bool is_inline_img = 4; + // + WordNode raw_text = 1; +} + +// +message EmoteSize { + // + double width = 1; + // + int32 emoji_size = 2; +} + // 附加大卡-电竞卡样式 enum EspaceStyle { moba = 0; // moba类 } +// 扩展字段,用于动态部分操作使用 +message Extend { + // 动态id + string dyn_id_str = 1; + // 业务方id + string business_id = 2; + // 源动态id + string orig_dyn_id_str = 3; + // 转发卡:用户名 + string orig_name = 4; + // 转发卡:图片url + string orig_img_url = 5; + // 转发卡:文字内容 + repeated Description orig_desc = 6; + // 填充文字内容 + repeated Description desc = 7; + // 被转发的源动态类型 + DynamicType orig_dyn_type = 8; + // 分享到站外展示类型 + string share_type = 9; + // 分享的场景 + string share_scene = 10; + // 是否快速转发 + bool is_fast_share = 11; + // r_type 分享和转发 + int32 r_type = 12; + // 数据源的动态类型 + int64 dyn_type = 13; + // 用户id + int64 uid = 14; + // 卡片跳转 + string card_url = 15; + // 透传字段 + google.protobuf.Any source_content = 16; + // 转发卡:用户头像 + string orig_face = 17; + // 评论跳转 + ExtendReply reply = 18; + // + string track_id = 19; + // + ModuleOpusSummary opus_summary = 20; + // + OnlyFansProperty only_fans_property = 21; + // + DynFeatureGate feature_gate = 22; + // + bool is_in_audit = 23; + // + map history_report = 24; +} + +// 评论扩展 +message ExtendReply { + // 基础跳转地址 + string uri = 1; + // 参数部分 + repeated ExtendReplyParam params = 2; +} + +// 评论扩展参数部分 +message ExtendReplyParam { + // 参数名 + string key = 1; + // 参数值 + string value = 2; +} + // 动态-拓展小卡模块-通用小卡 message ExtInfoCommon { // 标题 @@ -1795,60 +2443,38 @@ message ExtInfoTopic { string icon = 3; } -// 扩展字段,用于动态部分操作使用 -message Extend { - // 动态id - string dyn_id_str = 1; - // 业务方id - string business_id = 2; - // 源动态id - string orig_dyn_id_str = 3; - // 转发卡:用户名 - string orig_name = 4; - // 转发卡:图片url - string orig_img_url = 5; - // 转发卡:文字内容 - repeated Description orig_desc = 6; - // 填充文字内容 - repeated Description desc = 7; - // 被转发的源动态类型 - DynamicType orig_dyn_type = 8; - // 分享到站外展示类型 - string share_type = 9; - // 分享的场景 - string share_scene = 10; - // 是否快速转发 - bool is_fast_share = 11; - // r_type 分享和转发 - int32 r_type = 12; - // 数据源的动态类型 - int64 dyn_type = 13; - // 用户id - int64 uid = 14; - // 卡片跳转 - string card_url = 15; - // 透传字段 - google.protobuf.Any source_content = 16; - // 转发卡:用户头像 - string orig_face = 17; - // 评论跳转 - ExtendReply reply = 18; +// +message FeedFilterReply { + // + string offset = 1; + // + bool has_more = 2; + // + repeated DynamicItem list = 3; } -// 评论扩展 -message ExtendReply { - // 基础跳转地址 - string uri = 1; - // 参数部分 - repeated ExtendReplyParam params = 2; +// +message FeedFilterReq { + // + string offset = 1; + // + string tab = 2; + // + int32 local_time = 3; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4; + // + AdParam ad_param = 5; + // + int32 cold_start = 6; + // + int64 page = 7; } -// 评论扩展参数部分 -message ExtendReplyParam { - // 参数名 - string key = 1; - // 参数值 - string value = 2; +// +message FetchTabSettingReply { + // + int32 status = 1; } // 折叠类型 @@ -1858,6 +2484,7 @@ enum FoldType { FoldTypeFrequent = 2; // 转发超频折叠 FoldTypeUnite = 3; // 联合投稿折叠 FoldTypeLimit = 4; // 动态受限折叠 + FoldTypeTopicMerged = 5; } // 视频页-我的追番-番剧信息 @@ -1913,6 +2540,17 @@ message GoodsItem { bool user_web_v2 = 12; // ad mark string ad_mark = 13; + // + string app_name = 14; + // + GoodsJumpType jump_type = 15; +} + +// +enum GoodsJumpType { + goods_none = 0; + goods_schema = 1; + goods_url = 2; } // @@ -1949,6 +2587,27 @@ enum HighlightTextStyle { style_highlight = 1; // 高亮 } +// +enum HomePageTabSttingStatus { + SETTING_INVALID = 0; + SETTING_OPEN = 1; + SETTING_CLOSE = 2; +} + +// +message HomeSubscribeReply { + // + int32 online = 1; +} + +// +message HomeSubscribeReq { + // + int64 campus_id = 1; + // + string campus_name = 2; +} + // message IconBadge { // @@ -1969,12 +2628,36 @@ message IconButton { string jump_uri = 4; } +// +enum IconResLocal { + ICON_RES_LOCAL_NONE = 0; + ICON_RES_LOCAL_LIVE = 1; +} + +// +message ImageSet { + // + string img_day = 1; + // + string img_dark = 2; +} + // 枚举-附加卡样式 enum ImageStyle { add_style_vertical = 0; // add_style_square = 1; // } +// +message ImgInlineCfg { + // + double width = 1; + // + double height = 2; + // + Colors color = 3; +} + // 动态-拓展小卡模块-ogv小卡-(one of 片单、榜单、分区) message InfoOGV { // 标题 @@ -2021,6 +2704,78 @@ message InteractionStat { int64 like = 1; } +// +message LbsPoiDetail { + // + string poi = 1; + // + int64 type = 2; + // + repeated string base_pic = 3; + // + repeated string cover = 4; + // + string address = 5; + // + string title = 6; +} + +// +message LbsPoiReply { + // + bool has_more = 1; + // + string offset = 2; + // + LbsPoiDetail detail = 3; + // + repeated DynamicItem list = 4; +} + +// +message LbsPoiReq { + // + string poi = 1; + // + int64 type = 2; + // + string offset = 3; + // + int32 refresh_type = 4; + // + int32 local_time = 5; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 6; +} + +// +message LegacyTopicFeedReply { + // + repeated DynamicItem list = 1; + // + bool has_more = 2; + // + string offset = 3; + // + repeated SortType supported_sort_types = 4; + // + repeated SortType feed_card_filters = 5; +} + +// +message LegacyTopicFeedReq { + // + int64 topic_id = 1; + // + string topic_name = 2; + // + string offset = 3; + // + SortType sort_type = 4; + // + SortType card_filter = 5; +} + // enum LightFromType { from_login = 0; // @@ -2081,6 +2836,69 @@ message LikeUser { string uri = 3; } +// +message LineParagraph { + // + MdlDynDrawItem pic = 1; +} + +// +message LinkNode { + // + string show_text = 1; + // + string link = 2; + // + string icon = 3; + // + string icon_suffix = 4; + // + string link_type = 5; + // + LinkNodeType link_type_enum = 6; + // + string biz_id = 7; + // + int64 timestamp = 8; + // + GoodsItem goods_item = 9; + // + NoteVideoTS note_video_ts = 10; +} + +// +enum LinkNodeType { + INVALID = 0; + VIDEO = 1; + RESERVE = 2; + VOTE = 3; + LIVE = 4; + LOTTERY = 5; + MATCH = 6; + GOODS = 7; + OGV_SS = 8; + OGV_EP = 9; + MANGA = 10; + CHEESE = 11; + VIDEO_TS = 12; + AT = 13; + HASH_TAG = 14; + ARTICLE = 15; + URL = 16; + MAIL = 17; + LBS = 18; + ACTIVITY = 19; + ATTACH_CARD_OFFICIAL_ACTIVITY = 20; + GAME = 21; + DECORATION = 22; + UP_TOPIC = 23; + UP_ACTIVITY = 24; + UP_MAOER = 25; + MEMBER_GOODS = 26; + OPENMALL_UP_ITEMS = 27; + SEARCH = 28; +} + // 直播信息 message LiveInfo { // 是否在直播 @@ -2113,6 +2931,9 @@ enum LiveState { enum LocalIconType { local_icon_comment = 0; // local_icon_like = 1; // + local_icon_avatar = 2; + local_icon_cover = 3; + local_icon_like_and_forward = 4; } // 动态-附加卡-电竞卡-战队 @@ -2129,6 +2950,14 @@ message MatchTeam { string night_color = 5; } +// +enum MdlBlockedStyle { + BLOCKED_STYLE_DEFAULT = 0; + BLOCKED_STYLE_IN_AUDIT = 1; + BLOCKED_STYLE_ONLY_FANS_LIST = 2; + BLOCKED_STYLE_ONLY_FANS_VIDEO = 3; +} + // 动态列表渲染部分-详情模块-小程序/小游戏 message MdlDynApplet { // 小程序id @@ -2205,6 +3034,16 @@ message MdlDynArchive { string bvid = 26; // 播放数 int32 view = 27; + // + bool show_premiere_badge = 28; + // + bool premiere_card = 29; + // + bool show_progress = 30; + // + int64 part_duration = 31; + // + int64 part_progress = 32; } // 动态列表渲染部分-详情模块-专栏模块 @@ -2274,6 +3113,26 @@ message MdlDynCourBatch { VideoBadge badge = 6; // 播放按钮 string play_icon = 7; + // + bool can_play = 8; + // + bool is_preview = 9; + // + string cover_left_text_1 = 10; + // + string cover_left_text_2 = 11; + // + string cover_left_text_3 = 12; + // + int64 avid = 13; + // + int64 cid = 14; + // + int64 epid = 15; + // + int64 duration = 16; + // + int64 season_id = 17; } // 动态-详情模块-付费课程系列 @@ -2292,6 +3151,52 @@ message MdlDynCourSeason { VideoBadge badge = 6; // 播放按钮 string play_icon = 7; + // + bool can_play = 8; + // + bool is_preview = 9; + // + int64 avid = 10; + // + int64 cid = 11; + // + int64 epid = 12; + // + int64 duration = 13; + // + int64 season_id = 14; +} + +// +message MdlDynCourUp { + // + string title = 1; + // + string desc = 2; + // + string cover = 3; + // + string uri = 4; + // + string text_1 = 5; + // + VideoBadge badge = 6; + // + string play_icon = 7; + // + bool can_play = 8; + // + bool is_preview = 9; + // + int64 avid = 10; + // + int64 cid = 11; + // + int64 epid = 12; + // + int64 duration = 13; + // + int64 season_id = 14; } // 动态列表渲染部分-详情模块-图文模块 @@ -2302,6 +3207,12 @@ message MdlDynDraw { string uri = 2; // 图文ID int64 id = 3; + // + bool is_draw_first = 4; + // + bool is_big_cover = 5; + // + bool is_article_cover = 6; } // 动态列表渲染部分-详情模块-图文 @@ -2528,6 +3439,18 @@ enum MdlDynSubscriptionNewStyle { mdl_dyn_subscription_new_style_draw = 2; // 图文 } +// +message MdlDynTopicSet { + // + repeated TopicItem topics = 1; + // + IconButton more_btn = 2; + // + int64 topic_set_id = 3; + // + int64 push_id = 4; +} + // 动态列表渲染部分-UGC合集 message MdlDynUGCSeason { // 标题 @@ -2666,6 +3589,22 @@ message Module { ModuleTopicBrief module_topic_brief = 26; // ModuleTitle module_title = 27; + // + ModuleButton module_button = 28; + // + ModuleNotice module_notice = 29; + // + ModuleOpusSummary module_opus_summary = 30; + // + ModuleCopyright module_copyright = 31; + // + ModuleParagraph module_paragraph = 32; + // + ModuleBlocked module_blocked = 33; + // + ModuleTextNotice module_text_notice = 34; + // + ModuleOpusCollection module_opus_collection = 35; } } @@ -2706,6 +3645,10 @@ message ModuleAdditional { AdditionUgc ugc = 9; // up主预约发布卡 AdditionUP up = 10; + // + AdditionArticle article = 12; + // + AdditionLiveRoom live = 13; } // 附加卡物料ID int64 rid = 7; @@ -2746,6 +3689,8 @@ message ModuleAuthor { string ptime_location_text = 14; // bool show_level = 15; + // + OnlyFans only_fans = 16; } // 动态列表渲染部分-用户模块-按钮 @@ -2844,12 +3789,59 @@ message ModuleBannerUserItem { AdditionalButton button = 8; // 跳转地址 string uri = 9; + // + Relation relation = 10; +} + +// +message ModuleBlocked { + // + ImageSet icon = 1; + // + ImageSet bg_img = 2; + // + string hint_message = 3; + // + IconButton act_btn = 4; + // + MdlBlockedStyle block_style = 5; + // + string sub_hint_message = 6; + // + OneLineText video_bottom_text_upper = 7; + // + OneLineText video_bottom_text_lower = 8; + // + string archive_title = 9; + // + OneLineText hint_message_one_line = 10; } // 底部模块 message ModuleButtom { + enum InteractionIcon { + ICON_INVALID = 0; + ICON_FORWARD = 1; + ICON_COMMENT = 2; + ICON_FAVORITE = 3; + ICON_LIKE = 4; + } // 计数模块 ModuleStat module_stat = 1; + // + bool comment_box = 2; + // + string comment_box_msg = 3; + // + repeated InteractionIcon interaction_icons = 4; + // + repeated InteractionFace faces = 5; +} + +// +message ModuleButton { + // + IconButton btn = 1; } // 评论外露模块 @@ -2858,6 +3850,14 @@ message ModuleComment { repeated CmtShowItem cmtShowItem = 1; } +// +message ModuleCopyright { + // + string left_text = 1; + // + string right_text = 2; +} + // 动态-描述文字模块 message ModuleDesc { // 描述信息(已按高亮拆分) @@ -2887,6 +3887,10 @@ message ModuleDescGoods { string ad_mark = 7; // schemaPackageName(Android用) string schema_package_name = 8; + // + int32 jump_type = 9; + // + string app_name = 10; } // 动态-争议小黄条模块 @@ -2936,6 +3940,10 @@ message ModuleDynamic { MdlDynUGCSeason dyn_ugc_season = 16; //订阅卡 MdlDynSubscriptionNew dyn_subscription_new = 17; + //课程 + MdlDynCourUp dyn_cour_batch_up = 18; + //话题集合 + MdlDynTopicSet dyn_topic_set = 19; } } @@ -2957,6 +3965,8 @@ enum ModuleDynamicType { mdl_dyn_live_rcmd = 13; // 直播推荐卡 mdl_dyn_ugc_season = 14; // UGC合集 mdl_dyn_subscription_new = 15; // 订阅卡 + mdl_dyn_cour_batch_up = 16; // 课程 + mdl_dyn_topic_set = 17; // 话题集合 } // 动态-小卡模块 @@ -2984,7 +3994,7 @@ message ModuleExtendItem { // ExtInfoCommon ext_info_common = 6; // - ExtInfoOGV ext_info_ogv = 7; + ExtInfoOGV ext_info_ogv = 7; } } @@ -2998,6 +4008,8 @@ message ModuleFold { string fold_ids = 3; // 被折叠的用户信息 repeated UserInfo fold_users = 4; + // + TopicMergedResource topic_merged_resource = 5; } // 外露交互模块 @@ -3022,6 +4034,56 @@ message ModuleLikeUser { string display_text = 2; } +// +message ModuleNotice { + // + string identity = 1; + // + string icon = 2; + // + string title = 3; + // + string url = 4; + // + int32 notice_type = 5; +} + +// +message ModuleOpusCollection { + // + OpusCollection collection_info = 1; + // + string title_upper = 2; + // + string title = 3; + // + string title_prefix_icon = 4; + // + string total_text = 5; +} + +// +message ModuleOpusSummary { + // + Paragraph title = 1; + // + Paragraph summary = 2; + // + string summary_jump_btn_text = 3; + // + repeated MdlDynDrawItem covers = 4; +} + +// +message ModuleParagraph { + // + Paragraph paragraph = 1; + // + bool is_article_title = 2; + // + ParaSpacing para_spacing = 3; +} + // 推荐模块 message ModuleRcmd { // 用户头像 @@ -3102,24 +4164,32 @@ message ModuleStory { string publish_text = 7; } +// +message ModuleTextNotice { + // + OneLineText notice = 1; +} + // message ModuleTitle { // string title = 1; // IconButton right_btn = 2; + // + int32 title_style = 3; } // 顶部模块 message ModuleTop { // 三点模块 repeated ThreePointItem tp_list = 1; -} - -// -message ModuleTopTag { - // - string tag_name = 1; + // + MdlDynArchive archive = 2; + // + ModuleAuthor author = 3; + // + bool hidden_nav_bar = 4; } // @@ -3144,6 +4214,12 @@ message ModuleTopicDetailsExt { string comment_guide = 1; } +// +message ModuleTopTag { + // + string tag_name = 1; +} + // 认证名牌 message Nameplate { // nid @@ -3179,6 +4255,30 @@ message NewEP { string cover = 3; } +// +message NFTInfo { + // + NFTRegionType region_type = 1; + // + string region_icon = 2; + // + NFTShowStatus region_show_status = 3; +} + +// +enum NFTRegionType { + nft_region_default = 0; + nft_region_mainlang = 1; + nft_region_gat = 2; +} + +// +enum NFTShowStatus { + nft_show_default = 0; + nft_show_zoominmainlang = 1; + nft_show_raw = 2; +} + // 空响应 message NoReply { @@ -3189,6 +4289,30 @@ message NoReq { } +// +message NoteVideoTS { + // + int64 cid = 1; + // + int64 oid_type = 2; + // + int64 status = 3; + // + int64 index = 4; + // + int64 seconds = 5; + // + int64 cid_count = 6; + // + string key = 7; + // + int64 epid = 9; + // + string title = 8; + // + string desc = 10; +} + // message OfficialAccountInfo { // @@ -3329,6 +4453,113 @@ message OfficialVerify { int32 is_atten = 3; } +// +message OneLineText { + // + repeated TextWithPriority texts = 1; +} + +// +message OnlyFans { + // + bool is_only_fans = 1; + // + IconBadge badge = 2; +} + +// +message OnlyFansProperty { + // + bool has_privilege = 1; + // + bool is_only_fans = 2; +} + +// +message OpusCollection { + // + int64 collection_id = 1; + // + OneLineText title = 2; + // + string detail_uri = 3; + // + string intro = 4; + // + repeated OpusCollectionItem all_items = 5; +} + +// +message OpusCollectionItem { + // + int64 opus_id = 1; + // + string title = 2; + // + string pub_time = 3; + // + string uri = 4; + // + bool is_selected_highlight = 5; +} + +// +message Paragraph { + // + message ListFormat { + // + int32 level = 1; + // + int32 order = 2; + // + string theme = 3; + } + enum ParagraphAlign { + LEFT = 0; + MIDDLE = 1; + RIGHT = 2; + } + // + message ParagraphFormat { + // + ParagraphAlign align = 1; + // + ListFormat list_format = 2; + } + // + enum ParagraphType { + INVALID = 0; + TEXT = 1; + PICTURES = 2; + LINE = 3; + REFERENCE = 4; + SORTED_LIST = 5; + UNSORTED_LIST = 6; + LINK_CARD = 7; + } + // + ParagraphType para_type = 1; + // + ParagraphFormat para_format = 2; + // + oneof content { + TextParagraph text = 3; + PicParagraph pic = 4; + LineParagraph line = 5; + CardParagraph link_card = 6; + } +} + +// +message ParaSpacing { + // + double spacing_before_para = 1; + // + double spacing_after_para = 2; + // + double line_spacing = 3; +} + // PGC单季信息 message PGCSeason { // 是否完结 @@ -3339,6 +4570,20 @@ message PGCSeason { int32 type = 3; } +// +message PicParagraph { + // + enum PicParagraphStyle { + INVALID = 0; + NINE_CELL = 1; + BIG_SCROLL = 2; + } + // + MdlDynDraw pics = 1; + // + PicParagraphStyle style = 2; +} + // 秒开通用参数 message PlayurlParam { // 清晰度 @@ -3401,6 +4646,18 @@ message RcmdAuthor { Relation relation = 3; } +// +message RcmdCampusBrief { + // + int64 campus_id = 1; + // + string campus_name = 2; + // + string campus_badge = 4; + // + string url = 5; +} + // 推荐卡片列表 message RcmdItem { // 卡片类型 @@ -3418,6 +4675,26 @@ message RcmdOption{ bool show_title = 1; } +// +message RcmdReason { + // + string campus_name = 1; + // + RcmdReasonStyle style = 2; + // + string rcmd_reason = 3; + // + string up_name = 4; +} + +// +enum RcmdReasonStyle { + rcmd_reason_style_none = 0; + rcmd_reason_style_campus_nearby = 1; + rcmd_reason_style_campus_up = 2; + rcmd_reason_style_campus_near_up_mix = 3; +} + // message RcmdTopButton { // @@ -3437,6 +4714,42 @@ message RcmdUPsParam { int64 dislike_ts = 1; } +message ReactionListItem { + // 用户信息 + UserInfo user = 1; + // 关注关系 + Relation relation = 2; + // 显示文字 + string act_text = 3; + // + string rcmd_reason = 4; +} + + +// 新版动态转发点赞列表-响应 +message ReactionListReply { + // 标题 + string title = 1; + // 列表 + repeated ReactionListItem list = 2; + // 偏移 + string offset = 3; + // 是否还有更多 + bool has_more = 4; +} + +// 新版动态转发点赞列表-请求 +message ReactionListReq { + // 动态ID + int64 dynamic_id = 1; + // 动态类型 + int64 dyn_type = 2; + // 业务方资源id + int64 rid = 3; + // 偏移,使用上一页回包中的offset字段;第一页不传。 + string offset = 4; +} + // 刷新方式 enum Refresh { refresh_new = 0; // 刷新列表 @@ -3496,42 +4809,6 @@ message RepostListRsp { RepostType repost_type = 5; } -// 新版动态转发点赞列表-请求 -message ReactionListReq { - // 动态ID - int64 dynamic_id = 1; - // 动态类型 - int64 dyn_type = 2; - // 业务方资源id - int64 rid = 3; - // 偏移,使用上一页回包中的offset字段;第一页不传。 - string offset = 4; -} - -// 新版动态转发点赞列表-响应 -message ReactionListReply { - // 标题 - string title = 1; - // 列表 - repeated ReactionListItem list = 2; - // 偏移 - string offset = 3; - // 是否还有更多 - bool has_more = 4; -} - -message ReactionListItem { - // 用户信息 - UserInfo user = 1; - // 关注关系 - Relation relation = 2; - // 显示文字 - string act_text = 3; - // - string rcmd_reason = 4; - // bool has_relation = 5; - // bool has_user = 6; -} // 评论类型 enum RepostType { repost_hot = 0; // 热门评论 @@ -3550,6 +4827,11 @@ enum ReserveType { reserve_recall = 1; // 预约召回 } +enum RouterAction { + OPEN = 0; + EMBED = 1; +} + // message SchoolRecommendReply { // @@ -3562,6 +4844,8 @@ message SchoolRecommendReq { float lat = 1; // float lng = 2; + // + CampusReqFromType from_type = 3; } // @@ -3576,6 +4860,8 @@ message SchoolSearchReply { message SchoolSearchReq { // string keyword = 1; + // + CampusReqFromType from_type = 2; } // @@ -3648,6 +4934,8 @@ message SearchTopicItem { message SetDecisionReq { // int32 result = 1; + // + CampusReqFromType from_type = 2; } // @@ -3656,6 +4944,8 @@ message SetRecentCampusReq { int64 campus_id = 1; // string campus_name = 2; + // + CampusReqFromType from_type = 3; } // 分享渠道组件 @@ -3742,16 +5032,53 @@ message SubscribeCampusReq { int64 campus_id = 1; // string campus_name = 2; + // + CampusReqFromType from_type = 3; } -// +// +message TextNode { + enum TextNodeType { + INVALID = 0; + WORDS = 1; + EMOTE = 2; + AT = 3; + BIZ_LINK = 4; + } + // + TextNodeType node_type = 1; + string raw_text = 2; + // + oneof text { + WordNode word = 3; + EmoteNode emote = 4; + LinkNode link = 5; + } +} + +// +message TextParagraph { + // + repeated TextNode nodes = 1; +} + +// +message TextWithPriority { + // + string text = 1; + // + int64 priority = 2; +} + +// 免流类型 enum TFType { - U_CARD = 0; // - U_PKG = 1; // - C_CARD = 2; // - C_PKG = 3; // - T_CARD = 4; // - T_PKG = 5; // + TF_UNKNOWN = 0; // 未知 + U_CARD = 1; // 联通卡 + U_PKG = 2; // 联通免流包 + C_CARD = 3; // 移动卡 + C_PKG = 4; // 移动免流包 + T_CARD = 5; // 电信卡 + T_PKG = 6; // 电信免流包 } // 三点-关注 @@ -4009,12 +5336,6 @@ message TopAdditionUP { int32 has_fold = 2; } -// 状态 -enum TopType { - top_none = 0; // 默认 置顶 - top_cancel = 1; // 取消置顶 -} - // 话题广场操作按钮 message TopicButton { // 按钮图标 @@ -4101,6 +5422,14 @@ message TopicListReq { string offset = 2; } +// +message TopicMergedResource { + // + int32 merge_type = 1; + // + int32 merged_res_cnt = 2; +} + // message TopicRcmdCard { // @@ -4141,6 +5470,12 @@ message TopicSquareReq { int64 campus_id = 1; } +// 状态 +enum TopType { + top_none = 0; // 默认 置顶 + top_cancel = 1; // 取消置顶 +} + // 综合页-无关注列表 message Unfollow { // 标题展示文案 @@ -4151,6 +5486,12 @@ message Unfollow { string TrackId = 3; } +// +message UnfollowMatchReq { + // + int64 cid = 1; +} + // 综合页-无关注列表 message UnfollowUserItem { // 是否有更新 @@ -4179,6 +5520,12 @@ message UnfollowUserItem { string uri = 12; } +// +message UpdateTabSettingReq { + // + HomePageTabSttingStatus status = 1; +} + // 动态顶部up列表-up主信息 message UpListItem { // 是否有更新 @@ -4207,6 +5554,14 @@ message UpListItem { string uri = 12; // UP主预约上报使用 bool is_recall = 13; + // + IconBadge update_icon = 14; + // + string live_rcmd_reason = 15; + // + string live_cover = 16; + // + string personal_extra = 17; } // 最常访问-查看更多 @@ -4245,6 +5600,12 @@ message UserInfo { int32 face_nft = 12; // int32 face_nft_new = 13; + // + NFTInfo nft_info = 14; + // + int32 is_senior_member = 15; + // + bilibili.dagw.component.avatar.v1.AvatarItem avatar = 16; } // 直播头像样式 @@ -4268,6 +5629,11 @@ enum UserItemType { user_item_type_live_custom = 2; // user_item_type_normal = 3; // user_item_type_extend = 4; // + user_item_type_premiere_reserve = 5; + user_item_type_premiere = 6; + user_item_type_live_card = 7; + user_item_type_ogv_season = 8; + user_item_type_ugc_season = 9; } // 头像挂件信息 @@ -4402,3 +5768,33 @@ enum WeightType { weight_dislike = 1; // 不感兴趣 weight_jump = 2; // 跳链 } + +// +enum WFItemType { + WATER_FLOW_TYPE_NONE = 0; + WATER_FLOW_TYPE_ARCHIVE = 1; + WATER_FLOW_TYPE_DYNAMIC = 2; +} + +// +message WordNode { + // + message WordNodeStyle { + // + bool bold = 1; + // + bool italic = 2; + // + bool strikethrough = 3; + // + bool underline = 4; + } + // + string words = 1; + // + double font_size = 2; + // + Colors color = 3; + // + WordNodeStyle style = 4; +} diff --git a/grpc_api/bilibili/app/dynamic/v2/opus.proto b/grpc_api/bilibili/app/dynamic/v2/opus.proto new file mode 100644 index 0000000..5fba3c9 --- /dev/null +++ b/grpc_api/bilibili/app/dynamic/v2/opus.proto @@ -0,0 +1,59 @@ + +syntax = "proto3"; + +package bilibili.app.dynamic.v2; + +import "bilibili/app/archive/middleware/v1/preload.proto"; +import "bilibili/app/dynamic/v2/dynamic.proto"; + +service Opus { + // + rpc OpusDetail (OpusDetailReq) returns (OpusDetailResp); +} + +// +message OpusDetailReq { + // + OpusType opus_type = 1; + // + int64 oid = 2; + // + int64 dyn_type = 3; + // + string share_id = 4; + // + int32 share_mode = 9; + // + int32 local_time = 10; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 11; + // + Config config = 12; +} + +// +message OpusDetailResp { + // + OpusItem opus_item = 1; +} + +// +message OpusItem { + // + int64 opus_id = 1; + // + OpusType opus_type = 2; + // + int64 oid = 3; + // + repeated Module modules = 4; + // + Extend extend = 5; +} + +enum OpusType { + OPUS_TYPE_DYN = 0; + OPUS_TYPE_ARTICLE = 1; + OPUS_TYPE_NOTE = 2; + OPUS_TYPE_WORD = 3; +} diff --git a/grpc_api/bilibili/app/search/v2/search.proto b/grpc_api/bilibili/app/search/v2/search.proto new file mode 100644 index 0000000..acac64c --- /dev/null +++ b/grpc_api/bilibili/app/search/v2/search.proto @@ -0,0 +1,110 @@ +syntax = "proto3"; + +package bilibili.app.search.v2; + +import "bilibili/broadcast/message/main/search.proto"; + +service Search { + // + rpc CancelChatTask (CancelChatTaskReq) returns (CancelChatTaskReply); + // + rpc GetChatResult (GetChatResultReq) returns (bilibili.broadcast.message.main.ChatResult); + // + rpc SearchEgg (SearchEggReq) returns (SearchEggReply); + // + rpc SubmitChatTask (SubmitChatTaskReq) returns (SubmitChatTaskReply); +} + +// +message CancelChatTaskReq { + // + string session_id = 1; + // + string from_source = 2; +} + +// +message CancelChatTaskReply { + // + int32 code = 1; +} + +// +message GetChatResultReq { + // + string query = 1; + // + string session_id = 2; + // + string from_source = 3; +} + +// +message SearchEggInfo { + // + int32 egg_type = 1; + // + int64 id = 2; + // + int32 is_commercial = 3; + // + string mask_color = 4; + // + int64 mask_transparency = 5; + // + string md5 = 6; + // + int32 re_type = 7; + // + string re_url = 8; + // + string re_value = 9; + // + int32 show_count = 10; + // + int64 size = 11; + // + int64 source = 12; + // + string url = 13; +} + +// +message SearchEggInfos { + // + repeated SearchEggInfo egg_info = 1; +} + +// +message SearchEggReply { + // + int32 code = 1; + // + string seid = 2; + // + SearchEggInfos result = 3; +} + +// +message SearchEggReq { + +} + +// +message SubmitChatTaskReply { + // + int32 code = 1; + // + string session_id = 2; +} + +// +message SubmitChatTaskReq { + // + string query = 1; + // + string track_id = 2; + // + string from_source = 3; +} + diff --git a/grpc_api/bilibili/app/viewunite/v1/viewunite.proto b/grpc_api/bilibili/app/viewunite/v1/viewunite.proto index 81276c8..21d848f 100644 --- a/grpc_api/bilibili/app/viewunite/v1/viewunite.proto +++ b/grpc_api/bilibili/app/viewunite/v1/viewunite.proto @@ -9,9 +9,9 @@ import "google/protobuf/any.proto"; // 统一视频信息接口(7.23启用) service View { // - rpc View(ViewRequest) returns (ViewReply); + rpc View(ViewReq) returns (ViewReply); // - rpc ViewProgress(ViewProgressRequest) returns (ViewProgressReply); + rpc ViewProgress(ViewProgressReq) returns (ViewProgressReply); } // 业务类型 @@ -255,7 +255,7 @@ enum MaterialBizType { // 素材来源 enum MaterialSource { // - UNKNOWN = 0; + DEFAULT = 0; // 必剪素材 BIJIAN = 1; } diff --git a/grpc_api/bilibili/broadcast/message/main/search.proto b/grpc_api/bilibili/broadcast/message/main/search.proto new file mode 100644 index 0000000..8f18a02 --- /dev/null +++ b/grpc_api/bilibili/broadcast/message/main/search.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package bilibili.broadcast.message.main; + +import "google/protobuf/empty.proto"; +import "bilibili/app/dynamic/v2/dynamic.proto"; + +service Search { + rpc ChatResultPush (google.protobuf.Empty) returns (stream ChatResult); +} + +// +message Bubble { + repeated bilibili.app.dynamic.v2.Paragraph paragraphs = 1; +} + +// +message ChatResult { + // + int32 code = 1; + // + string session_id = 2; + // + repeated Bubble bubble = 3; + // + string rewrite_word = 4; + // + string title = 5; +} diff --git a/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto b/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto index c238880..ddde218 100644 --- a/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto +++ b/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto @@ -12,6 +12,30 @@ service PlayURL { rpc PlayViewComic(PlayViewReq) returns (PlayViewReply); } +// +message Animation { + // + map qn_svga_animation_map = 1; +} + +// +message AudioMaterialProto { + // + string audio_id = 1; + // + string title = 2; + // + string edition = 3; + // + uint64 person_id = 4; + // + string person_name = 5; + // + string person_avatar = 6; + // + repeated DashItem audio = 7; +} + // 角标信息 message BadgeInfo { // 角标文案 @@ -24,6 +48,8 @@ message BadgeInfo { string text_color = 4; // ? 新版本客户端已弃用此项 GradientColor bg_gradient_color = 5; + // + string img = 6; } // Dialog组件: 底部显示 @@ -66,6 +92,10 @@ message ButtonInfo { GradientColor bg_gradient_color = 14; // map order_report_params = 15; + // + TaskParam task_param = 16; + // + string pc_link = 17; } // 投屏限制. code = 0 时为无限制, 否则表示不不允许投屏并提示message @@ -98,7 +128,8 @@ enum ClipType { CLIP_TYPE_OP = 1; // 跳过OP CLIP_TYPE_ED = 2; // 跳过ED CLIP_TYPE_HE = 3; // - CLIP_TYPE_MULTI_VIEW = 4; // + CLIP_TYPE_MULTI_VIEW = 4; // + CLIP_TYPE_AD = 5; // } // 编码类型 @@ -137,6 +168,10 @@ message Coupon { string real_amount = 9; // 使用过期时间 google.protobuf.Timestamp expire_time = 10; + // + int64 otype = 11; + // + string amount = 12; } // 优惠券信息 @@ -181,6 +216,8 @@ message DashItem { uint64 size = 7; // 帧率 string frame_rate = 8; + // DRM widevine 密钥 + string widevine_pssh = 9; } // dash视频流 @@ -207,6 +244,14 @@ message DashVideo { int32 width = 10; // 高 int32 height = 11; + // DRM 密钥 + string widevine_pssh = 12; +} + +// +message DataControl { + // + bool need_watch_progress = 1; } // 鉴权浮层 @@ -239,6 +284,8 @@ message Dialog { TextInfo right_bottom_desc = 13; // repeated BottomDisplay bottom_display = 14; + // + repeated PlayList play_list = 15; } // 鉴权浮层配置 @@ -251,6 +298,8 @@ message DialogConfig { bool is_nested_scroll_enable = 3; // 是否强制竖屏 bool is_force_halfscreen_enable = 4; + // 是否启用背景半透明 + bool is_background_translucent_enable = 5; } // 当前分辨率信息 @@ -280,24 +329,115 @@ message DolbyItem { // DRM技术类型 enum DrmTechType { NON = 0; // - FAIR_PLAY = 1; // + FAIR_PLAY = 1; // + WIDE_VINE = 2; // + BILI_DRM = 3; // } -// 播放结束页 +// 播放结束后的尾页Dialog message EndPage { - // 鉴权浮层 + // Dialog dialog = 1; - // 播放完后是否隐藏end_page + // bool hide = 2; } +// +message EpInlineVideo { + // + int64 material_no = 1; + // + int64 aid = 2; + // + int64 cid = 3; +} + +// 剧集广告信息 +message EpisodeAdvertisementInfo { + // + int64 aid = 1; + // + string title = 2; + // + string link = 3; + // + int32 follow_video_bnt_flag = 4; + // + string next_video_title = 5; + // + string next_video_link = 6; + // + int64 cid = 7; + // + int32 season_id = 8; + // + int32 follow = 9; +} + +// EP信息 +message EpisodeInfo { + // + int32 ep_id = 1; + // + int64 cid = 2; + // + int64 aid = 3; + // + int64 ep_status = 4; + // + SeasonInfo season_info = 5; + // + string cover = 6; + // + string title = 7; + // + Interaction interaction = 8; + // + string long_title = 9; +} + +// +message EpPreVideo { + // + int64 aid = 1; + // + int64 cid = 2; +} + +// +message EpPublicityVideo { + // + enum Type { + DATA_NOT_SET = 0; + EP_PRE_VIDEO = 2; + EP_INLINE = 3; + } + // + Type type = 1; + // + oneof data { + // + EpPreVideo ep_pre_video = 2; + // + EpInlineVideo ep_inline_video = 3; + } +} + +// +enum EpPublicityVideoType { + // + PRE = 0; + // + INLINE = 1; +} + // 事件 message Event { // 震动 Shake shake = 1; } -// ? 放映室提示语 +// 放映室提示语 message FreyaConfig { // string desc = 1; @@ -343,6 +483,16 @@ message HighDefinitionTrialInfo { ButtonInfo no_longer_trial_btn = 9; } +// 历史记录节点 +message HistoryNode { + // 节点ID + int64 node_id = 1; + // 节点标题 + string title = 2; + // 对应CID + int64 cid = 3; +} + // 图片信息 message ImageInfo { // 图片链接 @@ -365,6 +515,28 @@ enum InlineType { TYPE_PREVIEW = 3; // } +// 交互信息 +message Interaction { + // 历史节点 + HistoryNode history_node = 1; + // 版本 + int64 graph_version = 2; + // 交互消息 + string msg = 3; + // 是否为交互 + bool is_interaction = 4; +} + +// 限制操作类型 +enum LimitActionType { + // + LAT_UNKNOWN = 0; + // + SHOW_LIMIT_DIALOG = 1; + // + SKIP_CURRENT_EP = 2; +} + // message MultiView { // @@ -379,44 +551,46 @@ message MultiView { // 大会员广告: 支付提示信息 message PayTip { - // + // 标题 string title = 1; - // + // 跳转链接 string url = 2; - // + // 图标 string icon = 3; - // + // 浮层类型 int32 type = 4; - // + // 显示类型 int32 show_type = 5; - // + // 图片信息 string img = 6; - // + // 白天背景颜色 string bg_day_color = 7; - // + // 夜间背景颜色 string bg_night_color = 8; - // + // 白天线条颜色 string bg_line_color = 9; - // + // 夜间线条颜色 string bg_night_line_color = 10; - // + // 文字颜色 string text_color = 11; - // + // 夜间文字颜色 string text_night_color = 12; - // + // 视图展示起始时间 int64 view_start_time = 13; - // + // 按钮列表 repeated ButtonInfo button = 14; - // + // 跳转链接打开方式 int32 url_open_type = 15; - // + // 埋点上报信息 Report report = 16; - // + // 角度样式 int32 angle_style = 17; - // + // 埋点上报类型 int32 report_type = 18; - // + // 订单埋点上报参数 map order_report_params = 19; + // 巨屏图片信息 + string giant_screen_img = 20; } // 禁用功能配置 @@ -450,14 +624,15 @@ message PlayAbilityConf { bool freya_enter_disable = 27; // 一起看入口 bool dolby_disable = 28; // 杜比音效 bool freya_full_disable = 29; // 全屏一起看入口 - bool skip_oped_switch_disable = 30; // - bool record_screen_disable = 31; // - bool color_optimize_disable = 32; // + bool skip_oped_switch_disable = 30; // 跳过片头片尾 + bool record_screen_disable = 31; // 录屏 + bool color_optimize_disable = 32; // 色觉优化 + bool dubbing_disable = 33; // 配音 } // 云控扩展配置信息 message PlayAbilityExtConf { - // 自定义配置扩展信息 + // bool allow_close_subtitle = 1; // FreyaConfig freya_config = 2; @@ -465,12 +640,43 @@ message PlayAbilityExtConf { CastTips cast_tips = 3; } +// 播放配音信息 +message PlayDubbingInfo { + // 背景音频 + AudioMaterialProto background_audio = 1; + // 角色音频列表 + repeated RoleAudioProto role_audio_list = 2; + // 引导文本 + string guide_text = 3; +} + // 错误码 enum PlayErr { NoErr = 0; // WithMultiDeviceLoginErr = 1; // 管控类型的错误码 } + +// 播放扩展信息 +message PlayExtInfo { + // 播放配音信息 + PlayDubbingInfo play_dubbing_info = 1; +} + +// +message PlayList { + // + int32 season_id = 1; + // + string title = 2; + // + string cover = 3; + // + string link = 4; + // + BadgeInfo badge_info = 5; +} + // 其他业务信息 message PlayViewBusinessInfo { // 当前视频是否是预览 @@ -497,6 +703,22 @@ message PlayViewBusinessInfo { map exp_map = 11; // DRM技术类型 DrmTechType drm_tech_type = 12; + // + int32 limit_action_type = 13; + // + bool is_drm = 14; + // + RecordInfo record_info = 15; + // + int32 vip_status = 16; + // + bool is_live_pre = 17; + // + EpisodeInfo episode_info = 18; + // + EpisodeAdvertisementInfo episode_advertisement_info = 19; + // + UserStatus user_status = 20; } // 播放页信息-响应 @@ -513,6 +735,8 @@ message PlayViewReply { ViewInfo view_info = 5; // 自定义配置扩展信息 PlayAbilityExtConf play_ext_conf = 6; + // 播放扩展信息 + PlayExtInfo play_ext_info = 7; } // 播放页信息-请求 @@ -555,6 +779,12 @@ message PlayViewReq { InlineScene inline_scene = 17; // int64 material_no = 18; + // DRM 安全等级 + int32 security_level = 19; + // + int64 season_id = 20; + // + DataControl data_control = 21; } // 弹窗信息 @@ -607,6 +837,14 @@ message QualityExtInfo { bool trial_support = 1; } +// 备案信息 +message RecordInfo { + // 记录 + string record = 1; + // 记录图标 + string record_icon = 2; +} + // 埋点上报信息 message Report { // 曝光事件 @@ -633,6 +871,24 @@ message ResponseUrl { string md5 = 6; } +// 权限信息 +message Rights { + // 是否可以观看 + int32 can_watch = 1; +} + +// 角色配音信息 +message RoleAudioProto { + // 角色ID + int64 role_id = 1; + // 角色名称 + string role_name = 2; + // 角色头像 + string role_avatar = 3; + // 音频素材列表 + repeated AudioMaterialProto audio_material_list = 4; +} + // 场景控制 message SceneControl { // 是否收藏播单 @@ -647,7 +903,45 @@ message SceneControl { bool is_need_trial = 5; } -//分段视频流 +// 方案 +message Scheme { + enum ActionType { + UNKNOWN = 0; + SHOW_TOAST = 1; + } + // + ActionType action_type = 1; + // + string toast = 2; +} + +// PGC SEASON 信息 +message SeasonInfo { + // PGC SEASON ID + int32 season_id = 1; + // PGC SEASON 类型 + int32 season_type = 2; + // PGC SEASON 状态 + int32 season_status = 3; + // 封面 + string cover = 4; + // 标题 + string title = 5; + // 权限信息 + Rights rights = 6; + // 模式 + int32 mode = 7; +} + +// DRM 安全等级 +enum SecurityLevel { + LEVEL_UNKNOWN = 0; // + LEVEL_L1 = 1; // + LEVEL_L2 = 2; // + LEVEL_L3 = 3; // +} + +// 分段视频流 message SegmentVideo { //分段视频流列表 repeated ResponseUrl segment = 1; @@ -674,32 +968,36 @@ message Stream { // 流媒体元数据 message StreamInfo { - // 清晰度 - uint32 quality = 1; - // 格式 + // 视频质量 + int32 quality = 1; + // 视频格式 string format = 2; - // 格式描述 + // 描述信息 string description = 3; // 错误码 - uint32 err_code = 4; - // 不满足条件信息 + int32 err_code = 4; + // 流限制信息 StreamLimit limit = 5; - // 是否需要vip + // 是否需要VIP bool need_vip = 6; // 是否需要登录 bool need_login = 7; // 是否完整 bool intact = 8; - // 是否非全二压 - bool no_rexcode = 9; - // 清晰度属性位 + // 权限信息 int64 attribute = 10; - // 新版格式描述 + // 新版描述信息 string new_description = 11; - // 格式文字 + // 显示描述信息 string display_desc = 12; - // 新版格式描述备注 + // 上标 string superscript = 13; + // 方案信息 + Scheme scheme = 14; + // 是否支持DRM + bool support_drm = 15; + // 字幕信息 + string subtitle = 16; } // 清晰度不满足条件信息 @@ -712,14 +1010,24 @@ message StreamLimit { string msg = 3; } +// 任务参数信息 +message TaskParam { + // 任务类型 + string task_type = 1; + // 活动ID + int64 activity_id = 2; + // 提示ID + int64 tips_id = 3; +} + // 文案信息 message TextInfo { // 文案 string text = 1; // 字体色值 - string textColor = 2; + string text_color = 2; // 字体色值-夜间模式 - string textColorNight = 3; + string text_color_night = 3; } // toast @@ -740,6 +1048,18 @@ message Toast { map order_report_params = 7; } +// 用户状态信息 +message UserStatus { + // 是否支付 + bool pay_check = 1; + // 是否承包 + bool sponsor = 2; + // 观看进度 + WatchProgress watch_progress = 3; + // 系列观看进度 + WatchProgress aid_watch_progress = 4; +} + // 视频url信息 message VideoInfo { // 视频清晰度 @@ -760,26 +1080,48 @@ message VideoInfo { // 展示信息 message ViewInfo { - // 鉴权浮层 + // 弹窗 Dialog dialog = 1; - // toast + // Toast Toast toast = 2; // 优惠券信息 CouponInfo coupon_info = 3; - // 未购买的超前点播ep列表 + // 未支付剧集ID列表 repeated int64 demand_no_pay_epids = 4; - // 播放结束页 + // 结束页 EndPage end_page = 5; - // + // 扩展配置 map exp_config = 6; // 弹窗 PopWin pop_win = 7; - // + // 试看提示栏 PromptBar try_watch_prompt_bar = 8; - // + // 支付提示信息 PayTip pay_tip = 9; - // + // 高清试看提示信息 HighDefinitionTrialInfo high_definition_trial_info = 10; - // + // 弹窗扩展 map ext_dialog = 11; -} \ No newline at end of file + // 动画 + Animation animation = 12; + // Toast扩展 + map ext_toast = 13; +} + +// 观看进度信息 +message WatchProgress { + // 上次观看的 EP ID + int32 last_ep_id = 1; + // 上次观看到的EP INDEX + string last_ep_index = 2; + // 上次观看的进度 + int64 progress = 3; + // 上次观看的 CID + int64 last_play_cid = 4; + // 带时间的提示信息 + Toast toast = 5; + // 不带时间的提示信息 + Toast toast_without_time = 6; + // 上次观看的 AID + int64 last_play_aid = 7; +} diff --git a/grpc_api/bilibili/pgc/gateway/player/v3/playurl.proto b/grpc_api/bilibili/pgc/gateway/player/v3/playurl.proto deleted file mode 100644 index 28374f9..0000000 --- a/grpc_api/bilibili/pgc/gateway/player/v3/playurl.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package bilibili.pgc.gateway.player.v3; - -import "bilibili/playershared/playershared.proto"; - -import "google/protobuf/any.proto"; - -// 播放页信息-请求 -message PlayViewReq { - // 视频信息 - bilibili.playershared.VideoVod vod = 1; - // 当前页spm - string spmid = 2; - // 上一页spm - string from_spmid = 3; - // 青少年模式 - int32 teenagers_mode = 4; - // - map extra_content = 5; - -} - -// 播放页信息-响应 -message PlayViewReply { - bilibili.playershared.VodInfo vod_info = 1; - bilibili.playershared.PlayArcConf play_arc_conf = 2; - google.protobuf.Any supplement = 3; - bilibili.playershared.PlayArc play_arc = 4; - bilibili.playershared.QnTrialInfo qn_trial_info = 5; - bilibili.playershared.Event event = 6; -} \ No newline at end of file diff --git a/grpc_api/bilibili/playershared/playershared.proto b/grpc_api/bilibili/playershared/playershared.proto index 47d586c..d36e984 100644 --- a/grpc_api/bilibili/playershared/playershared.proto +++ b/grpc_api/bilibili/playershared/playershared.proto @@ -2,14 +2,26 @@ syntax = "proto3"; package bilibili.playershared; -// +// ArcConf消息 message ArcConf { + // 是否支持 bool is_support = 1; - bool disable = 2; + // 是否禁用 + bool disabled = 2; + // 额外内容 ExtraContent extra_content = 3; + // 不支持场景列表 repeated int32 unsupport_scene = 4; } +// +enum ArcType { + // + ARC_TYPE_NORMAL = 0; + // + ARC_TYPE_INTERACT = 1; +} + // 按钮组件 message Button { // 按钮文本 @@ -72,18 +84,92 @@ enum ConfType { // message ConfValue { oneof value { - // DASH流 + // int32 switch_val = 1; - // 分段流 + // int32 selected_val = 2; } } +// Dash条目 +message DashItem { + // 清晰度 + uint32 id = 1; + // 主线流 + string base_url = 2; + // 备用流 + repeated string backup_url = 3; + // 带宽 + uint32 bandwidth = 4; + // 编码id + uint32 codecid = 5; + // md5 + string md5 = 6; + // 大小 + uint64 size = 7; + // 帧率 + string frame_rate = 8; + // DRM密钥 + string widevine_pssh = 9; +} + +// 视频流信息: dash流 +message DashVideo { + // 主线流 + string base_url = 1; + // 备用流 + repeated string backup_url = 2; + // 带宽 + uint32 bandwidth = 3; + // 编码id + uint32 codecid = 4; + // md5 + string md5 = 5; + // 大小 + uint64 size = 6; + // 伴音质量id + uint32 audio_id = 7; + // 是否非全二压 + bool no_rexcode = 8; + // 帧率 + string frame_rate = 9; + // 宽 + int32 width = 10; + // 高 + int32 height = 11; + // DRM密钥 + string widevine_pssh = 12; +} + // message DeviceConf { ConfValue conf_value = 1; } +// 当前分辨率信息 +message Dimension { + // 宽 + int32 width = 1; + // 长 + int32 height = 2; + // 旋转角度 + int32 rotate = 3; +} + +// 杜比伴音流信息 +message DolbyItem { + // 杜比类型 + enum Type { + NONE = 0; // NONE + COMMON = 1; // 普通杜比音效 + ATMOS = 2; // 全景杜比音效 + } + // 杜比类型 + Type type = 1; + // 音频流 + repeated DashItem audio = 2; +} + // DRM类型 enum DrmTechType { // @@ -96,12 +182,18 @@ enum DrmTechType { BILI_DRM = 3; } +// 事件 +message Event { + // 震动 + Shake shake = 1; +} + // ? 错误码补充信息 message ExtraContent { // string disable_reason = 1; // - uint64 disable_code = 2; + int64 disable_code = 2; } // 播放历史 @@ -112,17 +204,79 @@ message History { HistoryInfo related_video = 2; } +// message HistoryInfo { // int64 progress = 1; // int64 last_play_cid = 2; + // + Toast toast = 3; + // + Toast toast_without_time = 4; + // + int64 last_play_aid = 5; +} + +// +message Interaction { + // + Node history_node = 1; + // + int64 graph_version = 2; + // + string msg = 3; + // + int64 mark = 4; +} + +// HIRES伴音流信息 +message LossLessItem { + // 是否为hires + bool is_lossless_audio = 1; + // 音频流信息 + DashItem audio = 2; + // 是否需要大会员 + bool need_vip = 3; +} + +// +message Node { + // + int64 node_id = 1; + // + string title = 2; + // + int64 cid = 3; +} + +// +message PlayArc { + // + VideoType video_type = 1; + // + uint64 aid = 2; + // + uint64 cid = 3; + // + DrmTechType drm_tech_type = 4; + // + ArcType arc_type = 5; + // + Interaction interaction = 6; + // + Dimension dimension = 7; +} + +// 播放页信息-响应: PlayArcConf +message PlayArcConf { + map arc_confs = 1; } // message PlayDeviceConf { // - map arc_confs = 1; + map device_confs = 1; } // 错误码 @@ -131,6 +285,46 @@ enum PlayErr { WithMultiDeviceLoginErr = 1; // 管控类型的错误码 } +// 播放页信息-响应: 高画质试看信息 +message QnTrialInfo { + // 能否试看高画质 + bool trial_able = 1; + // + int32 remaining_times = 2; + // + int32 start = 3; + // + int32 time_length = 4; + // + Toast start_toast = 5; + // + Toast end_toast = 6; + // + Button quality_open_tip_btn = 8; +} + +// Dash Response, 未使用 +message ResponseDash { + repeated DashItem video = 1; + repeated DashItem audio = 2; +} + +// 分段流条目 +message ResponseUrl { + // 分段序号 + uint32 order = 1; + // 分段时长 + uint64 length = 2; + // 分段大小 + uint64 size = 3; + // 主线流 + string url = 4; + // 备用流 + repeated string backup_url = 5; + // md5 + string md5 = 6; +} + // 方案 message Scheme { enum ActionType { @@ -143,21 +337,15 @@ message Scheme { string toast = 2; } -// -enum UnsupportScene { - // - UNKNOWN_SCENE = 0; - // - PREMIERE = 1; +// 视频流信息: 分段流 +message SegmentVideo { + repeated ResponseUrl segment = 1; } -// 视频类型 -enum VideoType { - UNKNOWN = 0; - // 用户生成内容 - UGC = 1; - // 专业生产内容 - PGC = 2; +// 震动 +message Shake { + // + string file = 1; } // 视频流信息 @@ -211,83 +399,6 @@ message StreamInfo { bool support_drm = 17; } -// Dash条目 -message DashItem { - // 清晰度 - uint32 id = 1; - // 主线流 - string base_url = 2; - // 备用流 - repeated string backup_url = 3; - // 带宽 - uint32 bandwidth = 4; - // 编码id - uint32 codecid = 5; - // md5 - string md5 = 6; - // 大小 - uint64 size = 7; - // 帧率 - string frame_rate = 8; - // DRM密钥 - string widevine_pssh = 9; -} - -// 视频流信息: dash流 -message DashVideo { - // 主线流 - string base_url = 1; - // 备用流 - repeated string backup_url = 2; - // 带宽 - uint32 bandwidth = 3; - // 编码id - uint32 codecid = 4; - // md5 - string md5 = 5; - // 大小 - uint64 size = 6; - // 伴音质量id - uint32 audio_id = 7; - // 是否非全二压 - bool no_rexcode = 8; - // 帧率 - string frame_rate = 9; - // 宽 - int32 width = 10; - // 高 - int32 height = 11; - // DRM密钥 - string widevine_pssh = 12; -} - -// 视频流信息: 分段流 -message SegmentVideo { - repeated ResponseUrl segment = 1; -} - -// 分段流条目 -message ResponseUrl { - // 分段序号 - uint32 order = 1; - // 分段时长 - uint64 length = 2; - // 分段大小 - uint64 size = 3; - // 主线流 - string url = 4; - // 备用流 - repeated string backup_url = 5; - // md5 - string md5 = 6; -} - -// Dash Response, 未使用 -message ResponseDash { - repeated DashItem video = 1; - repeated DashItem audio = 2; -} - // 视频流信息: 流媒体元数据: 清晰度不满足条件信息 message StreamLimit { // 标题 @@ -298,6 +409,30 @@ message StreamLimit { string msg = 3; } +// Toast信息 +message Toast { + // toast文案 + string text = 1; + // toast按钮 + Button button = 2; +} + +// +enum UnsupportScene { + // + UNKNOWN_SCENE = 0; + // + PREMIERE = 1; +} + +// 视频类型 +enum VideoType { + UNKNOWN = 0; + // 用户生成内容 + UGC = 1; + // 专业生产内容 + PGC = 2; +} // 播放页信息-请求: 音视频VOD message VideoVod { @@ -345,30 +480,8 @@ message VodInfo { VolumeInfo volume = 8; // HIRES伴音流信息 LossLessItem loss_less_item = 9; -} - -// 杜比伴音流信息 -message DolbyItem { - // 杜比类型 - enum Type { - NONE = 0; // NONE - COMMON = 1; // 普通杜比音效 - ATMOS = 2; // 全景杜比音效 - } - // 杜比类型 - Type type = 1; - // 音频流 - repeated DashItem audio = 2; -} - -// HIRES伴音流信息 -message LossLessItem { - // 是否为hires - bool is_lossless_audio = 1; - // 音频流信息 - DashItem audio = 2; - // 是否需要大会员 - bool need_vip = 3; + // 是否支持投屏 + bool support_project = 10; } // 响度均衡操作信息 @@ -388,58 +501,3 @@ message VolumeInfo { // Target true peak 目标响度真峰值 double target_tp = 7; } - -// -message PlayArc { - // - VideoType video_type = 1; - // - uint64 aid = 2; - // - uint64 cid = 3; - // - DrmTechType drm_tech_type = 4; -} - -// 播放页信息-响应: PlayArcConf -message PlayArcConf { - map arc_confs = 1; -} - -// 播放页信息-响应: 高画质试看信息 -message QnTrialInfo { - // 能否试看高画质 - bool trial_able = 1; - // - int32 remaining_times = 2; - // - int32 start = 3; - // - int32 time_length = 4; - // - Toast start_toast = 5; - // - Toast end_toast = 6; - // - Button quality_open_tip_btn = 8; -} - -// Toast信息 -message Toast { - // toast文案 - string text = 1; - // toast按钮 - Button button = 2; -} - -// 事件 -message Event { - // 震动 - Shake shake = 1; -} - -// 震动 -message Shake { - // - string file = 1; -} diff --git a/grpc_api/bilibili/polymer/app/search/v1/search.proto b/grpc_api/bilibili/polymer/app/search/v1/search.proto index f532f49..7741584 100644 --- a/grpc_api/bilibili/polymer/app/search/v1/search.proto +++ b/grpc_api/bilibili/polymer/app/search/v1/search.proto @@ -1098,18 +1098,38 @@ message SearchBannerCard { // message SearchByTypeRequest { + enum CategorySort { + CATEGORY_SORT_DEFAULT = 0; + CATEGORY_SORT_PUBLISH_TIME = 1; + CATEGORY_SORT_CLICK_COUNT = 2; + CATEGORY_SORT_COMMENT_COUNT = 3; + CATEGORY_SORT_LIKE_COUNT = 4; + } + enum UserType { + ALL = 0; + UP = 1; + NORMAL_USER = 2; + AUTHENTICATED_USER = 3; + } + enum UserSort { + USER_SORT_DEFAULT = 0; + USER_SORT_FANS_DESCEND = 1; + USER_SORT_FANS_ASCEND = 2; + USER_SORT_LEVEL_DESCEND = 3; + USER_SORT_LEVEL_ASCEND = 4; + } // 搜索目标类型, 番剧为7 int32 type = 1; // 关键词 string keyword = 2; // - int32 category_sort = 3; + CategorySort category_sort = 3; // int64 category_id = 4; // - int32 user_type = 5; + UserType user_type = 5; // - int32 user_sort = 6; + UserSort user_sort = 6; // bilibili.pagination.Pagination pagination = 7; // diff --git a/grpc_api/bilibili/polymer/contract/contract.proto b/grpc_api/bilibili/polymer/contract/v1/contract.proto similarity index 97% rename from grpc_api/bilibili/polymer/contract/contract.proto rename to grpc_api/bilibili/polymer/contract/v1/contract.proto index a6d4520..0b04e90 100644 --- a/grpc_api/bilibili/polymer/contract/contract.proto +++ b/grpc_api/bilibili/polymer/contract/v1/contract.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.polymer.contract; +package bilibili.polymer.contract.v1; import "google/protobuf/empty.proto"; From 7727f4975e91c4538c46469d47a84872f9371821 Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Mon, 3 Jul 2023 17:00:13 +0800 Subject: [PATCH 051/159] =?UTF-8?q?=E7=BA=A0=E6=AD=A3=20#448=20=E7=9A=84?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/user/space.md | 4747 ++++++++++++++++---------------------------- 用户/space.md | 3652 ---------------------------------- 2 files changed, 1750 insertions(+), 6649 deletions(-) delete mode 100644 用户/space.md diff --git a/docs/user/space.md b/docs/user/space.md index 6bce61e..74f5f8c 100644 --- a/docs/user/space.md +++ b/docs/user/space.md @@ -1,14 +1,61 @@ # 用户空间相关 +- [主页](#主页) + - [置顶视频](#置顶视频) + - [查询用户置顶视频](#查询用户置顶视频) + - [设置置顶视频](#设置置顶视频) + - [取消置顶视频](#取消置顶视频) + - [代表作视频](#代表作视频) + - [查询用户代表作视频列表](#查询用户代表作视频列表) + - [添加代表作视频](#添加代表作视频) + - [删除代表作视频](#删除代表作视频) + - [个人TAG](#个人TAG) + - [查看用户个人TAG](#查看用户个人TAG) + - [修改个人TAG](#修改个人TAG) + - [空间公告](#空间公告) + - [查看用户空间公告](#查看用户空间公告) + - [修改空间公告](#修改空间公告) + - [主页板块布局与权限](#主页板块布局与权限) + - [查询空间设置](#查询空间设置) + - [调整空间板块布局](#调整空间板块布局) + - [修改空间隐私权限](#修改空间隐私权限) + - [查询用户最近玩过的游戏](#查询用户最近玩过的游戏) + - [获取用户最近投币的视频明细](#获取用户最近投币的视频明细) +- [投稿](#投稿) + - [查询用户投稿视频明细](#查询用户投稿视频明细) + - [查询用户投稿相簿预览](#查询用户投稿相簿预览) + - [查询用户投稿相簿明细](#查询用户投稿相簿明细) +- [频道](#频道) + - [查询用户频道列表](#查询用户频道列表) + - [查询用户频道中的视频](#查询用户频道中的视频) + - [创建频道](#创建频道) + - [修改频道](#修改频道) + - [删除频道](#删除频道) + - [频道添加视频](#频道添加视频) + - [频道删除视频](#频道删除视频) + - [调整频道视频排序](#调整频道视频排序) + - [检查频道中有无失效视频](#检查频道中有无失效视频) +- [收藏](#收藏) + - [查询用户创建的视频收藏夹](#查询用户创建的视频收藏夹) + - [查询用户收藏的视频收藏夹](#查询用户收藏的视频收藏夹) +- [课程](#课程) + - [查询用户发布的课程列表](#查询用户发布的课程列表) +- [订阅](#订阅) + - [查询用户追番预览列表](#查询用户追番预览列表) + - [查询用户追番(追剧)明细](#查询用户追番(追剧)明细) + - [查询用户关注的TAG(话题)](#查询用户关注的TAG(话题)) + +--- + ## 主页 - + ### 置顶视频 #### 查询用户置顶视频 ->https://api.bilibili.com/x/space/top/arc +>http://api.bilibili.com/x/space/top/arc *请求方式:GET* @@ -16,54 +63,54 @@ **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------|-----|---------|-----|-----| -| vmid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| vmid | num | 目标用户mid | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|---------------------------------------| -| code | num | 返回值 | 0:成功
-400:请求错误
53016:没有置顶视频 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ---------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53016:没有置顶视频 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------------|------|-----------------|-------------------------------------------------------------------| -| aid | num | 稿件avid | | -| videos | num | 视频分P总数 | 默认为1 | -| tid | num | 分区tid | | -| tname | str | 子分区名称 | | -| copyright | num | 是否转载 | 1:原创
2:转载 | -| pic | str | 视频封面图片url | | -| title | str | 稿件标题 | | -| pubdate | num | 稿件发布时间 | 时间戳 | -| ctime | num | 用户提交稿件的时间 | 时间戳 | -| desc | str | 视频简介 | | -| state | num | 视频状态 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`state`备注 | -| attribute | num | 稿件属性位配置 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`attribute`备注 | -| duration | num | 视频总计持续时长(所有分P) | 单位为秒 | -| rights | obj | 视频属性标志 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`rights`对象 | -| owner | obj | 视频UP主信息 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`owner`对象 | -| stat | obj | 视频状态数 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`stat`对象 | -| dynamic | str | 视频同步发布的的动态的文字内容 | 无为空 | -| cid | num | 视频1P cid | | -| dimension | obj | 视频1P分辨率 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`dimension`对象 | -| bvid | str | 稿件bvid | | -| reason | str | 置顶视频备注 | | -| inter_video | bool | 是否为合作视频 | false:否
true:是 | +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | ------------------------------ | ------------------------------------------------------------ | +| aid | num | 稿件avid | | +| videos | num | 视频分P总数 | 默认为1 | +| tid | num | 分区tid | | +| tname | str | 子分区名称 | | +| copyright | num | 是否转载 | 1:原创
2:转载 | +| pic | str | 视频封面图片url | | +| title | str | 稿件标题 | | +| pubdate | num | 稿件发布时间 | 时间戳 | +| ctime | num | 用户提交稿件的时间 | 时间戳 | +| desc | str | 视频简介 | | +| state | num | 视频状态 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`state`备注 | +| attribute | num | 稿件属性位配置 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`attribute`备注 | +| duration | num | 视频总计持续时长(所有分P) | 单位为秒 | +| rights | obj | 视频属性标志 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`rights`对象 | +| owner | obj | 视频UP主信息 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`owner`对象 | +| stat | obj | 视频状态数 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`stat`对象 | +| dynamic | str | 视频同步发布的的动态的文字内容 | 无为空 | +| cid | num | 视频1P cid | | +| dimension | obj | 视频1P分辨率 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`dimension`对象 | +| bvid | str | 稿件bvid | | +| reason | str | 置顶视频备注 | | +| inter_video | bool | 是否为合作视频 | false:否
true:是 | **示例:** 查询用户`mid=23215368`的置顶视频 ```shell -curl -G 'https://api.bilibili.com/x/space/top/arc' \ +curl -G 'http://api.bilibili.com/x/space/top/arc' \ --data-urlencode 'vmid=23215368' ``` @@ -139,7 +186,7 @@ curl -G 'https://api.bilibili.com/x/space/top/arc' \ #### 设置置顶视频 -> https://api.bilibili.com/x/space/top/arc/set +> http://api.bilibili.com/x/space/top/arc/set *请求方式:POST* @@ -147,22 +194,22 @@ curl -G 'https://api.bilibili.com/x/space/top/arc' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|--------|-----|----------------------|--------|----------------------| -| aid | num | 置顶目标稿件avid | 必要(可选) | avid与bvid任选一个 | -| bvid | str | 置顶目标稿件bvid | 必要(可选) | avid与bvid任选一个 | -| reason | str | 置顶视频备注 | 非必要 | 置顶备注最大40字符
默认为空 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------------ | -------------------------------- | +| aid | num | 置顶目标稿件avid | 必要(可选) | avid与bvid任选一个 | +| bvid | str | 置顶目标稿件bvid | 必要(可选) | avid与bvid任选一个 | +| reason | str | 置顶视频备注 | 非必要 | 置顶备注最大40字符
默认为空 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|---------------------------------------------------------------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-304:未修改
-400:请求错误
53014:稿件已失效
53015:备注过长
53017:置顶非自己的稿件 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-304:未修改
-400:请求错误
53014:稿件已失效
53015:备注过长
53017:置顶非自己的稿件 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | **示例:** @@ -171,7 +218,7 @@ curl -G 'https://api.bilibili.com/x/space/top/arc' \ avid方式: ```shell -curl 'https://api.bilibili.com/x/space/top/arc/set' \ +curl 'http://api.bilibili.com/x/space/top/arc/set' \ --data-urlencode 'aid=98948772' \ -b 'SESSDATA=xxx' ``` @@ -179,7 +226,7 @@ curl 'https://api.bilibili.com/x/space/top/arc/set' \ bvid方式: ```shell -curl 'https://api.bilibili.com/x/space/top/arc/set' \ +curl 'http://api.bilibili.com/x/space/top/arc/set' \ --data-urlencode 'bvid=BV1n741127LD' \ -b 'SESSDATA=xxx' ``` @@ -199,7 +246,7 @@ curl 'https://api.bilibili.com/x/space/top/arc/set' \ #### 取消置顶视频 -> https://api.bilibili.com/x/space/top/arc/cancel +> http://api.bilibili.com/x/space/top/arc/cancel *请求方式:POST* @@ -207,24 +254,24 @@ curl 'https://api.bilibili.com/x/space/top/arc/set' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------|-----|----------------------|-----|-----| -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---- | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|--------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误(重复取消) | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误(重复取消) | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | **示例:** ```shell -curl 'https://api.bilibili.com/x/space/top/arc/cancel' \ +curl 'http://api.bilibili.com/x/space/top/arc/cancel' \ --data-urlencode 'csrf=xxx' \ -b 'SESSDATA=xxx' ``` @@ -246,7 +293,7 @@ curl 'https://api.bilibili.com/x/space/top/arc/cancel' \ #### 查询用户代表作视频列表 -> https://api.bilibili.com/x/space/masterpiece +> http://api.bilibili.com/x/space/masterpiece *请求方式:GET* @@ -256,28 +303,28 @@ curl 'https://api.bilibili.com/x/space/top/arc/cancel' \ **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------|-----|---------|-----|-----| -| vmid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| vmid | num | 目标用户mid | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-------|-------|---------------------| -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | array | 代表作列表 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ------ | ---------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | array | 代表作列表 | | `data`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|------|------------------| -| 0 | obj | 代表作1 | 无则为空 | -| 1 | obj | 代表作2 | 无则为空 | -| 2 | obj | 代表作3 | 无则为空
最多设置3个 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ------- | ------------------------- | +| 0 | obj | 代表作1 | 无则为空 | +| 1 | obj | 代表作2 | 无则为空 | +| 2 | obj | 代表作3 | 无则为空
最多设置3个 | `data`数组中的对象: @@ -288,7 +335,7 @@ curl 'https://api.bilibili.com/x/space/top/arc/cancel' \ 查询用户`mid=23215368`的代表作视频列表 ```shell -curl -G 'https://api.bilibili.com/x/space/masterpiece' \ +curl -G 'http://api.bilibili.com/x/space/masterpiece' \ --data-urlencode 'vmid=23215368' ``` @@ -477,7 +524,7 @@ curl -G 'https://api.bilibili.com/x/space/masterpiece' \ #### 添加代表作视频 -> https://api.bilibili.com/x/space/masterpiece/add +> http://api.bilibili.com/x/space/masterpiece/add *请求方式:POST* @@ -487,22 +534,22 @@ curl -G 'https://api.bilibili.com/x/space/masterpiece' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|--------|-----|----------------------|--------|----------------------| -| aid | num | 置顶目标稿件avid | 必要(可选) | avid与bvid任选一个 | -| bvid | str | 置顶目标稿件bvid | 必要(可选) | avid与bvid任选一个 | -| reason | str | 代表作备注 | 非必要 | 置顶备注最大40字符
默认为空 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------------ | -------------------------------- | +| aid | num | 置顶目标稿件avid | 必要(可选) | avid与bvid任选一个 | +| bvid | str | 置顶目标稿件bvid | 必要(可选) | avid与bvid任选一个 | +| reason | str | 代表作备注 | 非必要 | 置顶备注最大40字符
默认为空 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|------------------------------------------------------------------------------------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53014:稿件已失效
53015:备注过长
53017:置顶非自己的稿件
53019:达到上限
53020:已经存在该稿件 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53014:稿件已失效
53015:备注过长
53017:置顶非自己的稿件
53019:达到上限
53020:已经存在该稿件 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | **示例:** @@ -511,7 +558,7 @@ curl -G 'https://api.bilibili.com/x/space/masterpiece' \ avid方式: ```shell -curl 'https://api.bilibili.com/x/space/masterpiece/add' \ +curl 'http://api.bilibili.com/x/space/masterpiece/add' \ --data-urlencode 'aid=94916552' \ --data-urlencode 'csrf=xxx' \ -b 'SESSDATA=xxx' @@ -520,7 +567,7 @@ curl 'https://api.bilibili.com/x/space/masterpiece/add' \ bvid方式: ```shell -curl 'https://api.bilibili.com/x/space/masterpiece/add' \ +curl 'http://api.bilibili.com/x/space/masterpiece/add' \ --data-urlencode 'bvid=BV1ZE411K7ux' \ --data-urlencode 'csrf=xxx' \ -b 'SESSDATA=xxx' @@ -541,7 +588,7 @@ curl 'https://api.bilibili.com/x/space/masterpiece/add' \ #### 删除代表作视频 -> https://api.bilibili.com/x/space/masterpiece/cancel +> http://api.bilibili.com/x/space/masterpiece/cancel *请求方式:POST* @@ -549,21 +596,21 @@ curl 'https://api.bilibili.com/x/space/masterpiece/add' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------|-----|----------------------|--------|---------------| -| aid | num | 要删除的目标稿件avid | 必要(可选) | avid与bvid任选一个 | -| bvid | str | 要删除的目标稿件bvid | 必要(可选) | avid与bvid任选一个 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------------ | ------------------ | +| aid | num | 要删除的目标稿件avid | 必要(可选) | avid与bvid任选一个 | +| bvid | str | 要删除的目标稿件bvid | 必要(可选) | avid与bvid任选一个 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|------------------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53021:置顶列表中没有该视频 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53021:置顶列表中没有该视频 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | 作用尚不明确 | **示例:** @@ -581,7 +628,7 @@ curl 'api.bilibili.com/x/space/masterpiece/cancel' \ bvid方式: ```shell -curl 'https://api.bilibili.com/x/space/masterpiece/cancel' \ +curl 'http://api.bilibili.com/x/space/masterpiece/cancel' \ --data-urlencode 'bvid=BV1Yt41137T6' \ --data-urlencode 'csrf=xxx' \ -b 'SESSDATA=xxx' @@ -591,7 +638,7 @@ curl 'https://api.bilibili.com/x/space/masterpiece/cancel' \ #### 查看用户个人TAG -> https://api.bilibili.com/x/space/acc/tags +> http://api.bilibili.com/x/space/acc/tags *请求方式:GET* @@ -601,49 +648,49 @@ curl 'https://api.bilibili.com/x/space/masterpiece/cancel' \ **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|-----| -| mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-------|------|---------------------| -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | array | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ----- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | array | 信息本体 | | `data`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|------|---------| -| 0 | obj | 套了个娃 | 只有1项??? | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------- | ------------- | +| 0 | obj | 套了个娃 | 只有1项??? | `data`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|------|-------|---------|-----| -| mid | num | 目标用户mid | | -| tags | array | TAG名称 | | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ----- | ----------- | ---- | +| mid | num | 目标用户mid | | +| tags | array | TAG名称 | | `data`数组中的对象中的`tags`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|----------|------| -| 0 | str | TAG1 | | -| n | str | TAG(n+1) | | -| …… | str | …… | | -| 4 | str | TAG5 | 上限5条 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------- | ------- | +| 0 | str | TAG1 | | +| n | str | TAG(n+1) | | +| …… | str | …… | | +| 4 | str | TAG5 | 上限5条 | **示例:** 查看用户`mid=53456`的个人TAG ```shell -curl -G 'https://api.bilibili.com/x/space/acc/tags' \ +curl -G 'http://api.bilibili.com/x/space/acc/tags' \ --data-urlencode 'mid=53456' ``` @@ -674,7 +721,7 @@ curl -G 'https://api.bilibili.com/x/space/acc/tags' \ #### 修改个人TAG -> https://api.bilibili.com/x/space/acc/tags/set +> http://api.bilibili.com/x/space/acc/tags/set *请求方式:POST* @@ -684,27 +731,27 @@ curl -G 'https://api.bilibili.com/x/space/acc/tags' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------|------|----------------------|-----|--------------------------------------------------------------------------------| -| tags | strs | 要设置的TAG内容 | 非必要 | 删除公告留空或省去即可
各TAG长度小于10字符
最多5个TAG
各TAG之间用","(%2C)分隔
重复TAG无效 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ------------------------------------------------------------ | +| tags | strs | 要设置的TAG内容 | 非必要 | 删除公告留空或省去即可
各TAG长度小于10字符
最多5个TAG
各TAG之间用","(%2C)分隔
重复TAG无效 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|----------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误(超出长度限制) | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误(超出长度限制) | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | **示例:** 修改个人TAG为`minecraft,技术宅,大佬,小哥哥,可爱` ```shell -curl 'https://api.bilibili.com/x/space/acc/tags/set' \ +curl 'http://api.bilibili.com/x/space/acc/tags/set' \ --data-urlencode 'tags=minecraft,技术宅,大佬,小哥哥,可爱' \ --data-urlencode 'csrf=xxx' \ -b 'SESSDATA=xxx;DedeUserID=1' @@ -727,7 +774,7 @@ curl 'https://api.bilibili.com/x/space/acc/tags/set' \ #### 查看用户空间公告 -> https://api.bilibili.com/x/space/notice +> http://api.bilibili.com/x/space/notice *请求方式:GET* @@ -741,19 +788,19 @@ curl 'https://api.bilibili.com/x/space/acc/tags/set' \ 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|---------------------| -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | str | 公告信息 | 无则为空 | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | str | 公告信息 | 无则为空 | **示例:** 查看用户`mid=53456`的空间公告 ```shell -curl -G 'https://api.bilibili.com/x/space/notice' \ +curl -G 'http://api.bilibili.com/x/space/notice' \ --data-urlencode 'mid=53456' ``` @@ -773,7 +820,7 @@ curl -G 'https://api.bilibili.com/x/space/notice' \ #### 修改空间公告 -> https://api.bilibili.com/x/space/notice/set +> http://api.bilibili.com/x/space/notice/set *请求方式:POST* @@ -781,27 +828,27 @@ curl -G 'https://api.bilibili.com/x/space/notice' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|--------|-----|----------------------|-----|--------------------------| -| notice | str | 要设置的公告内容 | 非必要 | 删除公告留空或省去即可
少于150字符 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | --------------------------------------- | +| notice | str | 要设置的公告内容 | 非必要 | 删除公告留空或省去即可
少于150字符 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|------------------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-304:未修改
-400:请求错误(超出长度限制) | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-304:未修改
-400:请求错误(超出长度限制) | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | 作用尚不明确 | **示例:** 修改个人空间公告为`鸽子` ```shell -curl 'https://api.bilibili.com/x/space/notice/set' \ +curl 'http://api.bilibili.com/x/space/notice/set' \ --data-urlencode 'notice=鸽子' \ --data-urlencode 'csrf=xxx' \ -b 'SESSDATA=xxx' @@ -824,7 +871,7 @@ curl 'https://api.bilibili.com/x/space/notice/set' \ #### 查询空间设置 -> https://space.bilibili.com/ajax/settings/getSettings +> http://space.bilibili.com/ajax/settings/getSettings *请求方式:GET* @@ -832,81 +879,81 @@ curl 'https://api.bilibili.com/x/space/notice/set' \ **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|-----| -| mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|--------|-------------------------|---------------------------|----------------------| -| status | bool | 用户是否存在 | true:存在
false:不存在 | -| data | 用户存在时:obj
用户不存在时:str | 用户存在时:信息本体
用户不存在时:错误信息 | | +| 字段 | 类型 | 内容 | 备注 | +| ------ | ------------------- | -------- | ---- | +| status | bool | 用户是否存在 | true:存在
false:不存在 | +| data | 用户存在时:obj
用户不存在时:str| 用户存在时:信息本体
用户不存在时:错误信息 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|------------------------|-------|------------|--------| -| privacy | obj | 空间隐私权限 | | -| index_order | array | 空间板块布局 | | -| theme | str | default主题? | 作用尚不明确 | -| theme_preview_img_path | str | 主题预览图路径? | 作用尚不明确 | -| toutu | obj | 空间头图 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------------------- | ----- | ---------------- | ------------ | +| privacy | obj | 空间隐私权限 | | +| index_order | array | 空间板块布局 | | +| theme | str | default主题? | 作用尚不明确 | +| theme_preview_img_path | str | 主题预览图路径? | 作用尚不明确 | +| toutu | obj | 空间头图 | | `privacy`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------------|-----|---------|------------------------| -| bangumi | num | 追番及追剧 | 0:隐藏
1:公开
**下同** | -| bbq | num | 轻视频 | | -| channel | num | 频道 | | -| coins_video | num | 最近投币的视频 | | -| comic | num | 追漫 | | -| dress_up | num | 装扮 | | -| fav_video | num | 收藏夹 | | -| groups | num | 圈子? | 作用尚不明确 | -| likes_video | num | 最近点赞的视频 | | -| played_game | num | 最近玩过的游戏 | | -| tags | num | 订阅标签 | | -| user_info | num | 个人资料 | | +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | -------------- | ------------------------------ | +| bangumi | num | 追番及追剧 | 0:隐藏
1:公开
**下同** | +| bbq | num | 轻视频 | | +| channel | num | 频道 | | +| coins_video | num | 最近投币的视频 | | +| comic | num | 追漫 | | +| dress_up | num | 装扮 | | +| fav_video | num | 收藏夹 | | +| groups | num | 圈子? | 作用尚不明确 | +| likes_video | num | 最近点赞的视频 | | +| played_game | num | 最近玩过的游戏 | | +| tags | num | 订阅标签 | | +| user_info | num | 个人资料 | | `index_order`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|---------|--------------------------| -| 0 | obj | 板块1 | 根据板块布局顺序排序
先左侧布局后右侧布局 | -| n | obj | 板块(n+1) | | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------- | -------------------------------------------- | +| 0 | obj | 板块1 | 根据板块布局顺序排序
先左侧布局后右侧布局 | +| n | obj | 板块(n+1) | | +| …… | obj | …… | …… | `index_order`数组内对象: -| 字段 | 类型 | 内容 | 备注 | -|------|-----|------|-----| -| id | num | 板块编号 | | -| name | str | 板块名称 | | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | -------- | ---- | +| id | num | 板块编号 | | +| name | str | 板块名称 | | `toutu`对象: -| 字段 | 类型 | 内容 | 备注 | -|---------------|-----|------------|-----------------------------------| -| sid | num | 空间头图ID | | -| expire | num | 到期时间? | 时间戳?
作用尚不明确 | -| s_img | str | 空间头图小图相对路径 | 完整url为`https://i0.hdslb.com/`+相对路径 | -| l_img | str | 空间头图相对路径 | **同上** | -| android_img | str | 空 | 注:**手机端头图与web端不同,需要用另一个api获取** | -| iphone_img | str | 空 | | -| ipad_img | str | 空 | | -| thumbnail_img | str | 缩略图 | | -| platform | num | 0 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ------------- | ---- | -------------------- | -------------------------------------------------- | +| sid | num | 空间头图ID | | +| expire | num | 到期时间? | 时间戳?
作用尚不明确 | +| s_img | str | 空间头图小图相对路径 | 完整url为`http://i0.hdslb.com/`+相对路径 | +| l_img | str | 空间头图相对路径 | **同上** | +| android_img | str | 空 | 注:**手机端头图与web端不同,需要用另一个api获取** | +| iphone_img | str | 空 | | +| ipad_img | str | 空 | | +| thumbnail_img | str | 缩略图 | | +| platform | num | 0 | 作用尚不明确 | **示例:** 查看`mid=2`的空间设置 ```shell -curl -G 'https://space.bilibili.com/ajax/settings/getSettings' \ +curl -G 'http://space.bilibili.com/ajax/settings/getSettings' \ --data-urlencode 'mid=2' ``` @@ -1010,7 +1057,7 @@ curl -G 'https://space.bilibili.com/ajax/settings/getSettings' \ #### 调整空间板块布局 -> https://space.bilibili.com/ajax/settings/setIndexOrder +> http://space.bilibili.com/ajax/settings/setIndexOrder *请求方式:POST* @@ -1020,38 +1067,38 @@ curl -G 'https://space.bilibili.com/ajax/settings/getSettings' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-------------|------|----------------------|-----|-----------------------------------------------| -| index_order | nums | 布局列表 | 必要 | 每个值之间用","(%2C)分隔
先左侧布局再右侧布局
值的意义见下表 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ----------- | ---- | ------------------------ | ------ | ------------------------------------------------------------ | +| index_order | nums | 布局列表 | 必要 | 每个值之间用","(%2C)分隔
先左侧布局再右侧布局
值的意义见下表 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | 布局参数`index_order`: -| 值 | 含义 | -|-----|----------------------| -| 1 | (左侧)我的稿件 | -| 2 | (左侧)我的收藏夹 | -| 3 | (左侧)订阅番剧 | -| 4 | (左侧)订阅标签 | -| 5 | (左侧)最近投币的视频 | -| 6 | (左侧)我的圈子**(此板块被隐藏)** | -| 7 | (左侧)我的频道 | -| 8 | (左侧)我的专栏 | -| 9 | (左侧)我的相簿 | -| 21 | (右侧)公告 | -| 22 | (右侧)直播间 | -| 23 | (右侧)个人资料 | -| 24 | (右侧)官方活动 | -| 25 | (右侧)最近玩的游戏 | +| 值 | 含义 | +| ---- | ------------------------------------ | +| 1 | (左侧)我的稿件 | +| 2 | (左侧)我的收藏夹 | +| 3 | (左侧)订阅番剧 | +| 4 | (左侧)订阅标签 | +| 5 | (左侧)最近投币的视频 | +| 6 | (左侧)我的圈子**(此板块被隐藏)** | +| 7 | (左侧)我的频道 | +| 8 | (左侧)我的专栏 | +| 9 | (左侧)我的相簿 | +| 21 | (右侧)公告 | +| 22 | (右侧)直播间 | +| 23 | (右侧)个人资料 | +| 24 | (右侧)官方活动 | +| 25 | (右侧)最近玩的游戏 | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|--------|------|------|---------------------------| +| 字段 | 类型 | 内容 | 备注 | +| ------ | ---- | -------- | ----------------------------------- | | ststus | bool | 操作结果 | true:操作成功
false:操作失败 | -| data | str | 错误信息 | 正确时无此项 | +| data | str | 错误信息 | 正确时无此项 | **示例:** @@ -1067,7 +1114,7 @@ curl -G 'https://space.bilibili.com/ajax/settings/getSettings' \ >我的频道 ```shell -curl 'https://space.bilibili.com/ajax/settings/setIndexOrder' \ +curl 'http://space.bilibili.com/ajax/settings/setIndexOrder' \ --data-urlencode 'index_order=1,8,3,2,9,5,4,7,22,23,21,24,25,6' \ --data-urlencode 'csrf=xxx' \ -b 'SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;' \ @@ -1087,7 +1134,7 @@ curl 'https://space.bilibili.com/ajax/settings/setIndexOrder' \ #### 修改空间隐私权限 -> https://space.bilibili.com/ajax/settings/setPrivacy +> http://space.bilibili.com/ajax/settings/setPrivacy *请求方式:POST* @@ -1097,31 +1144,31 @@ curl 'https://space.bilibili.com/ajax/settings/setIndexOrder' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-------------|------|----------------------|-----|----------------------------| +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ----------- | ---- | ------------------------ | ------ | ---------------------------------- | | fav_video | num | 收藏视频 | 非必要 | 0:隐藏
1:公开
**下同** | -| bangumi | num | 追番及追剧 | 非必要 | | -| tags | num | 关注的TAG | 非必要 | | -| coins_video | num | 投币的视频 | 非必要 | | -| user_info | num | 个人信息 | 非必要 | | -| played_game | num | 玩过的游戏 | 非必要 | | -| csrf | nstr | CSRF Token(位于cookie) | 必要 | | +| bangumi | num | 追番及追剧 | 非必要 | | +| tags | num | 关注的TAG | 非必要 | | +| coins_video | num | 投币的视频 | 非必要 | | +| user_info | num | 个人信息 | 非必要 | | +| played_game | num | 玩过的游戏 | 非必要 | | +| csrf | nstr | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|--------|------|------|---------------------------| +| 字段 | 类型 | 内容 | 备注 | +| ------ | ---- | -------- | ----------------------------------- | | ststus | bool | 操作结果 | true:操作成功
false:操作失败 | -| data | str | 错误信息 | 正确时无此项 | +| data | str | 错误信息 | 正确时无此项 | **示例:** 设置`关注的TAG`为隐藏 ```shell -curl 'https://space.bilibili.com/ajax/settings/setPrivacy' \ +curl 'http://space.bilibili.com/ajax/settings/setPrivacy' \ --data-urlencode 'tags=0' \ --data-urlencode 'csrf=xxx' \ -b 'SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;' \ @@ -1141,49 +1188,49 @@ curl 'https://space.bilibili.com/ajax/settings/setPrivacy' \ ### 查询用户最近玩过的游戏 -> https://api.bilibili.com/x/space/lastplaygame +> http://api.bilibili.com/x/space/lastplaygame *请求方式:GET* **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|-----| -| mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-------------------------|------|------------------------------------------| -| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | 隐藏时:null
公开时:array | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ------------------------------- | -------- | ---------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | 隐藏时:null
公开时:array | 信息本体 | | `data`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|---------|----------| -| 0 | obj | 游戏1 | | -| n | obj | 游戏(n+1) | 项数为总计游戏数 | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------- | ---------------- | +| 0 | obj | 游戏1 | | +| n | obj | 游戏(n+1) | 项数为总计游戏数 | +| …… | obj | …… | …… | `data`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|-----------|-----| -| website | str | 游戏主页链接url | | -| image | str | 游戏图片url | | -| name | str | 游戏名 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | --------------- | ---- | +| website | str | 游戏主页链接url | | +| image | str | 游戏图片url | | +| name | str | 游戏名 | | **示例:** 查询`mid=2`的最近玩过的游戏 ```shell -curl -G 'https://api.bilibili.com/x/space/lastplaygame' \ +curl -G 'http://api.bilibili.com/x/space/lastplaygame' \ --data-urlencode 'mid=2' ``` @@ -1229,13 +1276,13 @@ curl -G 'https://api.bilibili.com/x/space/lastplaygame' \ ### 获取用户最近投币的视频明细 -> https://api.bilibili.com/x/space/coin/video +> http://api.bilibili.com/x/space/coin/video *请求方式:GET* 认证方式:Cookie(SESSDATA) -如设置隐私查看自己的需要认证 仅包含最近投币的20个视频,如超过指定时间未投币(也许一个月),列表将为空 +如设置隐私查看自己的需要认证 **url参数:** @@ -1247,20 +1294,20 @@ curl -G 'https://api.bilibili.com/x/space/lastplaygame' \ 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-------------------------|------|------------------------------------------| -| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | 隐藏时:null
公开时:array | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ------------------------------- | -------- | ---------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | 隐藏时:null
公开时:array | 信息本体 | | `data`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|-----------|-----| -| 0 | obj | 投币视频1 | | -| n | obj | 投币视频(n+1) | | -| …… | obj | …… | | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | ---- | +| 0 | obj | 投币视频1 | | +| n | obj | 投币视频(n+1) | | +| …… | obj | …… | | `data`数组中的对象: @@ -1271,7 +1318,9 @@ curl -G 'https://api.bilibili.com/x/space/lastplaygame' \ 查看用户`mid=15858903`的最近投币视频 ```shell -curl -L -X GET 'https://api.bilibili.com/x/space/coin/video?vmid=15858903' +curl -G 'http://space.bilibili.com/x/space/coin/video' \ +--data-urlencode 'vmid=15858903' \ +-b 'SESSDATA=xxx' ```
@@ -1279,1338 +1328,190 @@ curl -L -X GET 'https://api.bilibili.com/x/space/coin/video?vmid=15858903' ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": [ - { - "aid": 259434557, - "videos": 1, - "tid": 218, - "tname": "喵星人", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/47d46ad72bf1898ebbfe7d82a9d972d4b53e61fc.jpg", - "title": "42度在家造溜冰场降温,猫上去直呼脚滑!", - "pubdate": 1660361400, - "ctime": 1660361407, - "desc": "刚开始真的觉得很难,不可能,学会理论知识后觉得,就这?太简单了,所以随便做做是成立的。就是学费有点贵,1w多……,我现在空调随便修!希望日后修空调能把这钱在挣回来!(溜冰场上期指路:BV1ga411f79y)\n萌宠区手工up主往期发明指路: \n猫力跑步发电机:BV1iy4y1a7Cb \n电动撸毛器:BV1H64y1v7gq\n戒烟头盔:BV1H64y1k7tz \n猫热能暖床器:BV1xF411i7tw \n全透明赏猫床:BV1Qb4y1C7sn \n写不完啦 还有很多,就要靠各位慢慢挖掘啦!", - "state": 0, - "duration": 501, - "mission_id": 859937, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 20951119, - "name": "蒂姆嘟嘟Tim", - "face": "http://i1.hdslb.com/bfs/face/9860c4c559fd2517b1fa92e592d3d71b95bb3ec2.jpg" - }, - "stat": { - "aid": 259434557, - "view": 1403311, - "danmaku": 5762, - "reply": 1295, - "favorite": 26633, - "coin": 100847, - "share": 4502, - "now_rank": 0, - "his_rank": 64, - "like": 130944, - "dislike": 0 - }, - "dynamic": "猫确实会两条腿滑冰!猫和老鼠诚不欺我", - "cid": 800970167, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "season_id": 3702, - "short_link_v2": "https://b23.tv/BV1wa411Z77n", - "first_frame": "http://i0.hdslb.com/bfs/storyff/n220812a228chhkmeci9f0hizo6ivhzv_firsti.jpg", - "pub_location": "上海", - "bvid": "BV1wa411Z77n", - "coins": 2, - "time": 1662182649, - "ip": "", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - } - ] -} -``` - -
- -### 获取用户最近点赞的视频明细 - -> https://api.bilibili.com/x/space/like/video - -*请求方式:GET* - -认证方式:Cookie(SESSDATA) - -如设置隐私查看自己的需要认证 仅包含最近点赞的20个视频,也可能为空 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------|-----|---------|-----|-----| -| vmid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -|---------|-------------------------|------|------------------------------------------| -| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | 隐藏时:null
公开时:array | 信息本体 | | - -`data`数组: - -| 项 | 类型 | 内容 | 备注 | -|-----|-----|-----------|-----| -| 0 | obj | 点赞视频1 | | -| n | obj | 点赞视频(n+1) | | -| …… | obj | …… | | - -`data`数组中的对象: - -基本同[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的data对象 - -**示例:** - -查看用户`mid=15858903`的最近投币视频 - -```shell -curl -L -X GET 'https://api.bilibili.com/x/space/like/video?vmid=15858903' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "list": [ - { - "aid": 53516907, - "videos": 1, - "tid": 26, - "tname": "音MAD", - "copyright": 1, - "pic": "http://i1.hdslb.com/bfs/archive/3653400bb9a5996c9f0702d20fc431210dca0c5e.jpg", - "title": "喵内我回来了Brain Power", - "pubdate": 1558756227, - "ctime": 1558756227, - "desc": "在准备一个合作,所以一直没更新,O-oooooooooo AAAAE-A-A-I-A-U- JO-oooooooooooo AAE-O-A-A-U-U-A- E-eee-ee-eee AAAAE-A-E-I-E-A- JO-ooo-oo-oo-oo EEEEO-A-AAA-AAAA", - "state": 0, - "duration": 48, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 12466098, - "name": "不知道4576", - "face": "http://i0.hdslb.com/bfs/face/1361b4a2e686e9efa89fc0f1024985d0c44345c6.jpg" - }, - "stat": { - "aid": 53516907, - "view": 125484, - "danmaku": 258, - "reply": 441, - "favorite": 4268, - "coin": 3132, - "share": 859, - "now_rank": 0, - "his_rank": 0, - "like": 5767, - "dislike": 0 - }, - "dynamic": "#BRAIN POWER##音MAD##天使降临到我身边#", - "cid": 93639076, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1V4411s7Qr", - "bvid": "BV1V4411s7Qr", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 557851916, - "videos": 1, - "tid": 122, - "tname": "野生技能协会", - "copyright": 2, - "pic": "http://i1.hdslb.com/bfs/archive/fea0d9efa7e2dc8cd9960bd466f78b2ed84d907d.jpg", - "title": "请问:「宁可在屎山上不断堆代码,也不愿意优化项目需求」❓", - "pubdate": 1662441923, - "ctime": 1662441923, - "desc": "https://fishc.com.cn/thread-217312-1-1.html\n⬆️关于产品迭代的3个关键⬆️", - "state": 0, - "duration": 312, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 0, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 314076440, - "name": "鱼C-小甲鱼", - "face": "http://i2.hdslb.com/bfs/face/4543ce186f9b74e60a85e66c010187bd3be3d0e1.jpg" - }, - "stat": { - "aid": 557851916, - "view": 89834, - "danmaku": 245, - "reply": 164, - "favorite": 490, - "coin": 265, - "share": 570, - "now_rank": 0, - "his_rank": 0, - "like": 1601, - "dislike": 0 - }, - "dynamic": "【遇山开路 逢水搭桥】超完美产品是如何「迭代」出来的❓", - "cid": 825277912, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "season_id": 4830, - "short_link_v2": "https://b23.tv/BV1pe4y1C7XD", - "up_from_v2": 20, - "first_frame": "http://i0.hdslb.com/bfs/storyff/n220906qn22r4a6hff6vie1bodoftvgi_firsti.jpg", - "pub_location": "广东", - "bvid": "BV1pe4y1C7XD", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 730007618, - "videos": 1, - "tid": 27, - "tname": "综合", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/1f65fd131db7eb81fd270e6ccb7257b68dfd60c4.jpg", - "title": "细!《猫和老鼠》中的小穿帮竟然有这么多!画师偷懒?", - "pubdate": 1661862565, - "ctime": 1661862565, - "desc": "BGM:超级马里奥世界\n 匈牙利狂想曲-李斯特\n Used to-James Carter", - "state": 0, - "duration": 338, - "mission_id": 779615, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 38968617, - "name": "大福咕咕", - "face": "http://i0.hdslb.com/bfs/face/e4a00d5409f1888c10e7382bf15df0fbd9f78ae8.jpg" - }, - "stat": { - "aid": 730007618, - "view": 8052558, - "danmaku": 6994, - "reply": 1905, - "favorite": 181436, - "coin": 113827, - "share": 5447, - "now_rank": 0, - "his_rank": 2, - "like": 698492, - "dislike": 0 - }, - "dynamic": "考虑到广大朋友们要开学了 直接提前更新!", - "cid": 819285197, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "season_id": 371093, - "short_link_v2": "https://b23.tv/BV1kD4y1672t", - "first_frame": "http://i2.hdslb.com/bfs/storyff/n220830a238owa0pg6docs2wak8t6tg2_firsti.jpg", - "pub_location": "北京", - "bvid": "BV1kD4y1672t", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 886537437, - "videos": 2, - "tid": 22, - "tname": "鬼畜调教", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/db9314a8b2730ee95cb9cac7fc5054c770ea9c9f.jpg", - "title": "电棍:向♿奔去(修复版)", - "pubdate": 1612420280, - "ctime": 1612420280, - "desc": "原作@_Karasu_ \n拙劣的模仿 歌词有修改", - "state": 0, - "duration": 448, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 12771348, - "name": "DJRicher", - "face": "http://i0.hdslb.com/bfs/face/4a033640048238cb039add4e064804e227e87082.jpg" - }, - "stat": { - "aid": 886537437, - "view": 8790816, - "danmaku": 11516, - "reply": 50330, - "favorite": 106746, - "coin": 157098, - "share": 66553, - "now_rank": 0, - "his_rank": 0, - "like": 155180, - "dislike": 0 - }, - "dynamic": "", - "cid": 312766707, - "dimension": { - "width": 1280, - "height": 720, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1vK4y1p7F5", - "bvid": "BV1vK4y1p7F5", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 514421957, - "videos": 1, - "tid": 21, - "tname": "日常", - "copyright": 2, - "pic": "http://i2.hdslb.com/bfs/archive/8570e2264c585ec47fa2f90f0fb41fcbe24082c1.jpg", - "title": "女子“巨乳症” 至Q杯,医生切除26斤赘乳", - "pubdate": 1660436958, - "ctime": 1660436958, - "desc": "网络", - "state": 0, - "duration": 157, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 0, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 153362257, - "name": "微胖委员会", - "face": "http://i1.hdslb.com/bfs/face/7bce12b8b5fef2f31d215dec94fc5fc18cdd41a2.jpg" - }, - "stat": { - "aid": 514421957, - "view": 1863705, - "danmaku": 1357, - "reply": 2953, - "favorite": 3091, - "coin": 95, - "share": 25867, - "now_rank": 0, - "his_rank": 0, - "like": 16315, - "dislike": 0 - }, - "dynamic": "", - "cid": 802910768, - "dimension": { - "width": 1280, - "height": 720, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1xg411k7L1", - "up_from_v2": 8, - "first_frame": "http://i1.hdslb.com/bfs/storyff/n220814qn1cm2zo6jetqmu2nvlcxssy1_firsti.jpg", - "pub_location": "江苏", - "bvid": "BV1xg411k7L1", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 259434557, - "videos": 1, - "tid": 218, - "tname": "喵星人", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/47d46ad72bf1898ebbfe7d82a9d972d4b53e61fc.jpg", - "title": "42度在家造溜冰场降温,猫上去直呼脚滑!", - "pubdate": 1660361400, - "ctime": 1660361407, - "desc": "刚开始真的觉得很难,不可能,学会理论知识后觉得,就这?太简单了,所以随便做做是成立的。就是学费有点贵,1w多……,我现在空调随便修!希望日后修空调能把这钱在挣回来!(溜冰场上期指路:BV1ga411f79y)\n萌宠区手工up主往期发明指路: \n猫力跑步发电机:BV1iy4y1a7Cb \n电动撸毛器:BV1H64y1v7gq\n戒烟头盔:BV1H64y1k7tz \n猫热能暖床器:BV1xF411i7tw \n全透明赏猫床:BV1Qb4y1C7sn \n写不完啦 还有很多,就要靠各位慢慢挖掘啦!", - "state": 0, - "duration": 501, - "mission_id": 859937, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 20951119, - "name": "蒂姆嘟嘟Tim", - "face": "http://i1.hdslb.com/bfs/face/9860c4c559fd2517b1fa92e592d3d71b95bb3ec2.jpg" - }, - "stat": { - "aid": 259434557, - "view": 1403315, - "danmaku": 5762, - "reply": 1295, - "favorite": 26633, - "coin": 100847, - "share": 4502, - "now_rank": 0, - "his_rank": 64, - "like": 130944, - "dislike": 0 - }, - "dynamic": "猫确实会两条腿滑冰!猫和老鼠诚不欺我", - "cid": 800970167, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "season_id": 3702, - "short_link_v2": "https://b23.tv/BV1wa411Z77n", - "first_frame": "http://i0.hdslb.com/bfs/storyff/n220812a228chhkmeci9f0hizo6ivhzv_firsti.jpg", - "pub_location": "上海", - "bvid": "BV1wa411Z77n", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 765765040, - "videos": 1, - "tid": 26, - "tname": "音MAD", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/f92297d237bc330e4c70bd7cb4b6a5988a4a35df.jpg", - "title": "向 先 辈 奔 去", - "pubdate": 1642843003, - "ctime": 1642843003, - "desc": "远野说大家听不出他的和声所以不愿意来了(迫真)\nBGM:夜に駆ける\nPV:BV1Ph411C7S5\n封面:@十人比白 \n其他作品:\n病 名 为 臭 BV1W3411Y7R3\nHomo KING BV1p3411Y7Qf\n先 辈 の 名 は BV1bF411p7W7\n野兽先辈的消失 BV1XL4y147KK", - "state": 0, - "duration": 119, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 26540403, - "name": "小王子擎天", - "face": "http://i0.hdslb.com/bfs/face/70723d05c4fcd3af47ac7e453bee06feea48b804.jpg" - }, - "stat": { - "aid": 765765040, - "view": 125123, - "danmaku": 168, - "reply": 384, - "favorite": 3518, - "coin": 878, - "share": 858, - "now_rank": 0, - "his_rank": 0, - "like": 6224, - "dislike": 0 - }, - "dynamic": "", - "cid": 490015078, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "season_id": 185827, - "short_link_v2": "https://b23.tv/BV19r4y1Y7De", - "first_frame": "http://i1.hdslb.com/bfs/storyff/n220122a26mtv7cs4x1ga3329ew4cqhb_firsti.jpg", - "bvid": "BV19r4y1Y7De", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 599348400, - "videos": 1, - "tid": 218, - "tname": "喵星人", - "copyright": 1, - "pic": "http://i1.hdslb.com/bfs/archive/6c0b56f7b2a378e32c40c2ec7cf4a34cf6e42ad2.jpg", - "title": "打开前请先降低音量哦!!", - "pubdate": 1660007700, - "ctime": 1660007701, - "desc": "日常投食小猫咪\n视频里的是两个窝次的15只崽崽\n5月30日和6月1日出生\nliliya和Tessa的宝宝", - "state": 0, - "duration": 203, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 43099315, - "name": "颖姥姥的小猪喵", - "face": "http://i1.hdslb.com/bfs/face/6261098e074624891f5f1cdf35b4df64401c4307.jpg" - }, - "stat": { - "aid": 599348400, - "view": 5611104, - "danmaku": 14300, - "reply": 8180, - "favorite": 122270, - "coin": 45195, - "share": 126333, - "now_rank": 0, - "his_rank": 5, - "like": 536114, - "dislike": 0 - }, - "dynamic": "日常投食小猫咪\n视频里的是两个窝次的15只崽崽\n5月30日和6月1日出生\nliliya和Tessa的宝宝", - "cid": 797762429, - "dimension": { - "width": 1080, - "height": 1920, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1cB4y167B8", - "up_from_v2": 9, - "first_frame": "http://i1.hdslb.com/bfs/storyff/n220809a2ku7vu7oisum1632zs07p7dg_firsti.jpg", - "pub_location": "山东", - "bvid": "BV1cB4y167B8", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 472194944, - "videos": 1, - "tid": 162, - "tname": "绘画", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/aee4307632ecad127f60ae556cc5981f1a329c15.jpg", - "title": "有些画,不需要太清晰", - "pubdate": 1660817303, - "ctime": 1660817303, - "desc": "先画个狗头保命", - "state": 0, - "duration": 147, - "mission_id": 761022, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 28330240, - "name": "叶无趣", - "face": "http://i1.hdslb.com/bfs/face/9416d6dd723d271bdd805ccf2e44dc47436c5a07.jpg" - }, - "stat": { - "aid": 472194944, - "view": 2378719, - "danmaku": 6517, - "reply": 2815, - "favorite": 33778, - "coin": 24411, - "share": 11461, - "now_rank": 0, - "his_rank": 0, - "like": 209110, - "dislike": 0 - }, - "dynamic": "", - "cid": 807922809, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1DT411c7AD", - "first_frame": "http://i1.hdslb.com/bfs/storyff/n220819a213lvuk7uqfgh91m9lv1esx1_firsti.jpg", - "pub_location": "湖南", - "bvid": "BV1DT411c7AD", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 599779624, - "videos": 1, - "tid": 173, - "tname": "桌游棋牌", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/70800347ccbd019b678b41318c203b8fecb9aaec.jpg", - "title": "【雀魂汪汪录】第196期 谁能给我翻译翻译 什么叫做惊喜", - "pubdate": 1661394900, - "ctime": 1661252218, - "desc": "BGM可以通过网易云搜索【雀魂汪汪录BGM】就可以找到啦!\n雀魂汪汪录 周四中午见\n微博 @雀魂麻将majsoul\n——————————————————————————\n想要投稿的玩家~务必请通过邮箱来进行投稿~【请不要在评论区或是私信投稿,谢谢】\n邮箱地址:tg@catfoodstudio.com\n投稿最少需要注明【局目、内容、牌谱链接】哦!", - "state": 0, - "duration": 575, - "mission_id": 808212, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 353240497, - "name": "雀魂麻将majsoul", - "face": "http://i1.hdslb.com/bfs/face/053f02d2a7eb96884b1020ca20d6d02241df6099.jpg" - }, - "stat": { - "aid": 599779624, - "view": 187150, - "danmaku": 1958, - "reply": 516, - "favorite": 342, - "coin": 787, - "share": 646, - "now_rank": 0, - "his_rank": 0, - "like": 7429, - "dislike": 0 - }, - "dynamic": "#雀魂# #雀魂汪汪录# #立直麻将#", - "cid": 812183140, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "season_id": 2739, - "short_link_v2": "https://b23.tv/BV1aB4y1z74J", - "first_frame": "http://i0.hdslb.com/bfs/storyff/n220823qn266np8ftodq2t2m2paam9xj_firsti.jpg", - "pub_location": "上海", - "bvid": "BV1aB4y1z74J", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 685619632, - "videos": 1, - "tid": 17, - "tname": "单机游戏", - "copyright": 1, - "pic": "http://i1.hdslb.com/bfs/archive/750b5fabea1ff363d775ba58f95a23b5cb890be9.jpg", - "title": "多人群峦传说联机3:用木炭炉做出铜溶液,浇筑出铜镐和探矿镐!", - "pubdate": 1656756676, - "ctime": 1656756677, - "desc": "-", - "state": 0, - "duration": 268, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 1771879421, - "name": "方块局安神", - "face": "http://i2.hdslb.com/bfs/face/c3781165f41f2b4d99e7beb1356105f624cc424e.jpg" - }, - "stat": { - "aid": 685619632, - "view": 215, - "danmaku": 0, - "reply": 2, - "favorite": 1, - "coin": 0, - "share": 0, - "now_rank": 0, - "his_rank": 0, - "like": 8, - "dislike": 0 - }, - "dynamic": "", - "cid": 761921385, - "dimension": { - "width": 1920, - "height": 864, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1MU4y1D7ND", - "up_from_v2": 35, - "first_frame": "http://i1.hdslb.com/bfs/storyff/n220702qndfrow9p4eq991lyl8em2v9w_firsti.jpg", - "pub_location": "宁夏", - "bvid": "BV1MU4y1D7ND", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 427974127, - "videos": 1, - "tid": 17, - "tname": "单机游戏", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/1f81be8fd2eec800e3134f24928b66b75c25a078.jpg", - "title": "多人群峦传说联机1:开局做出篝火和木炭窑!很快的进入陶器时代!", - "pubdate": 1656660681, - "ctime": 1656660682, - "desc": "-", - "state": 0, - "duration": 313, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 1771879421, - "name": "方块局安神", - "face": "http://i2.hdslb.com/bfs/face/c3781165f41f2b4d99e7beb1356105f624cc424e.jpg" - }, - "stat": { - "aid": 427974127, - "view": 186, - "danmaku": 0, - "reply": 7, - "favorite": 1, - "coin": 2, - "share": 0, - "now_rank": 0, - "his_rank": 0, - "like": 7, - "dislike": 0 - }, - "dynamic": "", - "cid": 760818007, - "dimension": { - "width": 1920, - "height": 864, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1MG411x7Jh", - "up_from_v2": 35, - "first_frame": "http://i0.hdslb.com/bfs/storyff/n220701qn3ejknxipb82r1a0hut5chj5_firsti.jpg", - "pub_location": "宁夏", - "bvid": "BV1MG411x7Jh", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 602112213, - "videos": 1, - "tid": 22, - "tname": "鬼畜调教", - "copyright": 1, - "pic": "http://i1.hdslb.com/bfs/archive/5edabb39c8ac3a3202111e8e60f8e45b8b3c180d.jpg", - "title": "你被百度骗了,呵呵", - "pubdate": 1660561467, - "ctime": 1660561467, - "desc": "分区和参与活动真的合理吗()\n很草的点子\n烂活", - "state": 0, - "duration": 62, - "mission_id": 738105, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 361685930, - "name": "啰嗦_Losso", - "face": "http://i2.hdslb.com/bfs/face/e26253ff660c19fdb953825aef990c30ad08c8dc.jpg" - }, - "stat": { - "aid": 602112213, - "view": 58957, - "danmaku": 112, - "reply": 231, - "favorite": 1401, - "coin": 514, - "share": 117, - "now_rank": 0, - "his_rank": 0, - "like": 9353, - "dislike": 0 - }, - "dynamic": "", - "cid": 804462941, - "dimension": { - "width": 828, - "height": 1792, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1yB4y1L7iG", - "first_frame": "http://i1.hdslb.com/bfs/storyff/n220815qn31gxoi0spl1yr35uq27n3u4_firsti.jpg", - "pub_location": "美国", - "bvid": "BV1yB4y1L7iG", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 856393020, - "videos": 1, - "tid": 238, - "tname": "运动综合", - "copyright": 1, - "pic": "http://i1.hdslb.com/bfs/archive/d7edbba4eb63bb9ceed978ae46e676cb3fdbaf6a.jpg", - "title": "极限难度!不碰其他球把45颗球打入洞中!海外知名桌球博主来B站啦!", - "pubdate": 1659105213, - "ctime": 1659105213, - "desc": "", - "state": 0, - "duration": 756, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 1954176521, - "name": "桌球小哥genipool官方", - "face": "http://i2.hdslb.com/bfs/face/90ca22fa8c79d0d5042c7c24daf1ec574679a740.jpg" - }, - "stat": { - "aid": 856393020, - "view": 342876, - "danmaku": 365, - "reply": 159, - "favorite": 809, - "coin": 800, - "share": 283, - "now_rank": 0, - "his_rank": 0, - "like": 4266, - "dislike": 0 - }, - "dynamic": "", - "cid": 788065599, - "dimension": { - "width": 1280, - "height": 720, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV18V4y1E7zo", - "first_frame": "http://i0.hdslb.com/bfs/storyff/n220729qn15m1fxzexlmvq1j541qvx6r_firsti.jpg", - "pub_location": "福建", - "bvid": "BV18V4y1E7zo", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 728238452, - "videos": 1, - "tid": 232, - "tname": "科工机械", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/6613ccabbf0828d0071efbb2351818c3cab62725.jpg", - "title": "烧脑故障,家庭漏电维修图解", - "pubdate": 1657075740, - "ctime": 1657075740, - "desc": "-", - "state": 0, - "duration": 433, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 1985127693, - "name": "城阳电工电路", - "face": "http://i0.hdslb.com/bfs/face/faae5daababbf652d97faedab1a25d78b654fc44.jpg" - }, - "stat": { - "aid": 728238452, - "view": 138664, - "danmaku": 277, - "reply": 263, - "favorite": 681, - "coin": 601, - "share": 85, - "now_rank": 0, - "his_rank": 0, - "like": 9567, - "dislike": 0 - }, - "dynamic": "", - "cid": 765013281, - "dimension": { - "width": 1080, - "height": 1920, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV12S4y1E7rt", - "up_from_v2": 8, - "first_frame": "http://i2.hdslb.com/bfs/storyff/n220706qn257g5ymn00jrq1tbc2y0k4s_firsti.jpg", - "pub_location": "山东", - "bvid": "BV12S4y1E7rt", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 556671285, - "videos": 1, - "tid": 173, - "tname": "桌游棋牌", - "copyright": 1, - "pic": "http://i1.hdslb.com/bfs/archive/02aa212793ebfdc5bd2b243109961d01ef74015f.jpg", - "title": "【整活向】麻将新手不常见错误示范——偷换牌山", - "pubdate": 1659761706, - "ctime": 1659761706, - "desc": "大家千万不要学习@肉目 的反面教材噢\n不然胡萝卜很快就被切光了", - "state": 0, - "duration": 61, - "mission_id": 808212, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 5256791, - "name": "凤鸣麻雀社", - "face": "http://i2.hdslb.com/bfs/face/79c578d5a00dc25498913187f1e2e7b63463b027.jpg" - }, - "stat": { - "aid": 556671285, - "view": 28016, - "danmaku": 17, - "reply": 62, - "favorite": 25, - "coin": 34, - "share": 22, - "now_rank": 0, - "his_rank": 0, - "like": 845, - "dislike": 0 - }, - "dynamic": "健康麻将 保护胡萝卜 从@肉目 做起\n玩儿花的手法是越来越熟练了 危险危险", - "cid": 795200966, - "dimension": { - "width": 1080, - "height": 1440, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV12e4y1D7mp", - "up_from_v2": 8, - "first_frame": "http://i0.hdslb.com/bfs/storyff/n220806a21h7h5icb0b5fv1v71d6cwu7_firsti.jpg", - "pub_location": "广东", - "bvid": "BV12e4y1D7mp", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 471592118, - "videos": 1, - "tid": 59, - "tname": "演奏", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/3f1fcd0461235f8881a86faaa1321744b251b26f.jpg", - "title": "有仪式感的植物大战僵尸", - "pubdate": 1659409876, - "ctime": 1659409876, - "desc": "-", - "state": 0, - "duration": 150, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 523219895, - "name": "上官画画", - "face": "http://i2.hdslb.com/bfs/face/a69355ca44c5343e202e1e1294245ba588e92e96.jpg" - }, - "stat": { - "aid": 471592118, - "view": 314596, - "danmaku": 302, - "reply": 630, - "favorite": 2532, - "coin": 2648, - "share": 1294, - "now_rank": 0, - "his_rank": 0, - "like": 20552, - "dislike": 0 - }, - "dynamic": "", - "cid": 791291889, - "dimension": { - "width": 960, - "height": 540, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1WT41177PD", - "up_from_v2": 36, - "first_frame": "http://i2.hdslb.com/bfs/storyff/n220802qn3bbryqe32dploiilb7xtqft_firsti.jpg", - "pub_location": "浙江", - "bvid": "BV1WT41177PD", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 599162361, - "videos": 1, - "tid": 238, - "tname": "运动综合", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/bc086df16873a9bc619d625bc176359220062d79.jpg", - "title": "张镇辉台球正经教学【6个不太建议使用的技巧】15.0版本", - "pubdate": 1659690000, - "ctime": 1659690022, - "desc": "靓仔,用一句话证明你是老粉!!\n \n \n \n长按点赞,有彩蛋哟~", - "state": 0, - "duration": 119, - "mission_id": 846900, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 88895225, - "name": "张镇辉台球教学", - "face": "http://i2.hdslb.com/bfs/face/2af69641c86d3915440b28ef64214e112390c15c.jpg" - }, - "stat": { - "aid": 599162361, - "view": 2275313, - "danmaku": 23143, - "reply": 2608, - "favorite": 22825, - "coin": 15344, - "share": 3584, - "now_rank": 0, - "his_rank": 73, - "like": 243787, - "dislike": 0 - }, - "dynamic": "", - "cid": 794017093, - "dimension": { - "width": 2160, - "height": 3840, - "rotate": 0 - }, - "season_id": 39377, - "short_link_v2": "https://b23.tv/BV1CB4y1r7d5", - "first_frame": "http://i2.hdslb.com/bfs/storyff/n220805qn1xjr322hy7j1tc0t7ntj0r3_firsti.jpg", - "pub_location": "广东", - "bvid": "BV1CB4y1r7d5", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - }, - { - "aid": 729057411, - "videos": 1, - "tid": 59, - "tname": "演奏", - "copyright": 1, - "pic": "http://i1.hdslb.com/bfs/archive/365e41383e10a774d54b908c018e66a0f90bcc65.jpg", - "title": "今天练练脚下钢琴", - "pubdate": 1659322244, - "ctime": 1659322244, - "desc": "-", - "state": 0, - "duration": 16, - "mission_id": 741439, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0, - "arc_pay": 0, - "pay_free_watch": 0 - }, - "owner": { - "mid": 397865300, - "name": "Rhythm梦龙", - "face": "http://i2.hdslb.com/bfs/face/297f26c89a43d60619e552d5606e575d2a8406aa.jpg" - }, - "stat": { - "aid": 729057411, - "view": 17740, - "danmaku": 8, - "reply": 27, - "favorite": 74, - "coin": 37, - "share": 20, - "now_rank": 0, - "his_rank": 0, - "like": 1878, - "dislike": 0 - }, - "dynamic": "", - "cid": 790320365, - "dimension": { - "width": 1080, - "height": 1920, - "rotate": 0 - }, - "short_link_v2": "https://b23.tv/BV1zS4y1x7ZM", - "up_from_v2": 9, - "first_frame": "http://i1.hdslb.com/bfs/storyff/n220801qn337b2rig3v6l23kyehiinaa_firsti.jpg", - "pub_location": "上海", - "bvid": "BV1zS4y1x7ZM", - "inter_video": false, - "resource_type": "ugc", - "subtitle": "" - } + "code": 0, + "message": "0", + "ttl": 1, + "data": [ + { + "aid": 669644066, + "videos": 1, + "tid": 75, + "tname": "动物圈", + "copyright": 2, + "pic": "http://i1.hdslb.com/bfs/archive/0f73a68b8f449cc72e9ef109685bd295dc0c0c9d.jpg", + "title": "在人类幼崽身上用尽了温柔", + "pubdate": 1600608261, + "ctime": 1600608261, + "desc": "https://weibo.com/tv/show/1034:4551253766897703?from=old_pc_videoshow", + "state": 0, + "attribute": 16384, + "duration": 29, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 0, + "no_reprint": 0, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 258457966, + "name": "卧龙寺", + "face": "http://i2.hdslb.com/bfs/face/f868d1f522733fdcf72a6267e0237157dd0e9948.jpg" + }, + "stat": { + "aid": 669644066, + "view": 3412898, + "danmaku": 719, + "reply": 1481, + "favorite": 21909, + "coin": 2864, + "share": 13702, + "now_rank": 0, + "his_rank": 0, + "like": 86970, + "dislike": 0 + }, + "dynamic": "", + "cid": 237319289, + "dimension": { + "width": 576, + "height": 1024, + "rotate": 0 + }, + "bvid": "BV1sa4y1j7jk", + "coins": 1, + "time": 1601802763, + "ip": "", + "inter_video": false + }, + { + "aid": 202267998, + "videos": 1, + "tid": 138, + "tname": "搞笑", + "copyright": 1, + "pic": "http://i0.hdslb.com/bfs/archive/ca7746f2207114513f1a421d7f744523275ee679.jpg", + "title": "充 电 器 の 痛", + "pubdate": 1601750952, + "ctime": 1601750952, + "desc": "这个简介吓到我了!", + "state": 0, + "attribute": 16512, + "duration": 50, + "mission_id": 14725, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 0, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 129922746, + "name": "-白糖洒一地-", + "face": "http://i0.hdslb.com/bfs/face/1f581f3b20a380c2fd13ecb8bbe409f8b49c6418.jpg" + }, + "stat": { + "aid": 202267998, + "view": 109, + "danmaku": 2, + "reply": 11, + "favorite": 5, + "coin": 9, + "share": 0, + "now_rank": 0, + "his_rank": 0, + "like": 20, + "dislike": 0 + }, + "dynamic": "", + "cid": 241861687, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1oh411X7iA", + "coins": 2, + "time": 1601773750, + "ip": "", + "inter_video": false + }, + { + "aid": 839722373, + "videos": 1, + "tid": 208, + "tname": "校园学习", + "copyright": 1, + "pic": "http://i2.hdslb.com/bfs/archive/11ed53241ceab314c919adba9f85582d24d9313c.jpg", + "title": "“白piáo”用日语到底怎么说?油管人气日语老师来教你!", + "pubdate": 1601026026, + "ctime": 1601026026, + "desc": "志方老师的B站用语日语课又来了~\n欢迎大家来看哦,\n如果喜欢我们的作品的话,欢迎大家用2~3连+转发来支持我们~\n如果拒绝的话,也可以用日语在评论和弹幕里刷上一波~即可以锻炼日语又可以拒绝我们,岂不美哉~~", + "state": 0, + "attribute": 16768, + "duration": 310, + "mission_id": 14655, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 1, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 677926489, + "name": "日语志方老师", + "face": "http://i2.hdslb.com/bfs/face/d465e5cd42e3523a52b3bef38dce7b23627b7723.jpg" + }, + "stat": { + "aid": 839722373, + "view": 130688, + "danmaku": 1320, + "reply": 799, + "favorite": 3722, + "coin": 5883, + "share": 339, + "now_rank": 0, + "his_rank": 0, + "like": 17585, + "dislike": 0 + }, + "dynamic": "志方老师的B站用语日语课又来了~\n欢迎大家来看哦,\n如果喜欢我们的作品的话,欢迎大家用2~3连+转发来支持我们~\n如果拒绝的话,也可以用日语在评论和弹幕里刷上一波~即可以锻炼日语又可以拒绝我们,岂不美哉~~", + "cid": 238876133, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1n54y117kq", + "coins": 2, + "time": 1601036198, + "ip": "", + "inter_video": false + } ] - } } ``` @@ -2618,22 +1519,14 @@ curl -L -X GET 'https://api.bilibili.com/x/space/like/video?vmid=15858903' ## 投稿 - + ### 查询用户投稿视频明细 -> https://api.bilibili.com/x/space/wbi/arc/search +> http://api.bilibili.com/x/space/arc/search *请求方式:GET* -鉴权方式:[Wbi 签名](../misc/sign/wbi.md) - -~~该接口的旧版 API :https://api.bilibili.com/x/space/arc/search~~(已废弃,不建议使用) - -**header字段:** - -必须要有 `user-agent`,且不能为 `空字符串`,以及含有 `python`、`node`、`curl` 等的字符串 - **url参数:** | 参数名 | 类型 | 内容 | 必要性 | 备注 | @@ -2642,21 +1535,19 @@ curl -L -X GET 'https://api.bilibili.com/x/space/like/video?vmid=15858903' | order | str | 排序方式 | 非必要 | 默认为pubdate
最新发布:pubdate
最多播放:click
最多收藏:stow | | tid | num | 筛选目标分区 | 非必要 | 默认为0
0:不进行分区筛选
分区tid为所筛选的分区 | | keyword | str | 关键词筛选 | 非必要 | 用于使用关键词搜索该UP主视频稿件 | -| pn | num | 页码 | 非必要 | | -| ps | num | 每页项数 | 非必要 | 最小 1,最大 50,默认 30 | -| w_rid | str | Wbi 签名 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) | -| wts | num | 当前时间戳 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) | +| pn | num | 页码 | 必要 | | +| ps | num | 每页项数 | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-400:请求错误
-403:访问权限不足
-412:请求被拦截
-1200:被降级过滤的请求(一种意义不明的偶发状况) | -| message | str | 错误信息 | 默认为 0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
-412:请求被拦截 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | `data`对象: @@ -2665,24 +1556,20 @@ curl -L -X GET 'https://api.bilibili.com/x/space/like/video?vmid=15858903' | list | obj | 列表信息 | | | page | obj | 页面信息 | | | episodic_button | obj | “播放全部“按钮 | | -| is_risk | bool | (?) | | -| gaia_res_type | num | (?) | | -| gaia_data | null | (?) | | `data`中的`list`对象: -| 字段 | 类型 | 内容 | 备注 | -| ----- | ----- | ---------------- | ---- | -| tlist | obj | 投稿视频分区索引 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ------ | ---------------- | ---- | +| tlist | obj | 投稿视频分区索引 | | | vlist | array | 投稿视频列表 | | -| slist | array | (?) | | `list`中的`tlist`对象: -| 字段 | 类型 | 内容 | 备注 | -| ----- | ---- | ------------ | ---------------------- | -| {tid} | obj | 该分区的详情 | 字段名为存在的分区 tid | -| …… | obj | …… | 向下扩展 | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | ------------ | --------------------- | +| {tid} | obj | 该分区的详情 | 字段名为存在的分区tid | +| …… | obj | …… | 向下扩展 | `tlist`中的`{tid}`对象: @@ -2690,76 +1577,66 @@ curl -L -X GET 'https://api.bilibili.com/x/space/like/video?vmid=15858903' | ----- | ---- | -------------------- | ---- | | count | num | 投稿至该分区的视频数 | | | name | str | 该分区名称 | | -| tid | num | 该分区 tid | | +| tid | num | 该分区tid | | `list`中的`vlist`数组: | 项 | 类型 | 内容 | 备注 | | ---- | ---- | --------------- | ---- | -| 0 | obj | 投稿视频 1 | | +| 0 | obj | 投稿视频1 | | | n | obj | 投稿视频(n+1) | | | …… | obj | …… | …… | `list`中的`vlist`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -| ---------------- | ---- | -------------- | ------------------------------------------------------------ | -| comment | num | 视频评论数 | | -| typeid | num | 视频分区 tid | | -| play | num | 视频播放次数 | 如果视频基本信息 API 对应的状态为 -403 视频访问权限不足,数据类型将变为str,如("play": "--",),于 UID:79 发表的 av5132474 可见 | -| pic | str | 视频封面 | | -| subtitle | str | (?) | | -| description | str | 视频简介 | | -| copyright | str | 稿件类型 | 1:原创
2:转载 | -| title | str | 视频标题 | | -| review | num | (?) | | -| author | str | 视频 UP 主 | 不一定为目标用户(合作视频) | -| mid | num | 视频 UP 主 mid | 不一定为目标用户(合作视频) | -| created | num | 投稿时间 | 秒时间戳 | -| length | str | 视频长度 | MM:SS | -| video_review | num | 视频弹幕数 | | -| aid | num | 稿件 avid | | -| bvid | str | 稿件 bvid | | -| hide_click | bool | (?) | | -| is_pay | num | (?) | | -| is_union_video | num | 是否为合作视频 | 0:否
1:是 | -| is_steins_gate | num | (?) | | -| is_live_playback | num | 是否直播回放 | 0:否
1:是 | -| meta | null | (?) | | -| is_avoided | num | (?) | | -| attribute | num | (?) | | -| is_charging_arc | bool | (?) | | +| 字段 | 类型 | 内容 | 备注 | +| -------------- | ---- | -------------- | ---------------------------- | +| aid | num | 稿件avid | | +| author | str | 视频UP主 | 不一定为目标用户(合作视频) | +| bvid | str | 稿件bvid | | +| comment | num | 视频评论数 | | +| copyright | str | 空 | 作用尚不明确 | +| created | num | 投稿时间 | 时间戳 | +| description | str | 视频简介 | | +| hide_click | bool | false | 作用尚不明确 | +| is_pay | num | 0 | 作用尚不明确 | +| is_union_video | num | 是否为合作视频 | 0:否
1:是 | +| length | str | 视频长度 | MM:SS | +| mid | num | 视频UP主mid | 不一定为目标用户(合作视频) | +| pic | str | 视频封面 | | +| play | num | 视频播放次数 | | +| review | num | 0 | 作用尚不明确 | +| subtitle | str | 空 | 作用尚不明确 | +| title | str | 视频标题 | | +| typeid | num | 视频分区tid | | +| video_review | num | 视频弹幕数 | | `data`中的`page`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-----|-------|-----| -| count | num | 总计稿件数 | | -| pn | num | 当前页码 | | -| ps | num | 每页项数 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | ---------- | ---- | +| count | num | 总计稿件数 | | +| pn | num | 当前页码 | | +| ps | num | 每页项数 | | `data`中的`episodic_button`对象: -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | -------------- | ---- | -| text | str | 按钮文字 | | -| uri | str | 全部播放页 url | | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ------------- | ---- | +| text | str | 按钮文字 | | +| uri | str | 全部播放页url | | **示例:** `pn`(页码)和`ps`(每页项数)只改变`vlist`中成员的多少与内容 -以每页 5 项查询用户`mid=53456`的第 1 页投稿视频明细 - -Wbi 签名的 `wts`、`w_rid`生成方式详见 [Wbi 签名](../misc/sign/wbi.md) 文档 +以每页2项查询用户`mid=53456`的第1页投稿视频明细 ```shell -curl -G 'https://api.bilibili.com/x/space/wbi/arc/search' \ - --data-urlencode 'mid=53456' \ - --data-urlencode 'ps=5' \ - --data-urlencode 'pn=1' \ - --data-urlencode 'wts=1685073645' \ - --data-urlencode 'w_rid=2e49b69235fb3ea9340422ac9382cbc2' +curl -G 'http://api.bilibili.com/x/space/arc/search' \ +--data-urlencode 'mid=53456' \ +--data-urlencode 'ps=2' \ +--data-urlencode 'pn=1' ```
@@ -2775,27 +1652,12 @@ curl -G 'https://api.bilibili.com/x/space/wbi/arc/search' \ "tlist": { "1": { "tid": 1, - "count": 42, + "count": 26, "name": "动画" }, - "3": { - "tid": 3, - "count": 36, - "name": "音乐" - }, - "4": { - "tid": 4, - "count": 85, - "name": "游戏" - }, - "36": { - "tid": 36, - "count": 1, - "name": "知识" - }, "160": { "tid": 160, - "count": 51, + "count": 42, "name": "生活" }, "211": { @@ -2803,188 +1665,73 @@ curl -G 'https://api.bilibili.com/x/space/wbi/arc/search' \ "count": 3, "name": "美食" }, - "217": { - "tid": 217, - "count": 2, - "name": "动物圈" + "3": { + "tid": 3, + "count": 33, + "name": "音乐" + }, + "4": { + "tid": 4, + "count": 72, + "name": "游戏" } }, "vlist": [ { - "comment": 2727, - "typeid": 17, - "play": 1379744, - "pic": "http://i0.hdslb.com/bfs/archive/d8745a327c56a1d8862054bf88ed1cd3d4cd2a0f.jpg", + "comment": 3558, + "typeid": 47, + "play": 1275661, + "pic": "//i2.hdslb.com/bfs/archive/90157806a34646ac2d4c6af3e8b6156cb3460d14.jpg", "subtitle": "", - "description": "游戏:《塞尔达传说:王国之泪》\n真好玩!一口气玩了五天,到处游山玩水都没怎么顾得上推主线哈哈哈,虽然没能造出高达来,但胡乱折腾也很开心啦!\n我的微博:_warma_", - "copyright": "1", - "title": "【warma】我玩游戏太菜不要笑我!", + "description": "第一期:BV1ak4y1B7aG\n第二期:BV1eA411Y7FN\n脚本/绘画/配音/动画/片尾曲:warma\n第三期终于做完啦!这是一个以我平时发呆的时候想到的一些灵感组成的冷笑话合集,名字叫《沃玛的生活》,可以当作日常搞笑单元小动画来看。\n如果你喜欢这个系列的话请点赞投币收藏一键三连给我一些继续制作的动力吧,我真的非常非常需要更多的动力!\n祝看得开心~\n我的微博:@_warma_", + "copyright": "", + "title": "【warma】沃玛的新番更新!从现在开始放飞自我【沃玛的生活/第三期】", "review": 0, "author": "Warma", "mid": 53456, - "created": 1684468800, - "length": "27:53", - "video_review": 7538, - "aid": 741294090, - "bvid": "BV1dk4y1L77W", + "created": 1605844817, + "length": "05:16", + "video_review": 7470, + "aid": 585275804, + "bvid": "BV1sz4y1y7KJ", "hide_click": false, "is_pay": 0, "is_union_video": 0, - "is_steins_gate": 0, - "is_live_playback": 0, - "meta": null, - "is_avoided": 0, - "attribute": 0, - "is_charging_arc": false + "is_steins_gate": 0 }, { - "comment": 2959, - "typeid": 172, - "play": 1601320, - "pic": "http://i2.hdslb.com/bfs/archive/5bc6b4b78787508fec6e5545313a5aac49b420ab.jpg", - "subtitle": "", - "description": "来继续更新我的光遇之旅啦~这次也录到了好几个交到新朋友的瞬间了哈哈哈,每次被陌生人夸的时候都感觉特别不好意思但是又好开心!喜欢这里慢悠悠的氛围~最近夜行季也上线了,来欣赏美丽的月食吧!\n祝大家看得开心啦!", - "copyright": "1", - "title": "【warma】这里的陌生人都热情过头了啊啊啊!", - "review": 0, - "author": "Warma", - "mid": 53456, - "created": 1683434541, - "length": "21:56", - "video_review": 2552, - "aid": 570782455, - "bvid": "BV12z4y1h72d", - "hide_click": false, - "is_pay": 0, - "is_union_video": 0, - "is_steins_gate": 0, - "is_live_playback": 0, - "meta": null, - "is_avoided": 0, - "attribute": 0, - "is_charging_arc": false - }, - { - "comment": 6844, + "comment": 2979, "typeid": 21, - "play": 3898109, - "pic": "http://i0.hdslb.com/bfs/archive/733239b86fe15c5f07d15872a955e1819dcc1f31.jpg", + "play": 840676, + "pic": "//i2.hdslb.com/bfs/archive/b43f88c6ebae8fdc7dfb663f6f6f2931b924c763.jpg", "subtitle": "", - "description": "我想试着练习写一本从构思、正文、插画、排版到封面设计全都由自己来完成的书!\n\n虽然这本书未来还不确定,但是我尽力啦~大家如果觉得有哪里做得还不够好请指出来告诉我吧,我还有很多很多需要学习的地方,请大家多多指教啦!\n如果有出版社的编辑老师正在观看此视频的话,请老师们多多指教,希望能够和老师们取得联系:chickenfish@vip.qq.com\n\n电子书文件发在评论区啦~", - "copyright": "1", - "title": "【warma】我要写书啦!!!", + "description": "前一阵子过生日,大家的礼物经过几番转寄终于收到了~于是录了这期礼物开箱视频。\n现在也在感慨,大家的礼物真的都太强了,居然这些全都是手工做的,真的好厉害!\n这些手工礼物背后得花多少时间和心力啊……这些对我来说都是无价的礼物,制作礼物的大家真的有心了,谢谢!!\n收到这些礼物真的很开心,视频的封面也是在这样激动的情况下画出来的,祝你看得开心~\n我的微博:@_warma_", + "copyright": "", + "title": "【warma】来开箱!大家寄来的生日礼物", "review": 0, "author": "Warma", "mid": 53456, - "created": 1680840000, - "length": "21:55", - "video_review": 15975, - "aid": 909664793, - "bvid": "BV1oM4y1y7Q4", + "created": 1604635221, + "length": "24:28", + "video_review": 10476, + "aid": 287744380, + "bvid": "BV1xf4y1q7XN", "hide_click": false, "is_pay": 0, "is_union_video": 0, - "is_steins_gate": 0, - "is_live_playback": 0, - "meta": null, - "is_avoided": 0, - "attribute": 0, - "is_charging_arc": false - }, - { - "comment": 2030, - "typeid": 17, - "play": 2272296, - "pic": "http://i0.hdslb.com/bfs/archive/d0d12a011d2a3799a77fa84372372581abdc917c.jpg", - "subtitle": "", - "description": "玩到尽兴为止!\n\n录制/视频制作:warma\n录制/插画:怒九", - "copyright": "1", - "title": "【warma/怒九】陪我打游戏!(胁迫)", - "review": 0, - "author": "Warma", - "mid": 53456, - "created": 1677816000, - "length": "36:42", - "video_review": 9902, - "aid": 482867257, - "bvid": "BV1XT411v76Y", - "hide_click": false, - "is_pay": 0, - "is_union_video": 1, - "is_steins_gate": 0, - "is_live_playback": 0, - "meta": null, - "is_avoided": 0, - "attribute": 0, - "is_charging_arc": false - }, - { - "comment": 12666, - "typeid": 21, - "play": 1892762, - "pic": "http://i0.hdslb.com/bfs/archive/5e712811e893886fb0535a95e1609cb3ba307a39.jpg", - "subtitle": "", - "description": "你好~这是我的一期电台节目,现在也已经是第十一期啦,但是即便没看过前面几期也不会影响观看,因为这是个什么都聊聊看的日常电台嘛~\n \n这期电台内容非常友好、令人安心,只是偶尔有点“问题”,但好在目前还是处于能安全观看的水平,请来看看吧。\n \n录音/视频制作:warma\n我的微博:_warma_\n \n背景插画:认知Renz\n发光粒子素材:K_Lacid \n【视频某处的曲子的staff】\n翻唱:Warma\n曲绘:不鱼\nPV:祈凉_&兽人苦工\n后期:白萝卜音乐工作室\n \n(感谢以上老师的帮助~)", - "copyright": "1", - "title": "【warma爆炸电台】曾经性格阴沉的我正在分享创作心得与日常【第十一期】", - "review": 0, - "author": "Warma", - "mid": 53456, - "created": 1674964800, - "length": "77:24", - "video_review": 68240, - "aid": 990909915, - "bvid": "BV1Ex4y177xd", - "hide_click": false, - "is_pay": 0, - "is_union_video": 0, - "is_steins_gate": 0, - "is_live_playback": 0, - "meta": { - "id": 149941, - "title": "爆炸电台", - "cover": "https://archive.biliimg.com/bfs/archive/b833b4299b3f4252ebe4d2902421aa25ba9e7ccc.jpg", - "mid": 53456, - "intro": "你好!这是我的电台节目《爆炸电台》,这是个什么都聊聊看的日常电台,内容是纯音频的,所以看不看画面都没问题~\n电台的时间比较长,可以拿点零食饮料或者放在一旁慢慢听什么的都很合适~\n祝观看愉快~!", - "sign_state": 0, - "attribute": 140, - "stat": { - "season_id": 149941, - "view": 11824985, - "danmaku": 363116, - "reply": 50348, - "favorite": 343639, - "coin": 665105, - "share": 50804, - "like": 1013864, - "mtime": 1685073652, - "vt": 71631635, - "vv": 0 - }, - "ep_count": 10, - "first_aid": 990909915, - "ptime": 1674964800, - "ep_num": 0 - }, - "is_avoided": 0, - "attribute": 0, - "is_charging_arc": false + "is_steins_gate": 0 } - ], - "slist": [] + ] }, "page": { "pn": 1, - "ps": 5, - "count": 220 + "ps": 2, + "count": 176 }, "episodic_button": { "text": "播放全部", "uri": "//www.bilibili.com/medialist/play/53456?from=space" - }, - "is_risk": false, - "gaia_res_type": 0, - "gaia_data": null + } } } ``` @@ -2993,7 +1740,7 @@ curl -G 'https://api.bilibili.com/x/space/wbi/arc/search' \ ### 查询用户投稿相簿预览 -> https://api.bilibili.com/x/space/album/index +> http://api.bilibili.com/x/space/album/index *请求方式:GET* @@ -3001,67 +1748,67 @@ curl -G 'https://api.bilibili.com/x/space/wbi/arc/search' \ **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|----------------------------| -| mid | num | 目标用户mid | 必要 | | -| ps | num | 获取的相簿量 | 非必要 | 默认为8 定义域 1-大于1700 (注意滥用风险) | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------ | ------ | ------- | +| mid | num | 目标用户mid | 必要 | | +| ps | num | 获取的相簿量 | 非必要 | 默认为8 定义域 1-大于1700 (注意滥用风险) | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-------|------|---------------------| -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | array | 相簿列表 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ------ | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | array | 相簿列表 | | `data`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|-----------|-----| -| 0 | obj | 相簿内容1 | | -| n | obj | 相簿内容(n+1) | | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | ---- | +| 0 | obj | 相簿内容1 | | +| n | obj | 相簿内容(n+1) | | +| …… | obj | …… | …… | `data`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|-------------|-------|---------|--------| -| count | num | 总计图片数 | | -| ctime | num | 发布时间 | 时间戳 | -| description | str | 简介 | | -| doc_id | num | 相簿id | 非动态!!! | -| like | num | 点赞数 | | -| pictures | array | 图片内容 | | -| poster_uid | num | 上传用户mid | | -| title | str | 标题 | 动态内容无 | -| view | num | 浏览数 | | +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ------ | ----------- | -------------- | +| count | num | 总计图片数 | | +| ctime | num | 发布时间 | 时间戳 | +| description | str | 简介 | | +| doc_id | num | 相簿id | 非动态!!! | +| like | num | 点赞数 | | +| pictures | array | 图片内容 | | +| poster_uid | num | 上传用户mid | | +| title | str | 标题 | 动态内容无 | +| view | num | 浏览数 | | `data`数组中的对象中的`pictures`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|-----------|----------------| -| 0 | obj | 内容图片1 | | -| n | obj | 内容图片(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | --------------------- | +| 0 | obj | 内容图片1 | | +| n | obj | 内容图片(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | …… | `pictures`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|------------|-----|-------|----------| -| img_height | num | 图片高度 | | -| img_size | num | 图片大小 | 单位为KByte | -| img_src | str | 图片url | | -| img_width | num | 图片宽度 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ---- | -------- | ----------- | +| img_height | num | 图片高度 | | +| img_size | num | 图片大小 | 单位为KByte | +| img_src | str | 图片url | | +| img_width | num | 图片宽度 | | **示例:** 查询用户`mid=53456`的投稿相簿预览 ```shell -curl -G 'https://api.bilibili.com/x/space/album/index' \ +curl -G 'http://api.bilibili.com/x/space/album/index' \ --data-urlencode 'mid=53456' \ --data-urlencode 'ps=2' ``` @@ -3071,50 +1818,50 @@ curl -G 'https://api.bilibili.com/x/space/album/index' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": [{ - "doc_id": 60470424, - "poster_uid": 53456, - "title": "", - "description": "你醒啦![tv_大佬]\n之前说到过的百万粉纪念的视频已经定时在了今天下午七点,欢迎来看呀!", - "pictures": [{ - "img_src": "https://i0.hdslb.com/bfs/album/2840366e30bf7c0aba9da5adde1a771255a57bc7.jpg", - "img_width": 625, - "img_height": 134, - "img_size": 14 - }], - "count": 1, - "ctime": 1583444859, - "view": 1677521, - "like": 29974 - }, { - "doc_id": 58962388, - "poster_uid": 53456, - "title": "", - "description": "上次的那些写实儿童画发出来啦!可以打印下来辟邪[tv_大佬]", - "pictures": [{ - "img_src": "https://i0.hdslb.com/bfs/album/8acaf7c7897cb858cccab36c33a5e875adfef177.jpg", - "img_width": 2172, - "img_height": 3258, - "img_size": 2831 - }, { - "img_src": "https://i0.hdslb.com/bfs/album/1611b6b56d3d4328889a62b9f9bdc92e9d065532.jpg", - "img_width": 3456, - "img_height": 5184, - "img_size": 3024 - }, { - "img_src": "https://i0.hdslb.com/bfs/album/f3a30a2ef5b39711af8b945d54d85ffd1e932b8a.jpg", - "img_width": 1200, - "img_height": 757, - "img_size": 313 - }], - "count": 3, - "ctime": 1582881332, - "view": 1176646, - "like": 25734 - }] + "code": 0, + "message": "0", + "ttl": 1, + "data": [{ + "doc_id": 60470424, + "poster_uid": 53456, + "title": "", + "description": "你醒啦![tv_大佬]\n之前说到过的百万粉纪念的视频已经定时在了今天下午七点,欢迎来看呀!", + "pictures": [{ + "img_src": "https://i0.hdslb.com/bfs/album/2840366e30bf7c0aba9da5adde1a771255a57bc7.jpg", + "img_width": 625, + "img_height": 134, + "img_size": 14 + }], + "count": 1, + "ctime": 1583444859, + "view": 1677521, + "like": 29974 + }, { + "doc_id": 58962388, + "poster_uid": 53456, + "title": "", + "description": "上次的那些写实儿童画发出来啦!可以打印下来辟邪[tv_大佬]", + "pictures": [{ + "img_src": "https://i0.hdslb.com/bfs/album/8acaf7c7897cb858cccab36c33a5e875adfef177.jpg", + "img_width": 2172, + "img_height": 3258, + "img_size": 2831 + }, { + "img_src": "https://i0.hdslb.com/bfs/album/1611b6b56d3d4328889a62b9f9bdc92e9d065532.jpg", + "img_width": 3456, + "img_height": 5184, + "img_size": 3024 + }, { + "img_src": "https://i0.hdslb.com/bfs/album/f3a30a2ef5b39711af8b945d54d85ffd1e932b8a.jpg", + "img_width": 1200, + "img_height": 757, + "img_size": 313 + }], + "count": 3, + "ctime": 1582881332, + "view": 1176646, + "like": 25734 + }] } ``` @@ -3122,81 +1869,81 @@ curl -G 'https://api.bilibili.com/x/space/album/index' \ ### 查询用户投稿相簿明细 -> https://api.vc.bilibili.com/link_draw/v1/doc/doc_list +> http://api.vc.bilibili.com/link_draw/v1/doc/doc_list *请求方式:GET* **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----------|-----|---------|-----|-------------------------------------------------------------| -| uid | num | 目标用户mid | 必要 | | -| page_num | num | 页码 | 非必要 | 默认为0 | -| page_size | num | 每页项数 | 必要 | 默认为30 | -| biz | str | 查询类型 | 非必要 | 全部:all
绘画:draw
摄影:photo
日常:daily
默认为all | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| --------- | ---- | ----------- | ------ | ------------------------------------------------------------ | +| uid | num | 目标用户mid | 必要 | | +| page_num | num | 页码 | 非必要 | 默认为1 | +| page_size | num | 每页项数 | 非必要 | 默认为20 | +| biz | str | 查询类型 | 非必要 | 全部:all
绘画:draw
摄影:photo
日常:daily
默认为all | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|------------| -| code | num | 返回值 | 0:成功 | -| msg | str | 错误信息 | 默认为success | -| message | str | 错误信息 | 默认为success | -| data | obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------- | +| code | num | 返回值 | 0:成功 | +| msg | str | 错误信息 | 默认为success | +| message | str | 错误信息 | 默认为success | +| data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-------|------|-----| -| items | array | 相簿列表 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ------ | -------- | ---- | +| items | array | 相簿列表 | | `items`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|-----------|-----| -| 0 | obj | 相簿内容1 | | -| n | obj | 相簿内容(n+1) | | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | ---- | +| 0 | obj | 相簿内容1 | | +| n | obj | 相簿内容(n+1) | | +| …… | obj | …… | …… | `items`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|-------------|-------|---------|--------| -| count | num | 总计图片数 | | -| ctime | num | 发布时间 | 时间戳 | -| description | str | 简介 | | -| doc_id | num | 相簿id | 非动态!!! | -| like | num | 点赞数 | | -| pictures | array | 图片内容 | | -| poster_uid | num | 上传用户mid | | -| title | str | 标题 | 动态内容无 | -| view | num | 浏览数 | | +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ------ | ----------- | -------------- | +| count | num | 总计图片数 | | +| ctime | num | 发布时间 | 时间戳 | +| description | str | 简介 | | +| doc_id | num | 相簿id | 非动态!!! | +| like | num | 点赞数 | | +| pictures | array | 图片内容 | | +| poster_uid | num | 上传用户mid | | +| title | str | 标题 | 动态内容无 | +| view | num | 浏览数 | | `items`数组中的对象中的`pictures`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|-----------|----------------| -| 0 | obj | 内容图片1 | | -| n | obj | 内容图片(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | --------------- | --------------------- | +| 0 | obj | 内容图片1 | | +| n | obj | 内容图片(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | …… | `pictures`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|------------|-----|-------|----------| -| img_height | num | 图片高度 | | -| img_size | num | 图片大小 | 单位为KByte | -| img_src | str | 图片url | | -| img_width | num | 图片宽度 | | +| 字段 | 类型 | 内容 | 备注 | +| ---------- | ---- | -------- | ----------- | +| img_height | num | 图片高度 | | +| img_size | num | 图片大小 | 单位为KByte | +| img_src | str | 图片url | | +| img_width | num | 图片宽度 | | **示例:** 查询用户`mid=53456`的投稿明细中的全部类型 ```shell -curl -G 'https://api.vc.bilibili.com/link_draw/v1/doc/doc_list' \ +curl -G 'http://api.vc.bilibili.com/link_draw/v1/doc/doc_list' \ --data-urlencode 'uid=2' \ --data-urlencode 'page_num=1' \ --data-urlencode 'page_size=2' \ @@ -3208,57 +1955,57 @@ curl -G 'https://api.vc.bilibili.com/link_draw/v1/doc/doc_list' \ ```json { - "code": 0, - "msg": "success", - "message": "success", - "data": { - "items": [{ - "doc_id": 59015720, - "poster_uid": 2, - "title": "", - "description": "6影是真的无脑,2个宝石都护不住(设计师:这真是太酷了)", - "pictures": [{ - "img_src": "http://i0.hdslb.com/bfs/album/8456f050ec8639c6e0cef36aba27bfdedc550590.jpg", - "img_width": 1824, - "img_height": 840, - "img_size": 1024 - }], - "count": 1, - "ctime": 1582894607, - "view": 707073, - "like": 7055 - }, { - "doc_id": 46853140, - "poster_uid": 2, - "title": "", - "description": "#年度报告# #新年Flag# https://www.bilibili.com/blackboard/timemachine2019.html\n决定了,这就是我的新年Flag!今年我一定要…", - "pictures": [{ - "img_src": "http://i0.hdslb.com/bfs/album/5b3ae76f79d7cf2501afc3ca7c7da509dcf0e38a.jpg", - "img_width": 1125, - "img_height": 2184, - "img_size": 465 - }, { - "img_src": "http://i0.hdslb.com/bfs/album/87789fe9644337a1f7e6a0655a32584705af8bda.jpg", - "img_width": 1125, - "img_height": 2184, - "img_size": 421 - }, { - "img_src": "http://i0.hdslb.com/bfs/album/f752d7f3bb7952f6c0013b3f48ddcb07060b4721.jpg", - "img_width": 1125, - "img_height": 2184, - "img_size": 524 - }, { - "img_src": "http://i0.hdslb.com/bfs/active/7a52a411bccb716c8e67fe70e6c330d5209346de.jpg", - "img_width": 1125, - "img_height": 2184, - "img_size": 534 - }], - "count": 4, - "ctime": 1577966163, - "view": 833193, - "like": 5667 - }] - } + "code": 0, + "msg": "success", + "message": "success", + "data": { + "items": [{ + "doc_id": 59015720, + "poster_uid": 2, + "title": "", + "description": "6影是真的无脑,2个宝石都护不住(设计师:这真是太酷了)", + "pictures": [{ + "img_src": "http://i0.hdslb.com/bfs/album/8456f050ec8639c6e0cef36aba27bfdedc550590.jpg", + "img_width": 1824, + "img_height": 840, + "img_size": 1024 + }], + "count": 1, + "ctime": 1582894607, + "view": 707073, + "like": 7055 + }, { + "doc_id": 46853140, + "poster_uid": 2, + "title": "", + "description": "#年度报告# #新年Flag# https://www.bilibili.com/blackboard/timemachine2019.html\n决定了,这就是我的新年Flag!今年我一定要…", + "pictures": [{ + "img_src": "http://i0.hdslb.com/bfs/album/5b3ae76f79d7cf2501afc3ca7c7da509dcf0e38a.jpg", + "img_width": 1125, + "img_height": 2184, + "img_size": 465 + }, { + "img_src": "http://i0.hdslb.com/bfs/album/87789fe9644337a1f7e6a0655a32584705af8bda.jpg", + "img_width": 1125, + "img_height": 2184, + "img_size": 421 + }, { + "img_src": "http://i0.hdslb.com/bfs/album/f752d7f3bb7952f6c0013b3f48ddcb07060b4721.jpg", + "img_width": 1125, + "img_height": 2184, + "img_size": 524 + }, { + "img_src": "http://i0.hdslb.com/bfs/active/7a52a411bccb716c8e67fe70e6c330d5209346de.jpg", + "img_width": 1125, + "img_height": 2184, + "img_size": 534 + }], + "count": 4, + "ctime": 1577966163, + "view": 833193, + "like": 5667 + }] + } } ``` @@ -3266,64 +2013,64 @@ curl -G 'https://api.vc.bilibili.com/link_draw/v1/doc/doc_list' \ ## 频道 - + ### 查询用户频道列表 -> https://api.bilibili.com/x/space/channel/list +> http://api.bilibili.com/x/space/channel/list *请求方式:GET* **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|-----| -| mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|----------------------------| -| code | num | 返回值 | 0:成功 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | 无则为空 所有频道内均无视频则为空,此时code为0 | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | -------- | +| code | num | 返回值 | 0:成功 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | 无则为空 所有频道内均无视频则为空,此时code为0 | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-------|-------|-----| -| count | num | 总计频道数 | | -| list | array | 频道列表 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ------ | ---------- | ---- | +| count | num | 总计频道数 | | +| list | array | 频道列表 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|---------|----------------| -| 0 | obj | 频道1 | | -| n | obj | 频道(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | --------------------- | +| 0 | obj | 频道1 | | +| n | obj | 频道(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | …… | `data`中的`list`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-----|---------|------| -| cid | num | 频道id | | -| count | num | 频道内含视频数 | | -| cover | str | 封面图片url | | -| intro | str | 简介 | 无则为空 | -| mid | num | 创建用户mid | | -| mtime | num | 创建时间 | 时间戳 | -| name | str | 标题 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | -------------- | -------- | +| cid | num | 频道id | | +| count | num | 频道内含视频数 | | +| cover | str | 封面图片url | | +| intro | str | 简介 | 无则为空 | +| mid | num | 创建用户mid | | +| mtime | num | 创建时间 | 时间戳 | +| name | str | 标题 | | **示例:** 查询用户`mid=53456`的频道列表 ```shell -curl -G 'https://api.bilibili.com/x/space/channel/list' \ +curl -G 'http://api.bilibili.com/x/space/channel/list' \ --data-urlencode 'mid=53456' ``` @@ -3332,61 +2079,61 @@ curl -G 'https://api.bilibili.com/x/space/channel/list' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "count": 6, - "list": [{ - "cid": 100249, - "mid": 53456, - "name": "【实况】动物之森", - "intro": "", - "mtime": 1579898830, - "count": 2, - "cover": "http://i1.hdslb.com/bfs/archive/6a7ed9483c34e839dfca981b9e2b94cd4c4efa0a.jpg" - }, { - "cid": 79323, - "mid": 53456, - "name": "忆雨", - "intro": "忆雨出现过的视频", - "mtime": 1562535222, - "count": 7, - "cover": "http://i2.hdslb.com/bfs/archive/1783e4f03042b282495799adda1cb56270cea647.jpg" - }, { - "cid": 79322, - "mid": 53456, - "name": "大画家", - "intro": "", - "mtime": 1562535122, - "count": 6, - "cover": "http://i0.hdslb.com/bfs/archive/9c85a14e805c6c23cb7a42e1dbef97821bb68960.jpg" - }, { - "cid": 77758, - "mid": 53456, - "name": "灭火器", - "intro": "", - "mtime": 1561270856, - "count": 4, - "cover": "http://i2.hdslb.com/bfs/archive/0073208d086b4ebe9cdc540e7664aa74b483aeb6.jpg" - }, { - "cid": 75696, - "mid": 53456, - "name": "沃玛小剧场", - "intro": "", - "mtime": 1559129460, - "count": 5, - "cover": "http://i2.hdslb.com/bfs/archive/db2b20ecdb6ed013fc3780b0e741ea88d46b5b40.jpg" - }, { - "cid": 170, - "mid": 53456, - "name": "爆炸电台", - "intro": "闲聊的电台", - "mtime": 1503298893, - "count": 7, - "cover": "http://i2.hdslb.com/bfs/archive/73d77bc6bb0d44b239fd4f5a2682fe3144e81692.jpg" - }] - } + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "count": 6, + "list": [{ + "cid": 100249, + "mid": 53456, + "name": "【实况】动物之森", + "intro": "", + "mtime": 1579898830, + "count": 2, + "cover": "http://i1.hdslb.com/bfs/archive/6a7ed9483c34e839dfca981b9e2b94cd4c4efa0a.jpg" + }, { + "cid": 79323, + "mid": 53456, + "name": "忆雨", + "intro": "忆雨出现过的视频", + "mtime": 1562535222, + "count": 7, + "cover": "http://i2.hdslb.com/bfs/archive/1783e4f03042b282495799adda1cb56270cea647.jpg" + }, { + "cid": 79322, + "mid": 53456, + "name": "大画家", + "intro": "", + "mtime": 1562535122, + "count": 6, + "cover": "http://i0.hdslb.com/bfs/archive/9c85a14e805c6c23cb7a42e1dbef97821bb68960.jpg" + }, { + "cid": 77758, + "mid": 53456, + "name": "灭火器", + "intro": "", + "mtime": 1561270856, + "count": 4, + "cover": "http://i2.hdslb.com/bfs/archive/0073208d086b4ebe9cdc540e7664aa74b483aeb6.jpg" + }, { + "cid": 75696, + "mid": 53456, + "name": "沃玛小剧场", + "intro": "", + "mtime": 1559129460, + "count": 5, + "cover": "http://i2.hdslb.com/bfs/archive/db2b20ecdb6ed013fc3780b0e741ea88d46b5b40.jpg" + }, { + "cid": 170, + "mid": 53456, + "name": "爆炸电台", + "intro": "闲聊的电台", + "mtime": 1503298893, + "count": 7, + "cover": "http://i2.hdslb.com/bfs/archive/73d77bc6bb0d44b239fd4f5a2682fe3144e81692.jpg" + }] + } } ``` @@ -3396,57 +2143,57 @@ curl -G 'https://api.bilibili.com/x/space/channel/list' \ ### 查询用户频道中的视频 -> https://api.bilibili.com/x/space/channel/video +> http://api.bilibili.com/x/space/channel/video *请求方式:GET* **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|--------| -| mid | num | 目标用户mid | 必要 | | -| cid | num | 目标频道id | 必要 | | -| pn | num | 页码 | 非必要 | 默认为1 | -| ps | num | 每页项数 | 非必要 | 默认为100 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | --------- | +| mid | num | 目标用户mid | 必要 | | +| cid | num | 目标频道id | 必要 | | +| pn | num | 页码 | 非必要 | 默认为1 | +| ps | num | 每页项数 | 非必要 | 默认为100 | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|----------------------------------------| -| code | num | 返回值 | 0:成功
-400:请求错误
-404:无用户对应的频道 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
-404:无用户对应的频道 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|------|-----|------|-----| -| list | obj | 频道信息 | | -| page | obj | 页面信息 | | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | -------- | ---- | +| list | obj | 频道信息 | | +| page | obj | 页面信息 | | `data`中的`list`对象: -| 字段 | 类型 | 内容 | 备注 | -|----------|-------|---------|------| -| archives | array | 包含的视频列表 | | -| cid | num | 频道id | | -| count | num | 频道内含视频数 | | -| cover | str | 封面图片url | | -| intro | str | 简介 | 无则为空 | -| mid | num | 创建用户mid | | -| mtime | num | 创建时间 | 时间戳 | -| name | str | 标题 | | +| 字段 | 类型 | 内容 | 备注 | +| -------- | ------ | -------------- | -------- | +| archives | array | 包含的视频列表 | | +| cid | num | 频道id | | +| count | num | 频道内含视频数 | | +| cover | str | 封面图片url | | +| intro | str | 简介 | 无则为空 | +| mid | num | 创建用户mid | | +| mtime | num | 创建时间 | 时间戳 | +| name | str | 标题 | | `list`中的`archives`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|---------|----------------| -| 0 | obj | 视频1 | | -| n | obj | 视频(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | --------------------- | +| 0 | obj | 视频1 | | +| n | obj | 视频(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | …… | `list`中的`archives`数组中的对象: @@ -3465,7 +2212,7 @@ curl -G 'https://api.bilibili.com/x/space/channel/list' \ 查询用户`mid=53456`的频道`170`中的视频 ```shell -curl -G 'https://api.bilibili.com/x/space/channel/video' \ +curl -G 'http://api.bilibili.com/x/space/channel/video' \ --data-urlencode 'mid=53456' \ --data-urlencode 'cid=170' \ --data-urlencode 'ps=2' \ @@ -3477,137 +2224,137 @@ curl -G 'https://api.bilibili.com/x/space/channel/video' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "list": { - "cid": 170, - "mid": 53456, - "name": "爆炸电台", - "intro": "闲聊的电台", - "mtime": 1503298893, - "count": 7, - "cover": "http://i2.hdslb.com/bfs/archive/73d77bc6bb0d44b239fd4f5a2682fe3144e81692.jpg", - "archives": [{ - "aid": 87673204, - "videos": 1, - "tid": 21, - "tname": "日常", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/5387bdcbbe4d5551adbf0ee2e607e4b7d3d8f2f0.jpg", - "title": "【warma爆炸电台】迟来的自我介绍【第八期】", - "pubdate": 1581244539, - "ctime": 1581244540, - "desc": "时隔半年的新的一期爆炸电台来啦,这是我的一系列杂谈聊天电台,这次因为多了很多新关注的朋友们,所以来做个自我介绍吧!\n画师:Dr-H_喵_ 动画:K_Lacid\n结尾提到的壁纸稍后在动态发原图,动态壁纸在steam那个壁纸软件的创意工坊里搜warma能找到\n\n往期的电台:\n第一期:av6786024 \n第三期:av13619263\n第四期:av18862091\n第五期:av25092410\n第六期:av42492515\n第七期:av62910468", - "state": 0, - "attribute": 16512, - "duration": 2388, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 53456, - "name": "Warma", - "face": "http://i1.hdslb.com/bfs/face/c1bbee6d255f1e7fc434e9930f0f288c8b24293a.jpg" - }, - "stat": { - "aid": 87673204, - "view": 1383542, - "danmaku": 88908, - "reply": 9237, - "favorite": 32929, - "coin": 68849, - "share": 5140, - "now_rank": 0, - "his_rank": 52, - "like": 116164, - "dislike": 0 - }, - "dynamic": "来做个自我介绍吧! #warma##沃玛##爆炸电台#", - "cid": 149793525, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV1D7411t7Be", - "inter_video": false - }, { - "aid": 62910468, - "videos": 1, - "tid": 21, - "tname": "日常", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/4bd598f71a144d4505e259b143c0de0bf27968b2.jpg", - "title": "【warma爆炸电台】居然收到了几千条问题!【第七期】", - "pubdate": 1565345410, - "ctime": 1565338559, - "desc": "时隔半年的爆炸电台第七期终于来啦!在这一期里回答了很多问题,祝看得开心!此外,就在昨天,50万订阅了…真的谢谢大家!\n也欢迎来看往期的电台:\n第一期:av6786024 (2016年10月)\n第二期:av10373352(2017年5月)\n第三期:av13619263(2017年8月)\n第四期:av18862091(2018年1月)\n第五期:av25092410(2018年6月)\n第六期:av42492515(2019年2月)", - "state": 0, - "attribute": 16512, - "duration": 1987, - "mission_id": 11740, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 53456, - "name": "Warma", - "face": "http://i1.hdslb.com/bfs/face/c1bbee6d255f1e7fc434e9930f0f288c8b24293a.jpg" - }, - "stat": { - "aid": 62910468, - "view": 455277, - "danmaku": 19383, - "reply": 2108, - "favorite": 10507, - "coin": 19422, - "share": 1208, - "now_rank": 0, - "his_rank": 0, - "like": 31515, - "dislike": 0 - }, - "dynamic": "爆炸电台 第七期 来啦!", - "cid": 109284065, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV1gt411K7Ga", - "inter_video": false - }] - }, - "page": { - "count": 7, - "num": 1, - "size": 2 - } - } + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "list": { + "cid": 170, + "mid": 53456, + "name": "爆炸电台", + "intro": "闲聊的电台", + "mtime": 1503298893, + "count": 7, + "cover": "http://i2.hdslb.com/bfs/archive/73d77bc6bb0d44b239fd4f5a2682fe3144e81692.jpg", + "archives": [{ + "aid": 87673204, + "videos": 1, + "tid": 21, + "tname": "日常", + "copyright": 1, + "pic": "http://i0.hdslb.com/bfs/archive/5387bdcbbe4d5551adbf0ee2e607e4b7d3d8f2f0.jpg", + "title": "【warma爆炸电台】迟来的自我介绍【第八期】", + "pubdate": 1581244539, + "ctime": 1581244540, + "desc": "时隔半年的新的一期爆炸电台来啦,这是我的一系列杂谈聊天电台,这次因为多了很多新关注的朋友们,所以来做个自我介绍吧!\n画师:Dr-H_喵_ 动画:K_Lacid\n结尾提到的壁纸稍后在动态发原图,动态壁纸在steam那个壁纸软件的创意工坊里搜warma能找到\n\n往期的电台:\n第一期:av6786024 \n第三期:av13619263\n第四期:av18862091\n第五期:av25092410\n第六期:av42492515\n第七期:av62910468", + "state": 0, + "attribute": 16512, + "duration": 2388, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 0, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 53456, + "name": "Warma", + "face": "http://i1.hdslb.com/bfs/face/c1bbee6d255f1e7fc434e9930f0f288c8b24293a.jpg" + }, + "stat": { + "aid": 87673204, + "view": 1383542, + "danmaku": 88908, + "reply": 9237, + "favorite": 32929, + "coin": 68849, + "share": 5140, + "now_rank": 0, + "his_rank": 52, + "like": 116164, + "dislike": 0 + }, + "dynamic": "来做个自我介绍吧! #warma##沃玛##爆炸电台#", + "cid": 149793525, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1D7411t7Be", + "inter_video": false + }, { + "aid": 62910468, + "videos": 1, + "tid": 21, + "tname": "日常", + "copyright": 1, + "pic": "http://i2.hdslb.com/bfs/archive/4bd598f71a144d4505e259b143c0de0bf27968b2.jpg", + "title": "【warma爆炸电台】居然收到了几千条问题!【第七期】", + "pubdate": 1565345410, + "ctime": 1565338559, + "desc": "时隔半年的爆炸电台第七期终于来啦!在这一期里回答了很多问题,祝看得开心!此外,就在昨天,50万订阅了…真的谢谢大家!\n也欢迎来看往期的电台:\n第一期:av6786024 (2016年10月)\n第二期:av10373352(2017年5月)\n第三期:av13619263(2017年8月)\n第四期:av18862091(2018年1月)\n第五期:av25092410(2018年6月)\n第六期:av42492515(2019年2月)", + "state": 0, + "attribute": 16512, + "duration": 1987, + "mission_id": 11740, + "rights": { + "bp": 0, + "elec": 0, + "download": 0, + "movie": 0, + "pay": 0, + "hd5": 0, + "no_reprint": 1, + "autoplay": 1, + "ugc_pay": 0, + "is_cooperation": 0, + "ugc_pay_preview": 0, + "no_background": 0 + }, + "owner": { + "mid": 53456, + "name": "Warma", + "face": "http://i1.hdslb.com/bfs/face/c1bbee6d255f1e7fc434e9930f0f288c8b24293a.jpg" + }, + "stat": { + "aid": 62910468, + "view": 455277, + "danmaku": 19383, + "reply": 2108, + "favorite": 10507, + "coin": 19422, + "share": 1208, + "now_rank": 0, + "his_rank": 0, + "like": 31515, + "dislike": 0 + }, + "dynamic": "爆炸电台 第七期 来啦!", + "cid": 109284065, + "dimension": { + "width": 1920, + "height": 1080, + "rotate": 0 + }, + "bvid": "BV1gt411K7Ga", + "inter_video": false + }] + }, + "page": { + "count": 7, + "num": 1, + "size": 2 + } + } } ``` @@ -3615,7 +2362,7 @@ curl -G 'https://api.bilibili.com/x/space/channel/video' \ ### 创建频道 -> https://api.bilibili.com/x/space/channel/add +> http://api.bilibili.com/x/space/channel/add *请求方式:POST* @@ -3625,35 +2372,35 @@ curl -G 'https://api.bilibili.com/x/space/channel/video' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-------|-----|----------------------|-----|-----| -| name | str | 频道名 | 必要 | | -| intro | str | 频道简介 | 非必要 | | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---- | +| name | str | 频道名 | 必要 | | +| intro | str | 频道简介 | 非必要 | | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53001:频道名字数超过限制
53002:频道简介字数超过限制
53004:创建的频道已经满额
53007:频道名称已经存在
53024:编辑内容命中敏感信息 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 数据本体 | 成功有此项 | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53001:频道名字数超过限制
53002:频道简介字数超过限制
53004:创建的频道已经满额
53007:频道名称已经存在
53024:编辑内容命中敏感信息 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 数据本体 | 成功有此项 | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|-----|-----|------|-----| -| cid | num | 频道id | | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ------ | ---- | +| cid | num | 频道id | | **示例:** 创建名为`test1`的频道,简介为空 ```shell -curl 'https://api.bilibili.com/x/space/channel/add' \ +curl 'http://api.bilibili.com/x/space/channel/add' \ --data-urlencode 'name=test1' \ --data-urlencode 'intro=' \ --data-urlencode 'csrf=xxx' \ @@ -3665,12 +2412,12 @@ curl 'https://api.bilibili.com/x/space/channel/add' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "cid": 138996 - } + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "cid": 138996 + } } ``` @@ -3678,7 +2425,7 @@ curl 'https://api.bilibili.com/x/space/channel/add' \ ### 修改频道 -> https://api.bilibili.com/x/space/channel/edit +> http://api.bilibili.com/x/space/channel/edit *请求方式:POST* @@ -3686,29 +2433,29 @@ curl 'https://api.bilibili.com/x/space/channel/add' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-------|-----|----------------------|-----|-----| -| cid | num | 频道id | 必要 | | -| name | str | 频道名 | 必要 | | -| intro | str | 频道简介 | 非必要 | | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---- | +| cid | num | 频道id | 必要 | | +| name | str | 频道名 | 必要 | | +| intro | str | 频道简介 | 非必要 | | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|---------------------------------------------------------------------------------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53001:频道名字数超过限制
53002:频道简介字数超过限制
53007:频道名称已经存在
53024:编辑内容命中敏感信息 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53001:频道名字数超过限制
53002:频道简介字数超过限制
53007:频道名称已经存在
53024:编辑内容命中敏感信息 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | **示例:** 修改频道`138996`名称为`测试`,简介为`123456` ```shell -curl 'https://api.bilibili.com/x/space/channel/edit' \ +curl 'http://api.bilibili.com/x/space/channel/edit' \ --data-urlencode 'cid=138996' \ --data-urlencode 'name=测试' \ --data-urlencode 'intro=123456' \ @@ -3721,9 +2468,9 @@ curl 'https://api.bilibili.com/x/space/channel/edit' \ ```json { - "code": 0, - "message": "0", - "ttl": 1 + "code": 0, + "message": "0", + "ttl": 1 } ``` @@ -3731,7 +2478,7 @@ curl 'https://api.bilibili.com/x/space/channel/edit' \ ### 删除频道 -> https://api.bilibili.com/x/space/channel/del +> http://api.bilibili.com/x/space/channel/del *请求方式:POST* @@ -3759,7 +2506,7 @@ curl 'https://api.bilibili.com/x/space/channel/edit' \ 删除频道`138996` ```shell -curl 'https://api.bilibili.com/x/space/channel/del' \ +curl 'http://api.bilibili.com/x/space/channel/del' \ --data-urlencode 'cid=138996' \ --data-urlencode 'csrf=xxx' \ -b 'SESSDATA=xxx' @@ -3770,9 +2517,9 @@ curl 'https://api.bilibili.com/x/space/channel/del' \ ```json { - "code": 0, - "message": "0", - "ttl": 1 + "code": 0, + "message": "0", + "ttl": 1 } ``` @@ -3780,7 +2527,7 @@ curl 'https://api.bilibili.com/x/space/channel/del' \ ### 频道添加视频 -> https://api.bilibili.com/x/space/channel/video/add +> http://api.bilibili.com/x/space/channel/video/add *请求方式:POST* @@ -3794,37 +2541,37 @@ curl 'https://api.bilibili.com/x/space/channel/del' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------|------|----------------------|-----|----------------| -| cid | num | 频道id | 必要 | | -| aids | nums | 要添加的目标稿件avid | 必要 | 多个使用","(%2C)分隔 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---------------------- | +| cid | num | 频道id | 必要 | | +| aids | nums | 要添加的目标稿件avid | 必要 | 多个使用","(%2C)分隔 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-------|------------|----------------------------------------------------------------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
-404:无此项
53003:本频道里的视频已满
53006:提交视频已失效或频道里有(非该视频UP主) | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | array | 出错稿件avid列表 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ----- | ---------------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
-404:无此项
53003:本频道里的视频已满
53006:提交视频已失效或频道里有(非该视频UP主) | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | array | 出错稿件avid列表 | | `data`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|---------------|-----| -| 0 | num | 出错稿件avid1 | | -| n | num | 出错稿件avid(n+1) | | -| …… | num | …… | …… | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ------------------- | ---- | +| 0 | num | 出错稿件avid1 | | +| n | num | 出错稿件avid(n+1) | | +| …… | num | …… | …… | **示例:** 向频道`138995`中添加视频`av583785685`和`av243322853` ```shell -curl 'https://api.bilibili.com/x/space/channel/video/add' \ +curl 'http://api.bilibili.com/x/space/channel/video/add' \ --data-urlencode 'cid=138995' \ --data-urlencode 'aids=583785685,243322853' \ --data-urlencode 'csrf=xxx' \ @@ -3836,10 +2583,10 @@ curl 'https://api.bilibili.com/x/space/channel/video/add' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": [] + "code": 0, + "message": "0", + "ttl": 1, + "data": [] } ``` @@ -3847,7 +2594,7 @@ curl 'https://api.bilibili.com/x/space/channel/video/add' \ ### 频道删除视频 -> https://api.bilibili.com/x/space/channel/video/del +> http://api.bilibili.com/x/space/channel/video/del *请求方式:POST* @@ -3857,27 +2604,28 @@ curl 'https://api.bilibili.com/x/space/channel/video/add' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|--------------|-----|-----| -| cid | num | 频道id | 必要 | | -| aid | num | 要删除的目标稿件avid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ---- | +| cid | num | 频道id | 必要 | | +| aid | num | 要删除的目标稿件avid | 必要 | | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|-------------------------------------------------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
-404:无此项
53008:频道内没有视频
53009:频道内没有该视频 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
-404:无此项
53008:频道内没有视频
53009:频道内没有该视频 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | **示例:** 删除频道`138995`中的视频`av583785685` ```shell -curl 'https://api.bilibili.com/x/space/channel/video/del' \ +curl 'http://api.bilibili.com/x/space/channel/video/del' \ --data-urlencode 'cid=138995' \ --data-urlencode 'aid=583785685' \ --data-urlencode 'csrf=xxx' \ @@ -3889,9 +2637,9 @@ curl 'https://api.bilibili.com/x/space/channel/video/del' \ ```json { - "code": 0, - "message": "0", - "ttl": 1 + "code": 0, + "message": "0", + "ttl": 1 } ``` @@ -3899,7 +2647,7 @@ curl 'https://api.bilibili.com/x/space/channel/video/del' \ ### 调整频道视频排序 -> https://api.bilibili.com/x/space/channel/video/sort +> http://api.bilibili.com/x/space/channel/video/sort *请求方式:POST* @@ -3907,29 +2655,29 @@ curl 'https://api.bilibili.com/x/space/channel/video/del' \ **正文参数( application/x-www-form-urlencoded ):** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------|-----|----------------------|-----|-----------------------------------------| -| cid | num | 频道id | 必要 | | -| aid | num | 要移动的目标稿件avid | 必要 | | -| to | num | 视频排序倒数位置 | 非必要 | 默认为1
1为列表底部,视频总数为首端
与显示顺序恰好相反 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ------------------------ | ------ | ------------------------------------------------------------ | +| cid | num | 频道id | 必要 | | +| aid | num | 要移动的目标稿件avid | 必要 | | +| to | num | 视频排序倒数位置 | 非必要 | 默认为1
1为列表底部,视频总数为首端
与显示顺序恰好相反 | +| csrf | str | CSRF Token(位于cookie) | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|--------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | **示例:** 调整`138995`中的视频`av583785685`位置为倒数第2 ```shell -curl 'https://api.bilibili.com/x/space/channel/video/sort' \ +curl 'http://api.bilibili.com/x/space/channel/video/sort' \ --data-urlencode 'cid=138995' \ --data-urlencode 'aid=583785685' \ --data-urlencode 'to=2' \ @@ -3942,9 +2690,9 @@ curl 'https://api.bilibili.com/x/space/channel/video/sort' \ ```json { - "code": 0, - "message": "0", - "ttl": 1 + "code": 0, + "message": "0", + "ttl": 1 } ``` @@ -3952,7 +2700,7 @@ curl 'https://api.bilibili.com/x/space/channel/video/sort' \ ### 检查频道中有无失效视频 -> https://api.bilibili.com/x/space/channel/video/check +> http://api.bilibili.com/x/space/channel/video/check *请求方式:GET* @@ -3960,26 +2708,26 @@ curl 'https://api.bilibili.com/x/space/channel/video/sort' \ **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|--------|-----|-----| -| cid | num | 目标频道id | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ---------- | ------ | ---- | +| cid | num | 目标频道id | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|-----------------------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误
-404:无此项
53005:频道内有失效视频 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误
-404:无此项
53005:频道内有失效视频 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | **示例:** 检查频道`138995` ```shell -curl -G 'https://api.bilibili.com/x/space/channel/video/check +curl -G 'http://api.bilibili.com/x/space/channel/video/check --data-urlencode 'cid=138995' \ -b 'SESSDATA=xxx' ``` @@ -3989,9 +2737,9 @@ curl -G 'https://api.bilibili.com/x/space/channel/video/check ```json { - "code": 0, - "message": "0", - "ttl": 1 + "code": 0, + "message": "0", + "ttl": 1 } ``` @@ -3999,11 +2747,11 @@ curl -G 'https://api.bilibili.com/x/space/channel/video/check ## 收藏 - + ### 查询用户创建的视频收藏夹 -> https://api.bilibili.com/x/v3/fav/folder/created/list-all +> http://api.bilibili.com/x/v3/fav/folder/created/list-all *请求方式:GET* @@ -4013,62 +2761,62 @@ curl -G 'https://api.bilibili.com/x/space/channel/video/check **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|--------|-----|---------|-----|-----| -| up_mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| up_mid | num | 目标用户mid | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----------------------|------|---------------------| -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | 隐藏时:null
公开时:obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ----------------------------- | -------- | --------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | 隐藏时:null
公开时:obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-----------------------------|---------|-----| -| count | num | 创建的收藏夹数 | | -| list | 无收藏夹时:null
有收藏夹时:array | 收藏夹列表 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | --------------------------------------- | -------------- | ---- | +| count | num | 创建的收藏夹数 | | +| list | 无收藏夹时:null
有收藏夹时:array | 收藏夹列表 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|----------|----------------| -| 0 | obj | 收藏夹1 | | -| n | obj | 收藏夹(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | --------------------- | +| 0 | obj | 收藏夹1 | | +| n | obj | 收藏夹(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | | `data`中的`list`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|-------------|-----|-----------|-----------| -| id | num | 收藏夹mlid | | -| fid | num | 原始收藏夹mlid | 去除两位mid尾号 | -| mid | num | 创建用户mid | | -| attr | num | 收藏夹属性位配置 | | -| title | str | 收藏夹标题 | | -| fav_state | num | 0 | 作用尚不明确 | -| media_count | num | 收藏夹总计视频数 | | +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | ---------------- | --------------- | +| id | num | 收藏夹mlid | | +| fid | num | 原始收藏夹mlid | 去除两位mid尾号 | +| mid | num | 创建用户mid | | +| attr | num | 收藏夹属性位配置 | | +| title | str | 收藏夹标题 | | +| fav_state | num | 0 | 作用尚不明确 | +| media_count | num | 收藏夹总计视频数 | | `attr`属性位二进制值表: -| 位 | 内容 | 备注 | -|-----------|----------|----------------------| -| 0 | 是否为默认收藏夹 | 0:默认收藏夹
1:其他收藏夹 | -| 1 | 私有收藏夹 | 0:公开
1:私有 | -| 其他有待补充... | | | +| 位 | 内容 | 备注 | +| --------------- | ---------------- | -------------------------------- | +| 0 | 是否为默认收藏夹 | 0:默认收藏夹
1:其他收藏夹 | +| 1 | 私有收藏夹 | 0:公开
1:私有 | +| 其他有待补充... | | | **示例:** 查询用户`mid=7792521`的收藏夹列表 ```shell -curl -G 'https://api.bilibili.com/x/v3/fav/folder/created/list-all' \ +curl -G 'http://api.bilibili.com/x/v3/fav/folder/created/list-all' \ --data-urlencode 'up_mid=7792521' \ -b 'SESSDATA=xxx' ``` @@ -4078,53 +2826,53 @@ curl -G 'https://api.bilibili.com/x/v3/fav/folder/created/list-all' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "count": 5, - "list": [{ - "id": 44233921, - "fid": 442339, - "mid": 7792521, - "attr": 0, - "title": "默认收藏夹", - "fav_state": 0, - "media_count": 85 - }, { - "id": 936347621, - "fid": 9363476, - "mid": 7792521, - "attr": 22, - "title": "放假君的鬼畜私房歌", - "fav_state": 0, - "media_count": 2 - }, { - "id": 845218621, - "fid": 8452186, - "mid": 7792521, - "attr": 22, - "title": "♪一言不合就开唱♪", - "fav_state": 0, - "media_count": 4 - }, { - "id": 844998121, - "fid": 8449981, - "mid": 7792521, - "attr": 22, - "title": "个人作品精选", - "fav_state": 0, - "media_count": 25 - }, { - "id": 381779121, - "fid": 3817791, - "mid": 7792521, - "attr": 22, - "title": "鬼畜小课堂", - "fav_state": 0, - "media_count": 25 - }] - } + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "count": 5, + "list": [{ + "id": 44233921, + "fid": 442339, + "mid": 7792521, + "attr": 0, + "title": "默认收藏夹", + "fav_state": 0, + "media_count": 85 + }, { + "id": 936347621, + "fid": 9363476, + "mid": 7792521, + "attr": 22, + "title": "放假君的鬼畜私房歌", + "fav_state": 0, + "media_count": 2 + }, { + "id": 845218621, + "fid": 8452186, + "mid": 7792521, + "attr": 22, + "title": "♪一言不合就开唱♪", + "fav_state": 0, + "media_count": 4 + }, { + "id": 844998121, + "fid": 8449981, + "mid": 7792521, + "attr": 22, + "title": "个人作品精选", + "fav_state": 0, + "media_count": 25 + }, { + "id": 381779121, + "fid": 3817791, + "mid": 7792521, + "attr": 22, + "title": "鬼畜小课堂", + "fav_state": 0, + "media_count": 25 + }] + } } ``` @@ -4132,83 +2880,84 @@ curl -G 'https://api.bilibili.com/x/v3/fav/folder/created/list-all' \ ### 查询用户收藏的视频收藏夹 -> https://api.bilibili.com/x/v3/fav/folder/collected/list +> http://api.bilibili.com/x/v3/fav/folder/collected/list *请求方式:GET* **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|--------|-----|---------|-----|--------------| -| ps | num | 每页项数 | 必要 | 定义域 1 - 大于70 | -| pn | num | 页码 | 必要 | | -| up_mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| ps | num | 每页项数 | 必要 | 定义域 1 - 大于70 | +| pn | num | 页码 | 必要 | | +| up_mid | num | 目标用户mid | 必要 | | +| platform | str | 平台类型 | 非必要 | 填写web 返回值才会包含用户收藏的视频合集 | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----------------------|------|---------------------------------------------------------| -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
40022:签名过长 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | 隐藏时:null
公开时:obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ----------------------------- | -------- | ------------------------------------------------------------ | +| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
40022:签名过长 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | 隐藏时:null
公开时:obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-----------------------------|---------|-----| -| count | num | 创建的收藏夹数 | | -| list | 无收藏夹时:null
有收藏夹时:array | 收藏夹列表 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | --------------------------------------- | -------------- | ---- | +| count | num | 创建的收藏夹数 | | +| list | 无收藏夹时:null
有收藏夹时:array | 收藏夹列表 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|----------|----------------| -| 0 | obj | 收藏夹1 | | -| n | obj | 收藏夹(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | --------------------- | +| 0 | obj | 收藏夹1 | | +| n | obj | 收藏夹(n+1) | 项数取决于`count`的值 | +| …… | obj | …… | | `data`中的`list`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|-------------|-----|------------|----------------------------| -| id | num | 收藏夹ml | | -| fid | num | 原始收藏夹mlid | 去除两位mid尾号 | -| mid | num | 创建用户mid | | -| attr | num | 收藏夹属性 | 转换成8-bit二进制处理
详细说明见下表 | -| title | str | 收藏夹标题 | | -| cover | str | 收藏夹封面图片url | | -| upper | obj | 收藏夹创建用户信息 | | -| cover_type | num | 2 | 作用尚不明确 | -| intro | str | 空 | 作用尚不明确 | -| ctime | num | 创建时间 | 时间戳 | -| mtime | num | 审核时间 | 时间戳 | -| state | num | 0 | 作用尚不明确 | -| fav_state | num | 0 | 作用尚不明确 | -| media_count | num | 收藏夹总计视频数 | | +| 字段 | 类型 | 内容 | 备注 | +| ----------- | ---- | ------------------ | ----------------------------------------- | +| id | num | 收藏夹ml | | +| fid | num | 原始收藏夹mlid | 去除两位mid尾号 | +| mid | num | 创建用户mid | | +| attr | num | 收藏夹属性 | 转换成8-bit二进制处理
详细说明见下表 | +| title | str | 收藏夹标题 | | +| cover | str | 收藏夹封面图片url | | +| upper | obj | 收藏夹创建用户信息 | | +| cover_type | num | 2 | 作用尚不明确 | +| intro | str | 空 | 作用尚不明确 | +| ctime | num | 创建时间 | 时间戳 | +| mtime | num | 审核时间 | 时间戳 | +| state | num | 0 | 作用尚不明确 | +| fav_state | num | 0 | 作用尚不明确 | +| media_count | num | 收藏夹总计视频数 | | `attr`属性二进制值表: -| 其他有待补充... | 1:默认收藏夹 | 0:公开性 | -|-----------|----------------------|----------------| -| | 0:默认收藏夹
1:其他收藏夹 | 0:公开
1:私有 | +| 其他有待补充... | 1:默认收藏夹 | 0:公开性 | +| --------------- | -------------------------------- | -------------------- | +| | 0:默认收藏夹
1:其他收藏夹 | 0:公开
1:私有 | `data`中的`list`数组中的对象中的`upper`对象: -| 字段 | 类型 | 内容 | 备注 | -|------|-----|--------|--------| -| mid | num | 创建人mid | | -| name | str | 创建人昵称 | | -| face | str | 空 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ---- | ---------- | ------------ | +| mid | num | 创建人mid | | +| name | str | 创建人昵称 | | +| face | str | 空 | 作用尚不明确 | **示例:** 查询用户`mid=293793435`的收藏夹收藏列表 ```shell -curl -G 'https://api.bilibili.com/x/v3/fav/folder/collected/list' \ +curl -G 'http://api.bilibili.com/x/v3/fav/folder/collected/list' \ --data-urlencode 'up_mid=293793435' \ --data-urlencode 'ps=20' \ --data-urlencode 'pn=1' \ @@ -4220,51 +2969,51 @@ curl -G 'https://api.bilibili.com/x/v3/fav/folder/collected/list' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "count": 2, - "list": [{ - "id": 496307088, - "fid": 4963070, - "mid": 412466388, - "attr": 22, - "title": "入站必刷", - "cover": "http://i0.hdslb.com/bfs/archive/baae2b4050363c0ab45465b7cf696b8304fdaca8.jpg", - "upper": { - "mid": 412466388, - "name": "热门菌", - "face": "" - }, - "cover_type": 2, - "intro": "", - "ctime": 1563394571, - "mtime": 1563394571, - "state": 0, - "fav_state": 0, - "media_count": 55 - }, { - "id": 381779121, - "fid": 3817791, - "mid": 7792521, - "attr": 22, - "title": "鬼畜小课堂", - "cover": "http://i2.hdslb.com/bfs/archive/09a668cfdb38fb3a85f905c10f48a2947e36a695.jpg", - "upper": { - "mid": 7792521, - "name": "还有一天就放假了", - "face": "" - }, - "cover_type": 2, - "intro": "", - "ctime": 1553700224, - "mtime": 1557291666, - "state": 0, - "fav_state": 0, - "media_count": 25 - }] - } + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "count": 2, + "list": [{ + "id": 496307088, + "fid": 4963070, + "mid": 412466388, + "attr": 22, + "title": "入站必刷", + "cover": "http://i0.hdslb.com/bfs/archive/baae2b4050363c0ab45465b7cf696b8304fdaca8.jpg", + "upper": { + "mid": 412466388, + "name": "热门菌", + "face": "" + }, + "cover_type": 2, + "intro": "", + "ctime": 1563394571, + "mtime": 1563394571, + "state": 0, + "fav_state": 0, + "media_count": 55 + }, { + "id": 381779121, + "fid": 3817791, + "mid": 7792521, + "attr": 22, + "title": "鬼畜小课堂", + "cover": "http://i2.hdslb.com/bfs/archive/09a668cfdb38fb3a85f905c10f48a2947e36a695.jpg", + "upper": { + "mid": 7792521, + "name": "还有一天就放假了", + "face": "" + }, + "cover_type": 2, + "intro": "", + "ctime": 1553700224, + "mtime": 1557291666, + "state": 0, + "fav_state": 0, + "media_count": 25 + }] + } } ``` @@ -4272,77 +3021,77 @@ curl -G 'https://api.bilibili.com/x/v3/fav/folder/collected/list' \ ## 课程 - + ### 查询用户发布的课程列表 -> https://api.bilibili.com/pugv/app/web/season/page +> http://api.bilibili.com/pugv/app/web/season/page *请求方式:GET* **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|-------| -| mid | num | 目标用户mid | 必要 | | -| pn | num | 页码 | 非必要 | 默认为1 | -| ps | num | 每页项数 | 非必要 | 默认为20 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | -------- | +| mid | num | 目标用户mid | 必要 | | +| pn | num | 页码 | 非必要 | 默认为1 | +| ps | num | 每页项数 | 非必要 | 默认为20 | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|------------------------------------------| -| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ---------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|------|-------|------|-----| -| list | array | 课程列表 | | -| page | obj | 页面信息 | | +| 字段 | 类型 | 内容 | 备注 | +| ---- | ----- | -------- | ---- | +| list | array | 课程列表 | | +| page | obj | 页面信息 | | `data`中的`page`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|------|---------|----------------------------| +| 字段 | 类型 | 内容 | 备注 | +| ----- | ---- | -------------- | ------------------------------------- | | next | bool | 是否存在下一页 | false:最后一页
true:存在下一页 | -| num | num | 当前页码 | | -| size | num | 每页项数 | | -| total | num | 总计项数 | | +| num | num | 当前页码 | | +| size | num | 每页项数 | | +| total | num | 总计项数 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|---------|---------------| -| 0 | obj | 课程1 | | -| n | obj | 课程(n+1) | 按照目标用户的发布顺序排列 | -| …… | obj | …… | | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | -------------------------- | +| 0 | obj | 课程1 | | +| n | obj | 课程(n+1) | 按照目标用户的发布顺序排列 | +| …… | obj | …… | | `data`中的`list`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|-----------|-----|---------|----------| -| cover | str | 课程封面url | | -| ep_count | num | 课程集数 | | -| link | str | 课程页面url | 手机版页面url | -| page | num | 1 | 作用尚不明确 | -| play | num | 课程播放数 | | -| season_id | num | 课程ssid | | -| status | str | 更新状态说明 | | -| subtitle | str | 课程副标题 | | -| title | str | 课程标题 | | +| 字段 | 类型 | 内容 | 备注 | +| --------- | ---- | ------------ | ------------- | +| cover | str | 课程封面url | | +| ep_count | num | 课程集数 | | +| link | str | 课程页面url | 手机版页面url | +| page | num | 1 | 作用尚不明确 | +| play | num | 课程播放数 | | +| season_id | num | 课程ssid | | +| status | str | 更新状态说明 | | +| subtitle | str | 课程副标题 | | +| title | str | 课程标题 | | **示例:** 查询用户`mid=33683045`的课程发布列表 ```shell -curl -G 'https://api.bilibili.com/pugv/app/web/season/page' \ +curl -G 'http://api.bilibili.com/pugv/app/web/season/page' \ --data-urlencode 'mid=33683045' \ --data-urlencode 'ps=5' \ --data-urlencode 'pn=1' @@ -4353,73 +3102,73 @@ curl -G 'https://api.bilibili.com/pugv/app/web/season/page' \ ```json { - "code": 0, - "data": { - "items": [ - { - "cover": "http://i0.hdslb.com/bfs/archive/596575057885fff7f0ceff047437186cba459358.jpg", - "ep_count": 10, - "link": "https://m.bilibili.com/cheese/play/ss80", - "page": 1, - "play": 174467, - "season_id": 80, - "status": "共10期", - "subtitle": "百科全书式军事科普短视频系列", - "title": "《战忽知道》第一季" - }, - { - "cover": "http://i0.hdslb.com/bfs/archive/322aa94d27cece62d2a859caf71ac2426f29eee2.jpg", - "ep_count": 1, - "link": "https://m.bilibili.com/cheese/play/ss145", - "page": 1, - "play": 22155, - "season_id": 145, - "status": "更新至第1期", - "subtitle": "此课程为《局座:第四次工业革命来了》部分集数,请谨慎购买", - "title": "【体验课】局座讲5G:5G如何改变我们的生活?" - }, - { - "cover": "http://i0.hdslb.com/bfs/archive/b9794ac4507f8764e219df413b661b5faf499a19.jpg", - "ep_count": 10, - "link": "https://m.bilibili.com/cheese/play/ss113", - "page": 1, - "play": 49833, - "season_id": 113, - "status": "更新至第10期", - "subtitle": "百科全书式军事科普短视频系列", - "title": "《战忽知道》第二季" - }, - { - "cover": "http://i0.hdslb.com/bfs/archive/7351fcb33592a4bc7aac9f71d421b4b5ce0177d3.jpg", - "ep_count": 10, - "link": "https://m.bilibili.com/cheese/play/ss51", - "page": 1, - "play": 4981037, - "season_id": 51, - "status": "共10期", - "subtitle": "洞悉国际局势,学习战略思维", - "title": "局座的国际战略课" - }, - { - "cover": "http://i0.hdslb.com/bfs/archive/31e2a170b5a815e34f0537a2727b28f1b87dca18.jpg", - "ep_count": 10, - "link": "https://m.bilibili.com/cheese/play/ss121", - "page": 1, - "play": 30754, - "season_id": 121, - "status": "更新至第10期", - "subtitle": "百科全书式军事科普短视频系列", - "title": "《战忽知道》第三季" - } - ], - "page": { - "next": true, - "num": 1, - "size": 5, - "total": 8 - } - }, - "message": "success" + "code": 0, + "data": { + "items": [ + { + "cover": "http://i0.hdslb.com/bfs/archive/596575057885fff7f0ceff047437186cba459358.jpg", + "ep_count": 10, + "link": "https://m.bilibili.com/cheese/play/ss80", + "page": 1, + "play": 174467, + "season_id": 80, + "status": "共10期", + "subtitle": "百科全书式军事科普短视频系列", + "title": "《战忽知道》第一季" + }, + { + "cover": "http://i0.hdslb.com/bfs/archive/322aa94d27cece62d2a859caf71ac2426f29eee2.jpg", + "ep_count": 1, + "link": "https://m.bilibili.com/cheese/play/ss145", + "page": 1, + "play": 22155, + "season_id": 145, + "status": "更新至第1期", + "subtitle": "此课程为《局座:第四次工业革命来了》部分集数,请谨慎购买", + "title": "【体验课】局座讲5G:5G如何改变我们的生活?" + }, + { + "cover": "http://i0.hdslb.com/bfs/archive/b9794ac4507f8764e219df413b661b5faf499a19.jpg", + "ep_count": 10, + "link": "https://m.bilibili.com/cheese/play/ss113", + "page": 1, + "play": 49833, + "season_id": 113, + "status": "更新至第10期", + "subtitle": "百科全书式军事科普短视频系列", + "title": "《战忽知道》第二季" + }, + { + "cover": "http://i0.hdslb.com/bfs/archive/7351fcb33592a4bc7aac9f71d421b4b5ce0177d3.jpg", + "ep_count": 10, + "link": "https://m.bilibili.com/cheese/play/ss51", + "page": 1, + "play": 4981037, + "season_id": 51, + "status": "共10期", + "subtitle": "洞悉国际局势,学习战略思维", + "title": "局座的国际战略课" + }, + { + "cover": "http://i0.hdslb.com/bfs/archive/31e2a170b5a815e34f0537a2727b28f1b87dca18.jpg", + "ep_count": 10, + "link": "https://m.bilibili.com/cheese/play/ss121", + "page": 1, + "play": 30754, + "season_id": 121, + "status": "更新至第10期", + "subtitle": "百科全书式军事科普短视频系列", + "title": "《战忽知道》第三季" + } + ], + "page": { + "next": true, + "num": 1, + "size": 5, + "total": 8 + } + }, + "message": "success" } ``` @@ -4427,11 +3176,11 @@ curl -G 'https://api.bilibili.com/pugv/app/web/season/page' \ ## 订阅 - + ### 查询用户追番预览列表 -> https://space.bilibili.com/ajax/Bangumi/getList +> http://space.bilibili.com/ajax/Bangumi/getList *请求方式:GET* @@ -4443,58 +3192,58 @@ curl -G 'https://api.bilibili.com/pugv/app/web/season/page' \ **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|-----| -| mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|--------|--------------------|----------------------|-----------------------| -| status | bool | 状态 | false:失败
true:成功 | -| data | 失败:str
成功:obj | 失败:错误信息
成功:信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------ | ------------------------ | ---------------------------------- | --------------------------- | +| status | bool | 状态 | false:失败
true:成功 | +| data | 失败:str
成功:obj | 失败:错误信息
成功:信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|--------|-------|--------|--------| -| count | num | 总计追番数 | | -| pages | num | 0 | 作用尚不明确 | -| result | array | 追番预览列表 | | +| 字段 | 类型 | 内容 | 备注 | +| ------ | ----- | ------------ | ------------ | +| count | num | 总计追番数 | | +| pages | num | 0 | 作用尚不明确 | +| result | array | 追番预览列表 | | `data`中的`result`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|---------|---------------| -| 0 | obj | 追番1 | | -| n | obj | 追番(n+1) | 按照目标用户的关注顺序排列 | -| …… | obj | …… | | -| 14 | obj | 追番15 | 最后一项 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | -------------------------- | +| 0 | obj | 追番1 | | +| n | obj | 追番(n+1) | 按照目标用户的关注顺序排列 | +| …… | obj | …… | | +| 14 | obj | 追番15 | 最后一项 | `data`中的`result`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|-----------------|-----|-----------|-----------------------| -| brief | str | 简介 | | -| cover | str | 封面图片url | | -| evaluate | str | 空 | | -| favorites | num | 追番数 | | -| is_finish | num | 是否已完结 | 0:未完结
1:已完结 | -| last_ep_index | num | 0 | 作用尚不明确 | -| newest_ep_index | num | 最新一话 | 可能为0 | -| season_id | str | 番剧ssid | | -| share_url | str | 播放页面链接url | | -| title | str | 标题 | | -| total_count | num | 总计集数 | 未完结:-1
已完结:非0正整数 | +| 字段 | 类型 | 内容 | 备注 | +| --------------- | ---- | --------------- | --------------------------------- | +| brief | str | 简介 | | +| cover | str | 封面图片url | | +| evaluate | str | 空 | | +| favorites | num | 追番数 | | +| is_finish | num | 是否已完结 | 0:未完结
1:已完结 | +| last_ep_index | num | 0 | 作用尚不明确 | +| newest_ep_index | num | 最新一话 | 可能为0 | +| season_id | str | 番剧ssid | | +| share_url | str | 播放页面链接url | | +| title | str | 标题 | | +| total_count | num | 总计集数 | 未完结:-1
已完结:非0正整数 | **示例:** 查看用户`mid=14082`的追番预览列表 ```shell -curl -G 'https://space.bilibili.com/ajax/Bangumi/getList' \ +curl -G 'http://space.bilibili.com/ajax/Bangumi/getList' \ --data-urlencode 'mid=14082' \ -b 'SESSDATA=xxx' ``` @@ -4504,38 +3253,38 @@ curl -G 'https://space.bilibili.com/ajax/Bangumi/getList' \ ```json { - "status": true, - "data": { - "count": 25, - "pages": 0, - "result": [{ - "season_id": "29310", - "share_url": "http:\/\/bangumi.bilibili.com\/anime\/29310\/", - "title": "异度侵入 ID:INVADED", - "is_finish": 1, - "favorites": 3479220, - "newest_ep_index": 13, - "last_ep_index": 0, - "total_count": 13, - "cover": "http:\/\/i0.hdslb.com\/bfs\/bangumi\/image\/9bf9e66968f85b33ec3769a16c86b36dc984abbc.png", - "evaluate": "", - "brief": "本片讲述利用能检测出人们杀意的装置以及利用思想粒子做出的“井”,来探知事件真相的科幻故事。" - }, { - "season_id": "25739", - "share_url": "http:\/\/bangumi.bilibili.com\/anime\/25739\/", - "title": "关于我转生变成史莱姆这档事", - "is_finish": 1, - "favorites": 5518829, - "newest_ep_index": 0, - "last_ep_index": 0, - "total_count": 27, - "cover": "https:\/\/i0.hdslb.com\/bfs\/bangumi\/a4c0e0ccc44fe3949a734f546cf5bb07da925bad.png", - "evaluate": "", - "brief": "史莱姆生活,开始了。\n上班族的三上悟在道路上被歹徒给刺杀身亡后,回过神来发现自己转生到了异世界。\n不..." - }, - ………… - ] - } + "status": true, + "data": { + "count": 25, + "pages": 0, + "result": [{ + "season_id": "29310", + "share_url": "http:\/\/bangumi.bilibili.com\/anime\/29310\/", + "title": "异度侵入 ID:INVADED", + "is_finish": 1, + "favorites": 3479220, + "newest_ep_index": 13, + "last_ep_index": 0, + "total_count": 13, + "cover": "http:\/\/i0.hdslb.com\/bfs\/bangumi\/image\/9bf9e66968f85b33ec3769a16c86b36dc984abbc.png", + "evaluate": "", + "brief": "本片讲述利用能检测出人们杀意的装置以及利用思想粒子做出的“井”,来探知事件真相的科幻故事。" + }, { + "season_id": "25739", + "share_url": "http:\/\/bangumi.bilibili.com\/anime\/25739\/", + "title": "关于我转生变成史莱姆这档事", + "is_finish": 1, + "favorites": 5518829, + "newest_ep_index": 0, + "last_ep_index": 0, + "total_count": 27, + "cover": "http:\/\/i0.hdslb.com\/bfs\/bangumi\/a4c0e0ccc44fe3949a734f546cf5bb07da925bad.png", + "evaluate": "", + "brief": "史莱姆生活,开始了。\n上班族的三上悟在道路上被歹徒给刺杀身亡后,回过神来发现自己转生到了异世界。\n不..." + }, + ………… + ] + } } ``` @@ -4543,7 +3292,7 @@ curl -G 'https://space.bilibili.com/ajax/Bangumi/getList' \ ### 查询用户追番(追剧)明细 -> https://api.bilibili.com/x/space/bangumi/follow/list +> http://api.bilibili.com/x/space/bangumi/follow/list *请求方式:GET* @@ -4553,40 +3302,40 @@ curl -G 'https://space.bilibili.com/ajax/Bangumi/getList' \ **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|------|-----|---------|-----|----------------| -| vmid | num | 目标用户mid | 必要 | | -| pn | num | 页码 | 非必要 | 默认为1 | -| ps | num | 每页项数 | 非必要 | 默认为15 定义域1-30 | -| type | num | 查询类型 | 必要 | 1:追番
2:追剧 | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | -------------------- | +| vmid | num | 目标用户mid | 必要 | | +| pn | num | 页码 | 非必要 | 默认为1 | +| ps | num | 每页项数 | 非必要 | 默认为15 定义域1-30 | +| type | num | 查询类型 | 必要 | 1:追番
2:追剧 | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|---------|-----|------|------------------------------------------| -| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | +| 字段 | 类型 | 内容 | 备注 | +| ------- | ---- | -------- | ---------------------------------------------------------- | +| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | obj | 信息本体 | | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-------|-------|-----| -| list | array | 追番列表 | | -| pn | num | 当前页码 | | -| ps | num | 每页项数 | | -| total | num | 总计追番数 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ----- | ---------- | ---- | +| list | array | 追番列表 | | +| pn | num | 当前页码 | | +| ps | num | 每页项数 | | +| total | num | 总计追番数 | | `data`中的`list`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|---------|---------------| -| 0 | obj | 追番1 | | -| n | obj | 追番(n+1) | 按照目标用户的关注顺序排列 | -| …… | obj | …… | | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | ----------- | -------------------------- | +| 0 | obj | 追番1 | | +| n | obj | 追番(n+1) | 按照目标用户的关注顺序排列 | +| …… | obj | …… | | `data`中的`list`数组中的对象: @@ -4597,7 +3346,7 @@ curl -G 'https://space.bilibili.com/ajax/Bangumi/getList' \ 查看用户`mid=14082`的追番明细 ```shell -curl -G 'https://api.bilibili.com/x/space/bangumi/follow/list' \ +curl -G 'http://api.bilibili.com/x/space/bangumi/follow/list' \ --data-urlencode 'vmid=14082' \ --data-urlencode 'type=1' \ --data-urlencode 'ps=2' \ @@ -4610,200 +3359,204 @@ curl -G 'https://api.bilibili.com/x/space/bangumi/follow/list' \ ```json { - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "list": [{ - "season_id": 29310, - "media_id": 28224080, - "season_type": 1, - "season_type_name": "番剧", - "title": "异度侵入 ID:INVADED", - "cover": "http://i0.hdslb.com/bfs/bangumi/image/9bf9e66968f85b33ec3769a16c86b36dc984abbc.png", - "total_count": 13, - "is_finish": 1, - "is_started": 1, - "is_play": 1, - "badge": "会员专享", - "badge_type": 0, - "rights": { - "allow_review": 1, - "is_selection": 1, - "selection_style": 1 - }, - "stat": { - "follow": 3475768, - "view": 87500861, - "danmaku": 1334654, - "reply": 316632, - "coin": 835150, - "series_follow": 3475242, - "series_view": 87500861 - }, - "new_ep": { - "id": 307774, - "index_show": "全13话", - "cover": "http://i0.hdslb.com/bfs/archive/3dce2b856a7b0ea667aa288b51b7c0478fa56c4d.jpg", - "title": "13", - "long_title": "CHANNELEDⅡ", - "pub_time": "2020-03-23 00:30:00", - "duration": 1481000 - }, - "rating": { - "score": 9.8, - "count": 262589 - }, - "square_cover": "http://i0.hdslb.com/bfs/bangumi/image/664dbf039ec2da8dd982b697a108e28e87b9897e.jpg", - "season_status": 13, - "season_title": "TV", - "badge_ep": "会员", - "media_attr": 196608, - "season_attr": 0, - "evaluate": "本片讲述利用能检测出人们杀意的装置以及利用思想粒子做出的“井”,来探知事件真相的科幻故事。...", - "areas": [{ - "id": 2, - "name": "日本" - }], - "subtitle": "", - "first_ep": 307446, - "can_watch": 1, - "series": { - "series_id": 4760, - "title": "ID:INVADED", - "season_count": 1, - "new_season_id": 29310 - }, - "publish": { - "pub_time": "2020-01-06 00:30:00", - "pub_time_show": "敬请期待", - "release_date": "2020-01-06", - "release_date_show": "2020年1月6日" - }, - "mode": 2, - "section": [{ - "section_id": 39327, - "season_id": 29310, - "limit_group": 328, - "watch_platform": 15, - "copyright": "dujia", - "ban_area_show": 1 - }, { - "section_id": 39633, - "season_id": 29310, - "limit_group": 328, - "watch_platform": 15, - "type": 1, - "copyright": "dujia", - "title": "其他", - "ban_area_show": 1 - }, { - "section_id": 44101, - "season_id": 29310, - "limit_group": 316, - "watch_platform": 15, - "type": 4, - "copyright": "ugc", - "ban_area_show": 1 - }], - "url": "https://www.bilibili.com/bangumi/play/ss29310", - "follow_status": 2, - "is_new": 0, - "progress": "", - "both_follow": true - }, { - "season_id": 25739, - "media_id": 139252, - "season_type": 1, - "season_type_name": "番剧", - "title": "关于我转生变成史莱姆这档事", - "cover": "http://i0.hdslb.com/bfs/bangumi/a4c0e0ccc44fe3949a734f546cf5bb07da925bad.png", - "total_count": 27, - "is_finish": 1, - "is_started": 1, - "is_play": 1, - "badge": "会员专享", - "badge_type": 0, - "rights": { - "allow_review": 1, - "is_selection": 1, - "selection_style": 1 - }, - "stat": { - "follow": 5516519, - "view": 246739631, - "danmaku": 3802465, - "reply": 460225, - "coin": 1338958, - "series_follow": 5516535, - "series_view": 246739631 - }, - "new_ep": { - "id": 316957, - "index_show": "全27话", - "cover": "http://i0.hdslb.com/bfs/archive/81d07d1a478ce3a6209b557e14df9b9c78c42abb.jpg", - "title": "OAD03", - "long_title": "外传:利姆鲁的华丽教师生活 其一", - "pub_time": "2020-03-27 00:00:03", - "duration": 1493000 - }, - "rating": { - "score": 9.4, - "count": 83354 - }, - "square_cover": "http://i0.hdslb.com/bfs/bangumi/8d9f5b4a566d0547bc2e3f6f733b732a09c0d3d4.jpg", - "season_status": 13, - "season_title": "TV", - "badge_ep": "会员", - "media_attr": 0, - "season_attr": 0, - "evaluate": "史莱姆生活,开始了。\n上班族的三上悟在道路上被歹徒给刺杀身亡后,回过神来发现自己转生到了异世界。\n不过,自己居然是“史莱姆”!\n他在得到利姆鲁这个名字后开始了自己的史莱姆人生,随着与各个种族相处交流的...", - "areas": [{ - "id": 2, - "name": "日本" - }], - "subtitle": "", - "first_ep": 250460, - "can_watch": 1, - "series": { - "series_id": 4188, - "title": "关于我转生变成史莱姆这档事", - "season_count": 1, - "new_season_id": 25739 - }, - "publish": { - "pub_time": "2018-10-02 00:30:00", - "pub_time_show": "2018年10月02日00:30", - "release_date": "2018-10-02", - "release_date_show": "2018年10月2日" - }, - "mode": 2, - "section": [{ - "section_id": 34988, - "season_id": 25739, - "limit_group": 328, - "watch_platform": 15, - "copyright": "bilibili", - "ban_area_show": 1 - }], - "url": "https://www.bilibili.com/bangumi/play/ss25739", - "follow_status": 2, - "is_new": 0, - "progress": "", - "both_follow": true - }], - "pn": 1, - "ps": 2, - "total": 25 - } + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "list": [{ + "season_id": 29310, + "media_id": 28224080, + "season_type": 1, + "season_type_name": "番剧", + "title": "异度侵入 ID:INVADED", + "cover": "http://i0.hdslb.com/bfs/bangumi/image/9bf9e66968f85b33ec3769a16c86b36dc984abbc.png", + "total_count": 13, + "is_finish": 1, + "is_started": 1, + "is_play": 1, + "badge": "会员专享", + "badge_type": 0, + "rights": { + "allow_review": 1, + "is_selection": 1, + "selection_style": 1 + }, + "stat": { + "follow": 3475768, + "view": 87500861, + "danmaku": 1334654, + "reply": 316632, + "coin": 835150, + "series_follow": 3475242, + "series_view": 87500861 + }, + "new_ep": { + "id": 307774, + "index_show": "全13话", + "cover": "http://i0.hdslb.com/bfs/archive/3dce2b856a7b0ea667aa288b51b7c0478fa56c4d.jpg", + "title": "13", + "long_title": "CHANNELEDⅡ", + "pub_time": "2020-03-23 00:30:00", + "duration": 1481000 + }, + "rating": { + "score": 9.8, + "count": 262589 + }, + "square_cover": "http://i0.hdslb.com/bfs/bangumi/image/664dbf039ec2da8dd982b697a108e28e87b9897e.jpg", + "season_status": 13, + "season_title": "TV", + "badge_ep": "会员", + "media_attr": 196608, + "season_attr": 0, + "evaluate": "本片讲述利用能检测出人们杀意的装置以及利用思想粒子做出的“井”,来探知事件真相的科幻故事。...", + "areas": [{ + "id": 2, + "name": "日本" + }], + "subtitle": "", + "first_ep": 307446, + "can_watch": 1, + "series": { + "series_id": 4760, + "title": "ID:INVADED", + "season_count": 1, + "new_season_id": 29310 + }, + "publish": { + "pub_time": "2020-01-06 00:30:00", + "pub_time_show": "敬请期待", + "release_date": "2020-01-06", + "release_date_show": "2020年1月6日" + }, + "mode": 2, + "section": [{ + "section_id": 39327, + "season_id": 29310, + "limit_group": 328, + "watch_platform": 15, + "copyright": "dujia", + "ban_area_show": 1 + }, { + "section_id": 39633, + "season_id": 29310, + "limit_group": 328, + "watch_platform": 15, + "type": 1, + "copyright": "dujia", + "title": "其他", + "ban_area_show": 1 + }, { + "section_id": 44101, + "season_id": 29310, + "limit_group": 316, + "watch_platform": 15, + "type": 4, + "copyright": "ugc", + "ban_area_show": 1 + }], + "url": "https://www.bilibili.com/bangumi/play/ss29310", + "follow_status": 2, + "is_new": 0, + "progress": "", + "both_follow": true + }, { + "season_id": 25739, + "media_id": 139252, + "season_type": 1, + "season_type_name": "番剧", + "title": "关于我转生变成史莱姆这档事", + "cover": "http://i0.hdslb.com/bfs/bangumi/a4c0e0ccc44fe3949a734f546cf5bb07da925bad.png", + "total_count": 27, + "is_finish": 1, + "is_started": 1, + "is_play": 1, + "badge": "会员专享", + "badge_type": 0, + "rights": { + "allow_review": 1, + "is_selection": 1, + "selection_style": 1 + }, + "stat": { + "follow": 5516519, + "view": 246739631, + "danmaku": 3802465, + "reply": 460225, + "coin": 1338958, + "series_follow": 5516535, + "series_view": 246739631 + }, + "new_ep": { + "id": 316957, + "index_show": "全27话", + "cover": "http://i0.hdslb.com/bfs/archive/81d07d1a478ce3a6209b557e14df9b9c78c42abb.jpg", + "title": "OAD03", + "long_title": "外传:利姆鲁的华丽教师生活 其一", + "pub_time": "2020-03-27 00:00:03", + "duration": 1493000 + }, + "rating": { + "score": 9.4, + "count": 83354 + }, + "square_cover": "http://i0.hdslb.com/bfs/bangumi/8d9f5b4a566d0547bc2e3f6f733b732a09c0d3d4.jpg", + "season_status": 13, + "season_title": "TV", + "badge_ep": "会员", + "media_attr": 0, + "season_attr": 0, + "evaluate": "史莱姆生活,开始了。\n上班族的三上悟在道路上被歹徒给刺杀身亡后,回过神来发现自己转生到了异世界。\n不过,自己居然是“史莱姆”!\n他在得到利姆鲁这个名字后开始了自己的史莱姆人生,随着与各个种族相处交流的...", + "areas": [{ + "id": 2, + "name": "日本" + }], + "subtitle": "", + "first_ep": 250460, + "can_watch": 1, + "series": { + "series_id": 4188, + "title": "关于我转生变成史莱姆这档事", + "season_count": 1, + "new_season_id": 25739 + }, + "publish": { + "pub_time": "2018-10-02 00:30:00", + "pub_time_show": "2018年10月02日00:30", + "release_date": "2018-10-02", + "release_date_show": "2018年10月2日" + }, + "mode": 2, + "section": [{ + "section_id": 34988, + "season_id": 25739, + "limit_group": 328, + "watch_platform": 15, + "copyright": "bilibili", + "ban_area_show": 1 + }], + "url": "https://www.bilibili.com/bangumi/play/ss25739", + "follow_status": 2, + "is_new": 0, + "progress": "", + "both_follow": true + }], + "pn": 1, + "ps": 2, + "total": 25 + } } ```
+ + + + ### 查询用户关注的TAG(话题) -> https://space.bilibili.com/ajax/tags/getSubList +> http://space.bilibili.com/ajax/tags/getSubList *请求方式:GET* @@ -4817,52 +3570,52 @@ curl -G 'https://api.bilibili.com/x/space/bangumi/follow/list' \ **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -|-----|-----|---------|-----|-----| -| mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------ | ---- | ----------- | ------ | ---- | +| mid | num | 目标用户mid | 必要 | | **json回复:** 根对象: -| 字段 | 类型 | 内容 | 备注 | -|--------|----------------------|------------------------|-----------------------| -| ststus | bool | 返回值 | false:错误
true:正确 | -| data | 错误时:str
正确时:obj | 错误时:错误信息
正确时:数据本体 | 正确时不返回错误信息 | +| 字段 | 类型 | 内容 | 备注 | +| ------ | ---------------------------- | -------------------------------------- | --------------------------- | +| ststus | bool | 返回值 | false:错误
true:正确 | +| data | 错误时:str
正确时:obj | 错误时:错误信息
正确时:数据本体 | 正确时不返回错误信息 | `data`对象: -| 字段 | 类型 | 内容 | 备注 | -|-------|-------|---------|-----| -| tags | array | 关注TAG列表 | | -| count | num | 关注TAG的数 | | +| 字段 | 类型 | 内容 | 备注 | +| ----- | ----- | ----------- | ---- | +| tags | array | 关注TAG列表 | | +| count | num | 关注TAG的数 | | `data`中的`tags`数组: -| 项 | 类型 | 内容 | 备注 | -|-----|-----|------------|------| -| 0 | obj | 关注TAG1 | | -| n | obj | 关注TAG(n+1) | | -| …… | obj | …… | …… | -| 99 | obj | 关注TAG100 | 最后一项 | +| 项 | 类型 | 内容 | 备注 | +| ---- | ---- | -------------- | -------- | +| 0 | obj | 关注TAG1 | | +| n | obj | 关注TAG(n+1) | | +| …… | obj | …… | …… | +| 99 | obj | 关注TAG100 | 最后一项 | `data`中的`tags`数组中的对象: -| 字段 | 类型 | 内容 | 备注 | -|---------------|-----|---------------------|--------| -| archive_count | num | 0 | 作用尚不明确 | -| cover | str | TAG图片url | 无则为空 | -| name | str | TAG名 | | -| notify | num | 1 | 作用尚不明确 | -| tag_id | num | tag_id | | -| updated_ts | str | 1970-01-01 08:00:00 | 作用尚不明确 | +| 字段 | 类型 | 内容 | 备注 | +| ------------- | ---- | ------------------- | ------------ | +| archive_count | num | 0 | 作用尚不明确 | +| cover | str | TAG图片url | 无则为空 | +| name | str | TAG名 | | +| notify | num | 1 | 作用尚不明确 | +| tag_id | num | tag_id | | +| updated_ts | str | 1970-01-01 08:00:00 | 作用尚不明确 | **示例:** 查询用户`mid=2`的关注TAG ```shell -curl -G 'https://space.bilibili.com/ajax/tags/getSubList' \ +curl -G 'http://space.bilibili.com/ajax/tags/getSubList' \ --data-urlencode 'mid=2' \ -b 'SESSDATA=xxx' ``` @@ -4872,27 +3625,27 @@ curl -G 'https://space.bilibili.com/ajax/tags/getSubList' \ ```json { - "status": true, - "data": { - "tags": [{ - "name": "豪宅", - "cover": "", - "tag_id": 47637, - "notify": 1, - "archive_count": 0, - "updated_ts": "1970-01-01 08:00:00" - }, { - "name": "死亡搁浅", - "cover": "", - "tag_id": 1737239, - "notify": 1, - "archive_count": 0, - "updated_ts": "1970-01-01 08:00:00" - }, - ………… - ], - "count": 58 - } + "status": true, + "data": { + "tags": [{ + "name": "豪宅", + "cover": "", + "tag_id": 47637, + "notify": 1, + "archive_count": 0, + "updated_ts": "1970-01-01 08:00:00" + }, { + "name": "死亡搁浅", + "cover": "", + "tag_id": 1737239, + "notify": 1, + "archive_count": 0, + "updated_ts": "1970-01-01 08:00:00" + }, + ………… + ], + "count": 58 + } } ``` diff --git a/用户/space.md b/用户/space.md deleted file mode 100644 index 74f5f8c..0000000 --- a/用户/space.md +++ /dev/null @@ -1,3652 +0,0 @@ -# 用户空间相关 - -- [主页](#主页) - - [置顶视频](#置顶视频) - - [查询用户置顶视频](#查询用户置顶视频) - - [设置置顶视频](#设置置顶视频) - - [取消置顶视频](#取消置顶视频) - - [代表作视频](#代表作视频) - - [查询用户代表作视频列表](#查询用户代表作视频列表) - - [添加代表作视频](#添加代表作视频) - - [删除代表作视频](#删除代表作视频) - - [个人TAG](#个人TAG) - - [查看用户个人TAG](#查看用户个人TAG) - - [修改个人TAG](#修改个人TAG) - - [空间公告](#空间公告) - - [查看用户空间公告](#查看用户空间公告) - - [修改空间公告](#修改空间公告) - - [主页板块布局与权限](#主页板块布局与权限) - - [查询空间设置](#查询空间设置) - - [调整空间板块布局](#调整空间板块布局) - - [修改空间隐私权限](#修改空间隐私权限) - - [查询用户最近玩过的游戏](#查询用户最近玩过的游戏) - - [获取用户最近投币的视频明细](#获取用户最近投币的视频明细) -- [投稿](#投稿) - - [查询用户投稿视频明细](#查询用户投稿视频明细) - - [查询用户投稿相簿预览](#查询用户投稿相簿预览) - - [查询用户投稿相簿明细](#查询用户投稿相簿明细) -- [频道](#频道) - - [查询用户频道列表](#查询用户频道列表) - - [查询用户频道中的视频](#查询用户频道中的视频) - - [创建频道](#创建频道) - - [修改频道](#修改频道) - - [删除频道](#删除频道) - - [频道添加视频](#频道添加视频) - - [频道删除视频](#频道删除视频) - - [调整频道视频排序](#调整频道视频排序) - - [检查频道中有无失效视频](#检查频道中有无失效视频) -- [收藏](#收藏) - - [查询用户创建的视频收藏夹](#查询用户创建的视频收藏夹) - - [查询用户收藏的视频收藏夹](#查询用户收藏的视频收藏夹) -- [课程](#课程) - - [查询用户发布的课程列表](#查询用户发布的课程列表) -- [订阅](#订阅) - - [查询用户追番预览列表](#查询用户追番预览列表) - - [查询用户追番(追剧)明细](#查询用户追番(追剧)明细) - - [查询用户关注的TAG(话题)](#查询用户关注的TAG(话题)) - ---- - -## 主页 - - - -### 置顶视频 - -#### 查询用户置顶视频 - ->http://api.bilibili.com/x/space/top/arc - -*请求方式:GET* - -粉丝在其主页上可见 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| vmid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ---------------------------------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
53016:没有置顶视频 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----------- | ---- | ------------------------------ | ------------------------------------------------------------ | -| aid | num | 稿件avid | | -| videos | num | 视频分P总数 | 默认为1 | -| tid | num | 分区tid | | -| tname | str | 子分区名称 | | -| copyright | num | 是否转载 | 1:原创
2:转载 | -| pic | str | 视频封面图片url | | -| title | str | 稿件标题 | | -| pubdate | num | 稿件发布时间 | 时间戳 | -| ctime | num | 用户提交稿件的时间 | 时间戳 | -| desc | str | 视频简介 | | -| state | num | 视频状态 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`state`备注 | -| attribute | num | 稿件属性位配置 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`attribute`备注 | -| duration | num | 视频总计持续时长(所有分P) | 单位为秒 | -| rights | obj | 视频属性标志 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`rights`对象 | -| owner | obj | 视频UP主信息 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`owner`对象 | -| stat | obj | 视频状态数 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`stat`对象 | -| dynamic | str | 视频同步发布的的动态的文字内容 | 无为空 | -| cid | num | 视频1P cid | | -| dimension | obj | 视频1P分辨率 | 略,见[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的`dimension`对象 | -| bvid | str | 稿件bvid | | -| reason | str | 置顶视频备注 | | -| inter_video | bool | 是否为合作视频 | false:否
true:是 | - -**示例:** - -查询用户`mid=23215368`的置顶视频 - -```shell -curl -G 'http://api.bilibili.com/x/space/top/arc' \ ---data-urlencode 'vmid=23215368' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "aid": 37896701, - "videos": 1, - "tid": 28, - "tname": "原创音乐", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/cc9e72822d68fffdd0406144f1b5348a13c89652.jpg", - "title": "燃烧吧!铃声!把主流手机铃声编成一首曲子", - "pubdate": 1544469671, - "ctime": 1544469671, - "desc": "各品牌的手机铃声大合奏,毫无违和感~", - "state": 0, - "attribute": 16768, - "duration": 208, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 23215368, - "name": "Wayjon冰冰酱", - "face": "http://i2.hdslb.com/bfs/face/7c9715f1768191137eb7ebf91918ca0f99532012.jpg" - }, - "stat": { - "aid": 37896701, - "view": 1058237, - "danmaku": 16821, - "reply": 3725, - "favorite": 76888, - "coin": 100694, - "share": 17091, - "now_rank": 0, - "his_rank": 0, - "like": 90521, - "dislike": 0 - }, - "dynamic": "#编曲##FL##纯音乐#", - "cid": 66621209, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV18t411q7zz", - "reason": "", - "inter_video": false - } -} -``` - -
- -#### 设置置顶视频 - -> http://api.bilibili.com/x/space/top/arc/set - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------------ | -------------------------------- | -| aid | num | 置顶目标稿件avid | 必要(可选) | avid与bvid任选一个 | -| bvid | str | 置顶目标稿件bvid | 必要(可选) | avid与bvid任选一个 | -| reason | str | 置顶视频备注 | 非必要 | 置顶备注最大40字符
默认为空 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-304:未修改
-400:请求错误
53014:稿件已失效
53015:备注过长
53017:置顶非自己的稿件 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | - -**示例:** - -置顶视频`av98948772`/`BV1n741127LD` - -avid方式: - -```shell -curl 'http://api.bilibili.com/x/space/top/arc/set' \ ---data-urlencode 'aid=98948772' \ --b 'SESSDATA=xxx' -``` - -bvid方式: - -```shell -curl 'http://api.bilibili.com/x/space/top/arc/set' \ ---data-urlencode 'bvid=BV1n741127LD' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -#### 取消置顶视频 - -> http://api.bilibili.com/x/space/top/arc/cancel - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------ | ---- | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误(重复取消) | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | - -**示例:** - -```shell -curl 'http://api.bilibili.com/x/space/top/arc/cancel' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -### 代表作视频 - -#### 查询用户代表作视频列表 - -> http://api.bilibili.com/x/space/masterpiece - -*请求方式:GET* - -新访客在其主页上可见 - -最多可以设置3个 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| vmid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ------ | ---------- | --------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | array | 代表作列表 | | - -`data`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ------- | ------------------------- | -| 0 | obj | 代表作1 | 无则为空 | -| 1 | obj | 代表作2 | 无则为空 | -| 2 | obj | 代表作3 | 无则为空
最多设置3个 | - -`data`数组中的对象: - -同[查询用户置顶视频](#查询用户置顶视频)中的`data`对象 - -**示例:** - -查询用户`mid=23215368`的代表作视频列表 - -```shell -curl -G 'http://api.bilibili.com/x/space/masterpiece' \ ---data-urlencode 'vmid=23215368' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": [{ - "aid": 37896701, - "videos": 1, - "tid": 28, - "tname": "原创音乐", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/cc9e72822d68fffdd0406144f1b5348a13c89652.jpg", - "title": "燃烧吧!铃声!把主流手机铃声编成一首曲子", - "pubdate": 1544469671, - "ctime": 1544469671, - "desc": "各品牌的手机铃声大合奏,毫无违和感~", - "state": 0, - "attribute": 16768, - "duration": 208, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 23215368, - "name": "Wayjon冰冰酱", - "face": "http://i2.hdslb.com/bfs/face/7c9715f1768191137eb7ebf91918ca0f99532012.jpg" - }, - "stat": { - "aid": 37896701, - "view": 1058241, - "danmaku": 16821, - "reply": 3725, - "favorite": 76888, - "coin": 100694, - "share": 17091, - "now_rank": 0, - "his_rank": 0, - "like": 90521, - "dislike": 0 - }, - "dynamic": "#编曲##FL##纯音乐#", - "cid": 66621209, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV18t411q7zz", - "reason": "", - "inter_video": false - }, { - "aid": 39596658, - "videos": 1, - "tid": 21, - "tname": "日常", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/431e51d0e40e3461e1c1b0f59c755ae8843b1adb.jpg", - "title": "MY2018 - 纪念我的2018年", - "pubdate": 1546328392, - "ctime": 1546328392, - "desc": "", - "state": 0, - "attribute": 16768, - "duration": 239, - "mission_id": 10996, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 23215368, - "name": "Wayjon冰冰酱", - "face": "http://i2.hdslb.com/bfs/face/7c9715f1768191137eb7ebf91918ca0f99532012.jpg" - }, - "stat": { - "aid": 39596658, - "view": 1518, - "danmaku": 16, - "reply": 40, - "favorite": 22, - "coin": 60, - "share": 9, - "now_rank": 0, - "his_rank": 0, - "like": 112, - "dislike": 0 - }, - "dynamic": "#vlog##记录##生活记录#", - "cid": 69561078, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV1Jt411B7La", - "reason": "", - "inter_video": false - }, { - "aid": 44721369, - "videos": 1, - "tid": 28, - "tname": "原创音乐", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/9887797402599c42f74a7624f3db4a92a0ebf465.jpg", - "title": "【铃声串烧系列】华米两开花;中华有为,国之荣耀!把主流手机铃声编成一首曲子", - "pubdate": 1551128445, - "ctime": 1551128445, - "desc": "把主流手机铃声编成一首曲子,这一版用华为的铃声作为主旋律,毫无违和感~伴随着2019mwc的开幕,希望国产厂商能获得全世界的目光,并且将属于中国人的科技自信传递到全世界!", - "state": 0, - "attribute": 16768, - "duration": 174, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 23215368, - "name": "Wayjon冰冰酱", - "face": "http://i2.hdslb.com/bfs/face/7c9715f1768191137eb7ebf91918ca0f99532012.jpg" - }, - "stat": { - "aid": 44721369, - "view": 306757, - "danmaku": 7713, - "reply": 1520, - "favorite": 17216, - "coin": 16489, - "share": 2917, - "now_rank": 0, - "his_rank": 0, - "like": 21439, - "dislike": 0 - }, - "dynamic": "#铃声##纯音乐##音乐#【铃声串烧】Mix Ringtones!船新的版本来啦!这一版用华为的铃声作为主旋律,毫无违和感~伴随着2019mwc的开幕,希望国产厂商能获得全世界的目光,并且将属于中国人的科技自信传递到全世界!", - "cid": 78290138, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV1vb411879C", - "reason": "", - "inter_video": false - }] -} -``` - -
- -#### 添加代表作视频 - -> http://api.bilibili.com/x/space/masterpiece/add - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -代表作上限为3个稿件 - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------------ | -------------------------------- | -| aid | num | 置顶目标稿件avid | 必要(可选) | avid与bvid任选一个 | -| bvid | str | 置顶目标稿件bvid | 必要(可选) | avid与bvid任选一个 | -| reason | str | 代表作备注 | 非必要 | 置顶备注最大40字符
默认为空 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53014:稿件已失效
53015:备注过长
53017:置顶非自己的稿件
53019:达到上限
53020:已经存在该稿件 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | - -**示例:** - -添加视频`av94916552`/`BV1ZE411K7ux`到代表作列表 - -avid方式: - -```shell -curl 'http://api.bilibili.com/x/space/masterpiece/add' \ ---data-urlencode 'aid=94916552' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -bvid方式: - -```shell -curl 'http://api.bilibili.com/x/space/masterpiece/add' \ ---data-urlencode 'bvid=BV1ZE411K7ux' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -#### 删除代表作视频 - -> http://api.bilibili.com/x/space/masterpiece/cancel - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------------ | ------------------ | -| aid | num | 要删除的目标稿件avid | 必要(可选) | avid与bvid任选一个 | -| bvid | str | 要删除的目标稿件bvid | 必要(可选) | avid与bvid任选一个 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53021:置顶列表中没有该视频 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | 作用尚不明确 | - -**示例:** - -删除置顶视频`av59765630`/`BV1Yt41137T6` - -avid方式: - -```shell -curl 'api.bilibili.com/x/space/masterpiece/cancel' \ ---data-urlencode 'aid=59765630' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -bvid方式: - -```shell -curl 'http://api.bilibili.com/x/space/masterpiece/cancel' \ ---data-urlencode 'bvid=BV1Yt41137T6' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -### 个人TAG - -#### 查看用户个人TAG - -> http://api.bilibili.com/x/space/acc/tags - -*请求方式:GET* - -上限5条,且内容由用户自定义 - -带有转义 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| mid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ----- | -------- | --------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | array | 信息本体 | | - -`data`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | -------- | ------------- | -| 0 | obj | 套了个娃 | 只有1项??? | - -`data`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ----- | ----------- | ---- | -| mid | num | 目标用户mid | | -| tags | array | TAG名称 | | - -`data`数组中的对象中的`tags`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | -------- | ------- | -| 0 | str | TAG1 | | -| n | str | TAG(n+1) | | -| …… | str | …… | | -| 4 | str | TAG5 | 上限5条 | - -**示例:** - -查看用户`mid=53456`的个人TAG - -```shell -curl -G 'http://api.bilibili.com/x/space/acc/tags' \ ---data-urlencode 'mid=53456' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": [ - { - "mid": 53456, - "tags": [ - "游戏", - "音乐", - "warma", - "搞笑", - "动画" - ] - } - ] -} -``` - -
- -#### 修改个人TAG - -> http://api.bilibili.com/x/space/acc/tags/set - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -鉴权方式:Cookie中`DedeUserID`存在且不为0 - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------ | ------------------------------------------------------------ | -| tags | strs | 要设置的TAG内容 | 非必要 | 删除公告留空或省去即可
各TAG长度小于10字符
最多5个TAG
各TAG之间用","(%2C)分隔
重复TAG无效 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误(超出长度限制) | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | - -**示例:** - -修改个人TAG为`minecraft,技术宅,大佬,小哥哥,可爱` - -```shell -curl 'http://api.bilibili.com/x/space/acc/tags/set' \ ---data-urlencode 'tags=minecraft,技术宅,大佬,小哥哥,可爱' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx;DedeUserID=1' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -### 空间公告 - -#### 查看用户空间公告 - -> http://api.bilibili.com/x/space/notice - -*请求方式:GET* - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| mid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | --------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | str | 公告信息 | 无则为空 | - -**示例:** - -查看用户`mid=53456`的空间公告 - -```shell -curl -G 'http://api.bilibili.com/x/space/notice' \ ---data-urlencode 'mid=53456' -``` - -
-查看响应示例: - -```json -{ - "code":0, - "message":"0", - "ttl":1, - "data":"我的微博 @_warma_\n直播录像上传到:warma养鸽场\n头像画师是:微博@Dr-H_喵_\n横幅画师:@薬屋" -} -``` - -
- -#### 修改空间公告 - -> http://api.bilibili.com/x/space/notice/set - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------ | --------------------------------------- | -| notice | str | 要设置的公告内容 | 非必要 | 删除公告留空或省去即可
少于150字符 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-304:未修改
-400:请求错误(超出长度限制) | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | 作用尚不明确 | - -**示例:** - -修改个人空间公告为`鸽子` - -```shell -curl 'http://api.bilibili.com/x/space/notice/set' \ ---data-urlencode 'notice=鸽子' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -### 主页板块布局与权限 - -#### 查询空间设置 - -> http://space.bilibili.com/ajax/settings/getSettings - -*请求方式:GET* - -注:带有转义 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| mid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------ | ------------------- | -------- | ---- | -| status | bool | 用户是否存在 | true:存在
false:不存在 | -| data | 用户存在时:obj
用户不存在时:str| 用户存在时:信息本体
用户不存在时:错误信息 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---------------------- | ----- | ---------------- | ------------ | -| privacy | obj | 空间隐私权限 | | -| index_order | array | 空间板块布局 | | -| theme | str | default主题? | 作用尚不明确 | -| theme_preview_img_path | str | 主题预览图路径? | 作用尚不明确 | -| toutu | obj | 空间头图 | | - -`privacy`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----------- | ---- | -------------- | ------------------------------ | -| bangumi | num | 追番及追剧 | 0:隐藏
1:公开
**下同** | -| bbq | num | 轻视频 | | -| channel | num | 频道 | | -| coins_video | num | 最近投币的视频 | | -| comic | num | 追漫 | | -| dress_up | num | 装扮 | | -| fav_video | num | 收藏夹 | | -| groups | num | 圈子? | 作用尚不明确 | -| likes_video | num | 最近点赞的视频 | | -| played_game | num | 最近玩过的游戏 | | -| tags | num | 订阅标签 | | -| user_info | num | 个人资料 | | - -`index_order`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------- | -------------------------------------------- | -| 0 | obj | 板块1 | 根据板块布局顺序排序
先左侧布局后右侧布局 | -| n | obj | 板块(n+1) | | -| …… | obj | …… | …… | - -`index_order`数组内对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | -------- | ---- | -| id | num | 板块编号 | | -| name | str | 板块名称 | | - -`toutu`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------------- | ---- | -------------------- | -------------------------------------------------- | -| sid | num | 空间头图ID | | -| expire | num | 到期时间? | 时间戳?
作用尚不明确 | -| s_img | str | 空间头图小图相对路径 | 完整url为`http://i0.hdslb.com/`+相对路径 | -| l_img | str | 空间头图相对路径 | **同上** | -| android_img | str | 空 | 注:**手机端头图与web端不同,需要用另一个api获取** | -| iphone_img | str | 空 | | -| ipad_img | str | 空 | | -| thumbnail_img | str | 缩略图 | | -| platform | num | 0 | 作用尚不明确 | - -**示例:** - -查看`mid=2`的空间设置 - -```shell -curl -G 'http://space.bilibili.com/ajax/settings/getSettings' \ ---data-urlencode 'mid=2' -``` - -
-查看响应示例: - -```json -{ - "status":true, - "data":{ - "privacy":{ - "bangumi":1, - "bbq":1, - "channel":1, - "coins_video":0, - "comic":1, - "dress_up":1, - "fav_video":0, - "groups":0, - "likes_video":0, - "played_game":1, - "tags":1, - "user_info":1 - }, - "index_order":[ - { - "id":1, - "name":"我的稿件" - }, - { - "id":8, - "name":"我的专栏" - }, - { - "id":7, - "name":"我的频道" - }, - { - "id":2, - "name":"我的收藏夹" - }, - { - "id":3, - "name":"订阅番剧" - }, - { - "id":4, - "name":"订阅标签" - }, - { - "id":5, - "name":"最近投币的视频" - }, - { - "id":6, - "name":"我的圈子" - }, - { - "id":9, - "name":"我的相簿" - }, - { - "id":21, - "name":"公告" - }, - { - "id":22, - "name":"直播间" - }, - { - "id":23, - "name":"个人资料" - }, - { - "id":24, - "name":"官方活动" - }, - { - "id":25, - "name":"最近玩过的游戏" - } - ], - "theme":"default", - "theme_preview_img_path":"", - "toutu":{ - "sid":1, - "expire":2861874560, - "s_img":"bfs/space/768cc4fd97618cf589d23c2711a1d1a729f42235.png", - "l_img":"bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", - "android_img":"", - "iphone_img":"", - "ipad_img":"", - "thumbnail_img":"", - "platform":0 - } - } -} -``` - -
- -#### 调整空间板块布局 - -> http://space.bilibili.com/ajax/settings/setIndexOrder - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -鉴权方式:Cookie中`DedeUserID`及`DedeUserID__ckMd5`存在且不为0,referer为 `.bilibili.com`域名下 - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ----------- | ---- | ------------------------ | ------ | ------------------------------------------------------------ | -| index_order | nums | 布局列表 | 必要 | 每个值之间用","(%2C)分隔
先左侧布局再右侧布局
值的意义见下表 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -布局参数`index_order`: - -| 值 | 含义 | -| ---- | ------------------------------------ | -| 1 | (左侧)我的稿件 | -| 2 | (左侧)我的收藏夹 | -| 3 | (左侧)订阅番剧 | -| 4 | (左侧)订阅标签 | -| 5 | (左侧)最近投币的视频 | -| 6 | (左侧)我的圈子**(此板块被隐藏)** | -| 7 | (左侧)我的频道 | -| 8 | (左侧)我的专栏 | -| 9 | (左侧)我的相簿 | -| 21 | (右侧)公告 | -| 22 | (右侧)直播间 | -| 23 | (右侧)个人资料 | -| 24 | (右侧)官方活动 | -| 25 | (右侧)最近玩的游戏 | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------ | ---- | -------- | ----------------------------------- | -| ststus | bool | 操作结果 | true:操作成功
false:操作失败 | -| data | str | 错误信息 | 正确时无此项 | - -**示例:** - -调整空间布局为: - ->我的稿件 直播间 ->我的专栏 个人资料 ->订阅番剧 公告 ->我的收藏夹 官方活动 ->我的相簿 最近玩的游戏 ->最近投币的视频 ->订阅标签 ->我的频道 - -```shell -curl 'http://space.bilibili.com/ajax/settings/setIndexOrder' \ ---data-urlencode 'index_order=1,8,3,2,9,5,4,7,22,23,21,24,25,6' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;' \ --e 'https://www.bilibili.com' -``` - -
-查看响应示例: - -```json -{ - "status": true -} -``` - -
- -#### 修改空间隐私权限 - -> http://space.bilibili.com/ajax/settings/setPrivacy - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -鉴权方式:Cookie中`DedeUserID`及`DedeUserID__ckMd5`存在且不为0,referer为 `.bilibili.com`域名下 - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ----------- | ---- | ------------------------ | ------ | ---------------------------------- | -| fav_video | num | 收藏视频 | 非必要 | 0:隐藏
1:公开
**下同** | -| bangumi | num | 追番及追剧 | 非必要 | | -| tags | num | 关注的TAG | 非必要 | | -| coins_video | num | 投币的视频 | 非必要 | | -| user_info | num | 个人信息 | 非必要 | | -| played_game | num | 玩过的游戏 | 非必要 | | -| csrf | nstr | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------ | ---- | -------- | ----------------------------------- | -| ststus | bool | 操作结果 | true:操作成功
false:操作失败 | -| data | str | 错误信息 | 正确时无此项 | - -**示例:** - -设置`关注的TAG`为隐藏 - -```shell -curl 'http://space.bilibili.com/ajax/settings/setPrivacy' \ ---data-urlencode 'tags=0' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;' \ --e 'https://www.bilibili.com' -``` - -
-查看响应示例: - -```json -{ - "status": true -} -``` - -
- -### 查询用户最近玩过的游戏 - -> http://api.bilibili.com/x/space/lastplaygame - -*请求方式:GET* - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| mid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ------------------------------- | -------- | ---------------------------------------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | 隐藏时:null
公开时:array | 信息本体 | | - -`data`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------- | ---------------- | -| 0 | obj | 游戏1 | | -| n | obj | 游戏(n+1) | 项数为总计游戏数 | -| …… | obj | …… | …… | - -`data`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | --------------- | ---- | -| website | str | 游戏主页链接url | | -| image | str | 游戏图片url | | -| name | str | 游戏名 | | - -**示例:** - -查询`mid=2`的最近玩过的游戏 - -```shell -curl -G 'http://api.bilibili.com/x/space/lastplaygame' \ ---data-urlencode 'mid=2' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": [ - { - "website": "https://game.bilibili.com/fgo/event_meihosou", - "image": "http://i0.hdslb.com/bfs/game/f7d4ee0877089e4079b8f0b4f5c95dd4ceba512a.png", - "name": "命运-冠位指定(Fate/GO)" - }, - { - "website": "https://game.bilibili.com/pcr/xxtix", - "image": "http://i0.hdslb.com/bfs/game/7922ecea5cc76fe3c8c177e1d4a6c8cf1c36a700.jpg", - "name": "公主连结Re:Dive" - }, - { - "website": "https://game.bilibili.com/dwbgx/", - "image": "http://i0.hdslb.com/bfs/game/6d5b2df70dfa987408d8d09110cdc327949885e3.png", - "name": "大王不高兴" - }, - { - "website": "https://game.bilibili.com/bangdream/1stanniversary-yxzx/", - "image": "http://i0.hdslb.com/bfs/game/4a7d0b7272dffe5a489ee935b6bd2d4f7d5f1257.png", - "name": "BanG Dream!" - }, - { - "website": "http://www.biligame.com/detail/?id=101772", - "image": "http://i0.hdslb.com/bfs/game/8e8b04e7bd2170c2ba2c9f563a62c72bac2eba2c.jpg", - "name": "明日方舟" - } - ] -} -``` - -
- -### 获取用户最近投币的视频明细 - -> http://api.bilibili.com/x/space/coin/video - -*请求方式:GET* - -认证方式:Cookie(SESSDATA) - -如设置隐私查看自己的需要认证 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| vmid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ------------------------------- | -------- | ---------------------------------------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | 隐藏时:null
公开时:array | 信息本体 | | - -`data`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------- | ---- | -| 0 | obj | 投币视频1 | | -| n | obj | 投币视频(n+1) | | -| …… | obj | …… | | - -`data`数组中的对象: - -基本同[获取视频详细信息(web端)](/video/info.md#获取视频详细信息(web端))中的data对象 - -**示例:** - -查看用户`mid=15858903`的最近投币视频 - -```shell -curl -G 'http://space.bilibili.com/x/space/coin/video' \ ---data-urlencode 'vmid=15858903' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": [ - { - "aid": 669644066, - "videos": 1, - "tid": 75, - "tname": "动物圈", - "copyright": 2, - "pic": "http://i1.hdslb.com/bfs/archive/0f73a68b8f449cc72e9ef109685bd295dc0c0c9d.jpg", - "title": "在人类幼崽身上用尽了温柔", - "pubdate": 1600608261, - "ctime": 1600608261, - "desc": "https://weibo.com/tv/show/1034:4551253766897703?from=old_pc_videoshow", - "state": 0, - "attribute": 16384, - "duration": 29, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 0, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 258457966, - "name": "卧龙寺", - "face": "http://i2.hdslb.com/bfs/face/f868d1f522733fdcf72a6267e0237157dd0e9948.jpg" - }, - "stat": { - "aid": 669644066, - "view": 3412898, - "danmaku": 719, - "reply": 1481, - "favorite": 21909, - "coin": 2864, - "share": 13702, - "now_rank": 0, - "his_rank": 0, - "like": 86970, - "dislike": 0 - }, - "dynamic": "", - "cid": 237319289, - "dimension": { - "width": 576, - "height": 1024, - "rotate": 0 - }, - "bvid": "BV1sa4y1j7jk", - "coins": 1, - "time": 1601802763, - "ip": "", - "inter_video": false - }, - { - "aid": 202267998, - "videos": 1, - "tid": 138, - "tname": "搞笑", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/ca7746f2207114513f1a421d7f744523275ee679.jpg", - "title": "充 电 器 の 痛", - "pubdate": 1601750952, - "ctime": 1601750952, - "desc": "这个简介吓到我了!", - "state": 0, - "attribute": 16512, - "duration": 50, - "mission_id": 14725, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 129922746, - "name": "-白糖洒一地-", - "face": "http://i0.hdslb.com/bfs/face/1f581f3b20a380c2fd13ecb8bbe409f8b49c6418.jpg" - }, - "stat": { - "aid": 202267998, - "view": 109, - "danmaku": 2, - "reply": 11, - "favorite": 5, - "coin": 9, - "share": 0, - "now_rank": 0, - "his_rank": 0, - "like": 20, - "dislike": 0 - }, - "dynamic": "", - "cid": 241861687, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV1oh411X7iA", - "coins": 2, - "time": 1601773750, - "ip": "", - "inter_video": false - }, - { - "aid": 839722373, - "videos": 1, - "tid": 208, - "tname": "校园学习", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/11ed53241ceab314c919adba9f85582d24d9313c.jpg", - "title": "“白piáo”用日语到底怎么说?油管人气日语老师来教你!", - "pubdate": 1601026026, - "ctime": 1601026026, - "desc": "志方老师的B站用语日语课又来了~\n欢迎大家来看哦,\n如果喜欢我们的作品的话,欢迎大家用2~3连+转发来支持我们~\n如果拒绝的话,也可以用日语在评论和弹幕里刷上一波~即可以锻炼日语又可以拒绝我们,岂不美哉~~", - "state": 0, - "attribute": 16768, - "duration": 310, - "mission_id": 14655, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 1, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 677926489, - "name": "日语志方老师", - "face": "http://i2.hdslb.com/bfs/face/d465e5cd42e3523a52b3bef38dce7b23627b7723.jpg" - }, - "stat": { - "aid": 839722373, - "view": 130688, - "danmaku": 1320, - "reply": 799, - "favorite": 3722, - "coin": 5883, - "share": 339, - "now_rank": 0, - "his_rank": 0, - "like": 17585, - "dislike": 0 - }, - "dynamic": "志方老师的B站用语日语课又来了~\n欢迎大家来看哦,\n如果喜欢我们的作品的话,欢迎大家用2~3连+转发来支持我们~\n如果拒绝的话,也可以用日语在评论和弹幕里刷上一波~即可以锻炼日语又可以拒绝我们,岂不美哉~~", - "cid": 238876133, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV1n54y117kq", - "coins": 2, - "time": 1601036198, - "ip": "", - "inter_video": false - } - ] -} -``` - -
- -## 投稿 - - - -### 查询用户投稿视频明细 - -> http://api.bilibili.com/x/space/arc/search - -*请求方式:GET* - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------- | ---- | ------------ | ------ | ------------------------------------------------------------ | -| mid | num | 目标用户mid | 必要 | | -| order | str | 排序方式 | 非必要 | 默认为pubdate
最新发布:pubdate
最多播放:click
最多收藏:stow | -| tid | num | 筛选目标分区 | 非必要 | 默认为0
0:不进行分区筛选
分区tid为所筛选的分区 | -| keyword | str | 关键词筛选 | 非必要 | 用于使用关键词搜索该UP主视频稿件 | -| pn | num | 页码 | 必要 | | -| ps | num | 每页项数 | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | --------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
-412:请求被拦截 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ---- | -------------- | ---- | -| list | obj | 列表信息 | | -| page | obj | 页面信息 | | -| episodic_button | obj | “播放全部“按钮 | | - -`data`中的`list`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ------ | ---------------- | ---- | -| tlist | obj | 投稿视频分区索引 | | -| vlist | array | 投稿视频列表 | | - -`list`中的`tlist`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ---- | ------------ | --------------------- | -| {tid} | obj | 该分区的详情 | 字段名为存在的分区tid | -| …… | obj | …… | 向下扩展 | - -`tlist`中的`{tid}`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ---- | -------------------- | ---- | -| count | num | 投稿至该分区的视频数 | | -| name | str | 该分区名称 | | -| tid | num | 该分区tid | | - -`list`中的`vlist`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------- | ---- | -| 0 | obj | 投稿视频1 | | -| n | obj | 投稿视频(n+1) | | -| …… | obj | …… | …… | - -`list`中的`vlist`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| -------------- | ---- | -------------- | ---------------------------- | -| aid | num | 稿件avid | | -| author | str | 视频UP主 | 不一定为目标用户(合作视频) | -| bvid | str | 稿件bvid | | -| comment | num | 视频评论数 | | -| copyright | str | 空 | 作用尚不明确 | -| created | num | 投稿时间 | 时间戳 | -| description | str | 视频简介 | | -| hide_click | bool | false | 作用尚不明确 | -| is_pay | num | 0 | 作用尚不明确 | -| is_union_video | num | 是否为合作视频 | 0:否
1:是 | -| length | str | 视频长度 | MM:SS | -| mid | num | 视频UP主mid | 不一定为目标用户(合作视频) | -| pic | str | 视频封面 | | -| play | num | 视频播放次数 | | -| review | num | 0 | 作用尚不明确 | -| subtitle | str | 空 | 作用尚不明确 | -| title | str | 视频标题 | | -| typeid | num | 视频分区tid | | -| video_review | num | 视频弹幕数 | | - -`data`中的`page`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ---- | ---------- | ---- | -| count | num | 总计稿件数 | | -| pn | num | 当前页码 | | -| ps | num | 每页项数 | | - -`data`中的`episodic_button`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------- | ---- | -| text | str | 按钮文字 | | -| uri | str | 全部播放页url | | - -**示例:** - -`pn`(页码)和`ps`(每页项数)只改变`vlist`中成员的多少与内容 - -以每页2项查询用户`mid=53456`的第1页投稿视频明细 - -```shell -curl -G 'http://api.bilibili.com/x/space/arc/search' \ ---data-urlencode 'mid=53456' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "list": { - "tlist": { - "1": { - "tid": 1, - "count": 26, - "name": "动画" - }, - "160": { - "tid": 160, - "count": 42, - "name": "生活" - }, - "211": { - "tid": 211, - "count": 3, - "name": "美食" - }, - "3": { - "tid": 3, - "count": 33, - "name": "音乐" - }, - "4": { - "tid": 4, - "count": 72, - "name": "游戏" - } - }, - "vlist": [ - { - "comment": 3558, - "typeid": 47, - "play": 1275661, - "pic": "//i2.hdslb.com/bfs/archive/90157806a34646ac2d4c6af3e8b6156cb3460d14.jpg", - "subtitle": "", - "description": "第一期:BV1ak4y1B7aG\n第二期:BV1eA411Y7FN\n脚本/绘画/配音/动画/片尾曲:warma\n第三期终于做完啦!这是一个以我平时发呆的时候想到的一些灵感组成的冷笑话合集,名字叫《沃玛的生活》,可以当作日常搞笑单元小动画来看。\n如果你喜欢这个系列的话请点赞投币收藏一键三连给我一些继续制作的动力吧,我真的非常非常需要更多的动力!\n祝看得开心~\n我的微博:@_warma_", - "copyright": "", - "title": "【warma】沃玛的新番更新!从现在开始放飞自我【沃玛的生活/第三期】", - "review": 0, - "author": "Warma", - "mid": 53456, - "created": 1605844817, - "length": "05:16", - "video_review": 7470, - "aid": 585275804, - "bvid": "BV1sz4y1y7KJ", - "hide_click": false, - "is_pay": 0, - "is_union_video": 0, - "is_steins_gate": 0 - }, - { - "comment": 2979, - "typeid": 21, - "play": 840676, - "pic": "//i2.hdslb.com/bfs/archive/b43f88c6ebae8fdc7dfb663f6f6f2931b924c763.jpg", - "subtitle": "", - "description": "前一阵子过生日,大家的礼物经过几番转寄终于收到了~于是录了这期礼物开箱视频。\n现在也在感慨,大家的礼物真的都太强了,居然这些全都是手工做的,真的好厉害!\n这些手工礼物背后得花多少时间和心力啊……这些对我来说都是无价的礼物,制作礼物的大家真的有心了,谢谢!!\n收到这些礼物真的很开心,视频的封面也是在这样激动的情况下画出来的,祝你看得开心~\n我的微博:@_warma_", - "copyright": "", - "title": "【warma】来开箱!大家寄来的生日礼物", - "review": 0, - "author": "Warma", - "mid": 53456, - "created": 1604635221, - "length": "24:28", - "video_review": 10476, - "aid": 287744380, - "bvid": "BV1xf4y1q7XN", - "hide_click": false, - "is_pay": 0, - "is_union_video": 0, - "is_steins_gate": 0 - } - ] - }, - "page": { - "pn": 1, - "ps": 2, - "count": 176 - }, - "episodic_button": { - "text": "播放全部", - "uri": "//www.bilibili.com/medialist/play/53456?from=space" - } - } -} -``` - -
- -### 查询用户投稿相簿预览 - -> http://api.bilibili.com/x/space/album/index - -*请求方式:GET* - -所有类型的相簿 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------ | ------ | ------- | -| mid | num | 目标用户mid | 必要 | | -| ps | num | 获取的相簿量 | 非必要 | 默认为8 定义域 1-大于1700 (注意滥用风险) | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ------ | -------- | --------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | array | 相簿列表 | | - -`data`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------- | ---- | -| 0 | obj | 相簿内容1 | | -| n | obj | 相簿内容(n+1) | | -| …… | obj | …… | …… | - -`data`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----------- | ------ | ----------- | -------------- | -| count | num | 总计图片数 | | -| ctime | num | 发布时间 | 时间戳 | -| description | str | 简介 | | -| doc_id | num | 相簿id | 非动态!!! | -| like | num | 点赞数 | | -| pictures | array | 图片内容 | | -| poster_uid | num | 上传用户mid | | -| title | str | 标题 | 动态内容无 | -| view | num | 浏览数 | | - -`data`数组中的对象中的`pictures`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------- | --------------------- | -| 0 | obj | 内容图片1 | | -| n | obj | 内容图片(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | …… | - -`pictures`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ---- | -------- | ----------- | -| img_height | num | 图片高度 | | -| img_size | num | 图片大小 | 单位为KByte | -| img_src | str | 图片url | | -| img_width | num | 图片宽度 | | - -**示例:** - -查询用户`mid=53456`的投稿相簿预览 - -```shell -curl -G 'http://api.bilibili.com/x/space/album/index' \ ---data-urlencode 'mid=53456' \ ---data-urlencode 'ps=2' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": [{ - "doc_id": 60470424, - "poster_uid": 53456, - "title": "", - "description": "你醒啦![tv_大佬]\n之前说到过的百万粉纪念的视频已经定时在了今天下午七点,欢迎来看呀!", - "pictures": [{ - "img_src": "https://i0.hdslb.com/bfs/album/2840366e30bf7c0aba9da5adde1a771255a57bc7.jpg", - "img_width": 625, - "img_height": 134, - "img_size": 14 - }], - "count": 1, - "ctime": 1583444859, - "view": 1677521, - "like": 29974 - }, { - "doc_id": 58962388, - "poster_uid": 53456, - "title": "", - "description": "上次的那些写实儿童画发出来啦!可以打印下来辟邪[tv_大佬]", - "pictures": [{ - "img_src": "https://i0.hdslb.com/bfs/album/8acaf7c7897cb858cccab36c33a5e875adfef177.jpg", - "img_width": 2172, - "img_height": 3258, - "img_size": 2831 - }, { - "img_src": "https://i0.hdslb.com/bfs/album/1611b6b56d3d4328889a62b9f9bdc92e9d065532.jpg", - "img_width": 3456, - "img_height": 5184, - "img_size": 3024 - }, { - "img_src": "https://i0.hdslb.com/bfs/album/f3a30a2ef5b39711af8b945d54d85ffd1e932b8a.jpg", - "img_width": 1200, - "img_height": 757, - "img_size": 313 - }], - "count": 3, - "ctime": 1582881332, - "view": 1176646, - "like": 25734 - }] -} -``` - -
- -### 查询用户投稿相簿明细 - -> http://api.vc.bilibili.com/link_draw/v1/doc/doc_list - -*请求方式:GET* - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| --------- | ---- | ----------- | ------ | ------------------------------------------------------------ | -| uid | num | 目标用户mid | 必要 | | -| page_num | num | 页码 | 非必要 | 默认为1 | -| page_size | num | 每页项数 | 非必要 | 默认为20 | -| biz | str | 查询类型 | 非必要 | 全部:all
绘画:draw
摄影:photo
日常:daily
默认为all | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------- | -| code | num | 返回值 | 0:成功 | -| msg | str | 错误信息 | 默认为success | -| message | str | 错误信息 | 默认为success | -| data | obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ------ | -------- | ---- | -| items | array | 相簿列表 | | - -`items`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------- | ---- | -| 0 | obj | 相簿内容1 | | -| n | obj | 相簿内容(n+1) | | -| …… | obj | …… | …… | - -`items`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----------- | ------ | ----------- | -------------- | -| count | num | 总计图片数 | | -| ctime | num | 发布时间 | 时间戳 | -| description | str | 简介 | | -| doc_id | num | 相簿id | 非动态!!! | -| like | num | 点赞数 | | -| pictures | array | 图片内容 | | -| poster_uid | num | 上传用户mid | | -| title | str | 标题 | 动态内容无 | -| view | num | 浏览数 | | - -`items`数组中的对象中的`pictures`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | --------------- | --------------------- | -| 0 | obj | 内容图片1 | | -| n | obj | 内容图片(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | …… | - -`pictures`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---------- | ---- | -------- | ----------- | -| img_height | num | 图片高度 | | -| img_size | num | 图片大小 | 单位为KByte | -| img_src | str | 图片url | | -| img_width | num | 图片宽度 | | - -**示例:** - -查询用户`mid=53456`的投稿明细中的全部类型 - -```shell -curl -G 'http://api.vc.bilibili.com/link_draw/v1/doc/doc_list' \ ---data-urlencode 'uid=2' \ ---data-urlencode 'page_num=1' \ ---data-urlencode 'page_size=2' \ ---data-urlencode 'biz=all' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "msg": "success", - "message": "success", - "data": { - "items": [{ - "doc_id": 59015720, - "poster_uid": 2, - "title": "", - "description": "6影是真的无脑,2个宝石都护不住(设计师:这真是太酷了)", - "pictures": [{ - "img_src": "http://i0.hdslb.com/bfs/album/8456f050ec8639c6e0cef36aba27bfdedc550590.jpg", - "img_width": 1824, - "img_height": 840, - "img_size": 1024 - }], - "count": 1, - "ctime": 1582894607, - "view": 707073, - "like": 7055 - }, { - "doc_id": 46853140, - "poster_uid": 2, - "title": "", - "description": "#年度报告# #新年Flag# https://www.bilibili.com/blackboard/timemachine2019.html\n决定了,这就是我的新年Flag!今年我一定要…", - "pictures": [{ - "img_src": "http://i0.hdslb.com/bfs/album/5b3ae76f79d7cf2501afc3ca7c7da509dcf0e38a.jpg", - "img_width": 1125, - "img_height": 2184, - "img_size": 465 - }, { - "img_src": "http://i0.hdslb.com/bfs/album/87789fe9644337a1f7e6a0655a32584705af8bda.jpg", - "img_width": 1125, - "img_height": 2184, - "img_size": 421 - }, { - "img_src": "http://i0.hdslb.com/bfs/album/f752d7f3bb7952f6c0013b3f48ddcb07060b4721.jpg", - "img_width": 1125, - "img_height": 2184, - "img_size": 524 - }, { - "img_src": "http://i0.hdslb.com/bfs/active/7a52a411bccb716c8e67fe70e6c330d5209346de.jpg", - "img_width": 1125, - "img_height": 2184, - "img_size": 534 - }], - "count": 4, - "ctime": 1577966163, - "view": 833193, - "like": 5667 - }] - } -} -``` - -
- -## 频道 - - - -### 查询用户频道列表 - -> http://api.bilibili.com/x/space/channel/list - -*请求方式:GET* - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| mid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | -------- | -| code | num | 返回值 | 0:成功 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | 无则为空 所有频道内均无视频则为空,此时code为0 | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ------ | ---------- | ---- | -| count | num | 总计频道数 | | -| list | array | 频道列表 | | - -`data`中的`list`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ----------- | --------------------- | -| 0 | obj | 频道1 | | -| n | obj | 频道(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | …… | - -`data`中的`list`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ---- | -------------- | -------- | -| cid | num | 频道id | | -| count | num | 频道内含视频数 | | -| cover | str | 封面图片url | | -| intro | str | 简介 | 无则为空 | -| mid | num | 创建用户mid | | -| mtime | num | 创建时间 | 时间戳 | -| name | str | 标题 | | - -**示例:** - -查询用户`mid=53456`的频道列表 - -```shell -curl -G 'http://api.bilibili.com/x/space/channel/list' \ ---data-urlencode 'mid=53456' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "count": 6, - "list": [{ - "cid": 100249, - "mid": 53456, - "name": "【实况】动物之森", - "intro": "", - "mtime": 1579898830, - "count": 2, - "cover": "http://i1.hdslb.com/bfs/archive/6a7ed9483c34e839dfca981b9e2b94cd4c4efa0a.jpg" - }, { - "cid": 79323, - "mid": 53456, - "name": "忆雨", - "intro": "忆雨出现过的视频", - "mtime": 1562535222, - "count": 7, - "cover": "http://i2.hdslb.com/bfs/archive/1783e4f03042b282495799adda1cb56270cea647.jpg" - }, { - "cid": 79322, - "mid": 53456, - "name": "大画家", - "intro": "", - "mtime": 1562535122, - "count": 6, - "cover": "http://i0.hdslb.com/bfs/archive/9c85a14e805c6c23cb7a42e1dbef97821bb68960.jpg" - }, { - "cid": 77758, - "mid": 53456, - "name": "灭火器", - "intro": "", - "mtime": 1561270856, - "count": 4, - "cover": "http://i2.hdslb.com/bfs/archive/0073208d086b4ebe9cdc540e7664aa74b483aeb6.jpg" - }, { - "cid": 75696, - "mid": 53456, - "name": "沃玛小剧场", - "intro": "", - "mtime": 1559129460, - "count": 5, - "cover": "http://i2.hdslb.com/bfs/archive/db2b20ecdb6ed013fc3780b0e741ea88d46b5b40.jpg" - }, { - "cid": 170, - "mid": 53456, - "name": "爆炸电台", - "intro": "闲聊的电台", - "mtime": 1503298893, - "count": 7, - "cover": "http://i2.hdslb.com/bfs/archive/73d77bc6bb0d44b239fd4f5a2682fe3144e81692.jpg" - }] - } -} -``` - -
- - - -### 查询用户频道中的视频 - -> http://api.bilibili.com/x/space/channel/video - -*请求方式:GET* - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | --------- | -| mid | num | 目标用户mid | 必要 | | -| cid | num | 目标频道id | 必要 | | -| pn | num | 页码 | 非必要 | 默认为1 | -| ps | num | 每页项数 | 非必要 | 默认为100 | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
-404:无用户对应的频道 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | -------- | ---- | -| list | obj | 频道信息 | | -| page | obj | 页面信息 | | - -`data`中的`list`对象: - -| 字段 | 类型 | 内容 | 备注 | -| -------- | ------ | -------------- | -------- | -| archives | array | 包含的视频列表 | | -| cid | num | 频道id | | -| count | num | 频道内含视频数 | | -| cover | str | 封面图片url | | -| intro | str | 简介 | 无则为空 | -| mid | num | 创建用户mid | | -| mtime | num | 创建时间 | 时间戳 | -| name | str | 标题 | | - -`list`中的`archives`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ----------- | --------------------- | -| 0 | obj | 视频1 | | -| n | obj | 视频(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | …… | - -`list`中的`archives`数组中的对象: - -基本同「[视频详细信息](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/video/info.md#视频详细信息(avid/bvid互转))」中的data对象 - -`data`中的`page`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ---- | ---------- | ---- | -| count | num | 总计视频数 | | -| num | num | 当前页码 | | -| size | num | 每页项数 | | - -**示例:** - -查询用户`mid=53456`的频道`170`中的视频 - -```shell -curl -G 'http://api.bilibili.com/x/space/channel/video' \ ---data-urlencode 'mid=53456' \ ---data-urlencode 'cid=170' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "list": { - "cid": 170, - "mid": 53456, - "name": "爆炸电台", - "intro": "闲聊的电台", - "mtime": 1503298893, - "count": 7, - "cover": "http://i2.hdslb.com/bfs/archive/73d77bc6bb0d44b239fd4f5a2682fe3144e81692.jpg", - "archives": [{ - "aid": 87673204, - "videos": 1, - "tid": 21, - "tname": "日常", - "copyright": 1, - "pic": "http://i0.hdslb.com/bfs/archive/5387bdcbbe4d5551adbf0ee2e607e4b7d3d8f2f0.jpg", - "title": "【warma爆炸电台】迟来的自我介绍【第八期】", - "pubdate": 1581244539, - "ctime": 1581244540, - "desc": "时隔半年的新的一期爆炸电台来啦,这是我的一系列杂谈聊天电台,这次因为多了很多新关注的朋友们,所以来做个自我介绍吧!\n画师:Dr-H_喵_ 动画:K_Lacid\n结尾提到的壁纸稍后在动态发原图,动态壁纸在steam那个壁纸软件的创意工坊里搜warma能找到\n\n往期的电台:\n第一期:av6786024 \n第三期:av13619263\n第四期:av18862091\n第五期:av25092410\n第六期:av42492515\n第七期:av62910468", - "state": 0, - "attribute": 16512, - "duration": 2388, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 53456, - "name": "Warma", - "face": "http://i1.hdslb.com/bfs/face/c1bbee6d255f1e7fc434e9930f0f288c8b24293a.jpg" - }, - "stat": { - "aid": 87673204, - "view": 1383542, - "danmaku": 88908, - "reply": 9237, - "favorite": 32929, - "coin": 68849, - "share": 5140, - "now_rank": 0, - "his_rank": 52, - "like": 116164, - "dislike": 0 - }, - "dynamic": "来做个自我介绍吧! #warma##沃玛##爆炸电台#", - "cid": 149793525, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV1D7411t7Be", - "inter_video": false - }, { - "aid": 62910468, - "videos": 1, - "tid": 21, - "tname": "日常", - "copyright": 1, - "pic": "http://i2.hdslb.com/bfs/archive/4bd598f71a144d4505e259b143c0de0bf27968b2.jpg", - "title": "【warma爆炸电台】居然收到了几千条问题!【第七期】", - "pubdate": 1565345410, - "ctime": 1565338559, - "desc": "时隔半年的爆炸电台第七期终于来啦!在这一期里回答了很多问题,祝看得开心!此外,就在昨天,50万订阅了…真的谢谢大家!\n也欢迎来看往期的电台:\n第一期:av6786024 (2016年10月)\n第二期:av10373352(2017年5月)\n第三期:av13619263(2017年8月)\n第四期:av18862091(2018年1月)\n第五期:av25092410(2018年6月)\n第六期:av42492515(2019年2月)", - "state": 0, - "attribute": 16512, - "duration": 1987, - "mission_id": 11740, - "rights": { - "bp": 0, - "elec": 0, - "download": 0, - "movie": 0, - "pay": 0, - "hd5": 0, - "no_reprint": 1, - "autoplay": 1, - "ugc_pay": 0, - "is_cooperation": 0, - "ugc_pay_preview": 0, - "no_background": 0 - }, - "owner": { - "mid": 53456, - "name": "Warma", - "face": "http://i1.hdslb.com/bfs/face/c1bbee6d255f1e7fc434e9930f0f288c8b24293a.jpg" - }, - "stat": { - "aid": 62910468, - "view": 455277, - "danmaku": 19383, - "reply": 2108, - "favorite": 10507, - "coin": 19422, - "share": 1208, - "now_rank": 0, - "his_rank": 0, - "like": 31515, - "dislike": 0 - }, - "dynamic": "爆炸电台 第七期 来啦!", - "cid": 109284065, - "dimension": { - "width": 1920, - "height": 1080, - "rotate": 0 - }, - "bvid": "BV1gt411K7Ga", - "inter_video": false - }] - }, - "page": { - "count": 7, - "num": 1, - "size": 2 - } - } -} -``` - -
- -### 创建频道 - -> http://api.bilibili.com/x/space/channel/add - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -创建成功后会返回新建频道的id - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------ | ---- | -| name | str | 频道名 | 必要 | | -| intro | str | 频道简介 | 非必要 | | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53001:频道名字数超过限制
53002:频道简介字数超过限制
53004:创建的频道已经满额
53007:频道名称已经存在
53024:编辑内容命中敏感信息 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 数据本体 | 成功有此项 | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ------ | ---- | -| cid | num | 频道id | | - -**示例:** - -创建名为`test1`的频道,简介为空 - -```shell -curl 'http://api.bilibili.com/x/space/channel/add' \ ---data-urlencode 'name=test1' \ ---data-urlencode 'intro=' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "cid": 138996 - } -} -``` - -
- -### 修改频道 - -> http://api.bilibili.com/x/space/channel/edit - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------ | ---- | -| cid | num | 频道id | 必要 | | -| name | str | 频道名 | 必要 | | -| intro | str | 频道简介 | 非必要 | | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
53001:频道名字数超过限制
53002:频道简介字数超过限制
53007:频道名称已经存在
53024:编辑内容命中敏感信息 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | - -**示例:** - -修改频道`138996`名称为`测试`,简介为`123456` - -```shell -curl 'http://api.bilibili.com/x/space/channel/edit' \ ---data-urlencode 'cid=138996' \ ---data-urlencode 'name=测试' \ ---data-urlencode 'intro=123456' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -### 删除频道 - -> http://api.bilibili.com/x/space/channel/del - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------ | ---- | -| cid | num | 需要删除的频道id | 必要 | | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | - -**示例:** - -删除频道`138996` - -```shell -curl 'http://api.bilibili.com/x/space/channel/del' \ ---data-urlencode 'cid=138996' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -### 频道添加视频 - -> http://api.bilibili.com/x/space/channel/video/add - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -仅能添加自己是UP主的视频 - -如添加多个视频,仅会添加正确的 - -**注:完成后需要使用接口「查询用户频道中的视频」刷新** - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------ | ---------------------- | -| cid | num | 频道id | 必要 | | -| aids | nums | 要添加的目标稿件avid | 必要 | 多个使用","(%2C)分隔 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ----- | ---------------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
-404:无此项
53003:本频道里的视频已满
53006:提交视频已失效或频道里有(非该视频UP主) | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | array | 出错稿件avid列表 | | - -`data`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ------------------- | ---- | -| 0 | num | 出错稿件avid1 | | -| n | num | 出错稿件avid(n+1) | | -| …… | num | …… | …… | - -**示例:** - -向频道`138995`中添加视频`av583785685`和`av243322853` - -```shell -curl 'http://api.bilibili.com/x/space/channel/video/add' \ ---data-urlencode 'cid=138995' \ ---data-urlencode 'aids=583785685,243322853' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": [] -} -``` - -
- -### 频道删除视频 - -> http://api.bilibili.com/x/space/channel/video/del - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -**注:完成后需要使用接口「查询用户频道中的视频」刷新** - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------ | ---- | -| cid | num | 频道id | 必要 | | -| aid | num | 要删除的目标稿件avid | 必要 | | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误
-404:无此项
53008:频道内没有视频
53009:频道内没有该视频 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | - -**示例:** - -删除频道`138995`中的视频`av583785685` - -```shell -curl 'http://api.bilibili.com/x/space/channel/video/del' \ ---data-urlencode 'cid=138995' \ ---data-urlencode 'aid=583785685' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -### 调整频道视频排序 - -> http://api.bilibili.com/x/space/channel/video/sort - -*请求方式:POST* - -认证方式:Cookie(SESSDATA) - -**正文参数( application/x-www-form-urlencoded ):** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ------------------------ | ------ | ------------------------------------------------------------ | -| cid | num | 频道id | 必要 | | -| aid | num | 要移动的目标稿件avid | 必要 | | -| to | num | 视频排序倒数位置 | 非必要 | 默认为1
1为列表底部,视频总数为首端
与显示顺序恰好相反 | -| csrf | str | CSRF Token(位于cookie) | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | - -**示例:** - -调整`138995`中的视频`av583785685`位置为倒数第2 - -```shell -curl 'http://api.bilibili.com/x/space/channel/video/sort' \ ---data-urlencode 'cid=138995' \ ---data-urlencode 'aid=583785685' \ ---data-urlencode 'to=2' \ ---data-urlencode 'csrf=xxx' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -### 检查频道中有无失效视频 - -> http://api.bilibili.com/x/space/channel/video/check - -*请求方式:GET* - -认证方式:Cookie(SESSDATA) - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ---------- | ------ | ---- | -| cid | num | 目标频道id | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误
-404:无此项
53005:频道内有失效视频 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | - -**示例:** - -检查频道`138995` - -```shell -curl -G 'http://api.bilibili.com/x/space/channel/video/check ---data-urlencode 'cid=138995' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1 -} -``` - -
- -## 收藏 - - - -### 查询用户创建的视频收藏夹 - -> http://api.bilibili.com/x/v3/fav/folder/created/list-all - -*请求方式:GET* - -认证方式:Cookie(SESSDATA) - -查看私有收藏夹时需要认证 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| up_mid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ----------------------------- | -------- | --------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | 隐藏时:null
公开时:obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | --------------------------------------- | -------------- | ---- | -| count | num | 创建的收藏夹数 | | -| list | 无收藏夹时:null
有收藏夹时:array | 收藏夹列表 | | - -`data`中的`list`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ----------- | --------------------- | -| 0 | obj | 收藏夹1 | | -| n | obj | 收藏夹(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | | - -`data`中的`list`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----------- | ---- | ---------------- | --------------- | -| id | num | 收藏夹mlid | | -| fid | num | 原始收藏夹mlid | 去除两位mid尾号 | -| mid | num | 创建用户mid | | -| attr | num | 收藏夹属性位配置 | | -| title | str | 收藏夹标题 | | -| fav_state | num | 0 | 作用尚不明确 | -| media_count | num | 收藏夹总计视频数 | | - -`attr`属性位二进制值表: - -| 位 | 内容 | 备注 | -| --------------- | ---------------- | -------------------------------- | -| 0 | 是否为默认收藏夹 | 0:默认收藏夹
1:其他收藏夹 | -| 1 | 私有收藏夹 | 0:公开
1:私有 | -| 其他有待补充... | | | - -**示例:** - -查询用户`mid=7792521`的收藏夹列表 - -```shell -curl -G 'http://api.bilibili.com/x/v3/fav/folder/created/list-all' \ ---data-urlencode 'up_mid=7792521' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "count": 5, - "list": [{ - "id": 44233921, - "fid": 442339, - "mid": 7792521, - "attr": 0, - "title": "默认收藏夹", - "fav_state": 0, - "media_count": 85 - }, { - "id": 936347621, - "fid": 9363476, - "mid": 7792521, - "attr": 22, - "title": "放假君的鬼畜私房歌", - "fav_state": 0, - "media_count": 2 - }, { - "id": 845218621, - "fid": 8452186, - "mid": 7792521, - "attr": 22, - "title": "♪一言不合就开唱♪", - "fav_state": 0, - "media_count": 4 - }, { - "id": 844998121, - "fid": 8449981, - "mid": 7792521, - "attr": 22, - "title": "个人作品精选", - "fav_state": 0, - "media_count": 25 - }, { - "id": 381779121, - "fid": 3817791, - "mid": 7792521, - "attr": 22, - "title": "鬼畜小课堂", - "fav_state": 0, - "media_count": 25 - }] - } -} -``` - -
- -### 查询用户收藏的视频收藏夹 - -> http://api.bilibili.com/x/v3/fav/folder/collected/list - -*请求方式:GET* - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| ps | num | 每页项数 | 必要 | 定义域 1 - 大于70 | -| pn | num | 页码 | 必要 | | -| up_mid | num | 目标用户mid | 必要 | | -| platform | str | 平台类型 | 非必要 | 填写web 返回值才会包含用户收藏的视频合集 | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ----------------------------- | -------- | ------------------------------------------------------------ | -| code | num | 返回值 | 0:成功
-101:账号未登录
-111:csrf校验失败
40022:签名过长 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | 隐藏时:null
公开时:obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | --------------------------------------- | -------------- | ---- | -| count | num | 创建的收藏夹数 | | -| list | 无收藏夹时:null
有收藏夹时:array | 收藏夹列表 | | - -`data`中的`list`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ----------- | --------------------- | -| 0 | obj | 收藏夹1 | | -| n | obj | 收藏夹(n+1) | 项数取决于`count`的值 | -| …… | obj | …… | | - -`data`中的`list`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----------- | ---- | ------------------ | ----------------------------------------- | -| id | num | 收藏夹ml | | -| fid | num | 原始收藏夹mlid | 去除两位mid尾号 | -| mid | num | 创建用户mid | | -| attr | num | 收藏夹属性 | 转换成8-bit二进制处理
详细说明见下表 | -| title | str | 收藏夹标题 | | -| cover | str | 收藏夹封面图片url | | -| upper | obj | 收藏夹创建用户信息 | | -| cover_type | num | 2 | 作用尚不明确 | -| intro | str | 空 | 作用尚不明确 | -| ctime | num | 创建时间 | 时间戳 | -| mtime | num | 审核时间 | 时间戳 | -| state | num | 0 | 作用尚不明确 | -| fav_state | num | 0 | 作用尚不明确 | -| media_count | num | 收藏夹总计视频数 | | - -`attr`属性二进制值表: - -| 其他有待补充... | 1:默认收藏夹 | 0:公开性 | -| --------------- | -------------------------------- | -------------------- | -| | 0:默认收藏夹
1:其他收藏夹 | 0:公开
1:私有 | - -`data`中的`list`数组中的对象中的`upper`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ---- | ---------- | ------------ | -| mid | num | 创建人mid | | -| name | str | 创建人昵称 | | -| face | str | 空 | 作用尚不明确 | - -**示例:** - -查询用户`mid=293793435`的收藏夹收藏列表 - -```shell -curl -G 'http://api.bilibili.com/x/v3/fav/folder/collected/list' \ ---data-urlencode 'up_mid=293793435' \ ---data-urlencode 'ps=20' \ ---data-urlencode 'pn=1' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "count": 2, - "list": [{ - "id": 496307088, - "fid": 4963070, - "mid": 412466388, - "attr": 22, - "title": "入站必刷", - "cover": "http://i0.hdslb.com/bfs/archive/baae2b4050363c0ab45465b7cf696b8304fdaca8.jpg", - "upper": { - "mid": 412466388, - "name": "热门菌", - "face": "" - }, - "cover_type": 2, - "intro": "", - "ctime": 1563394571, - "mtime": 1563394571, - "state": 0, - "fav_state": 0, - "media_count": 55 - }, { - "id": 381779121, - "fid": 3817791, - "mid": 7792521, - "attr": 22, - "title": "鬼畜小课堂", - "cover": "http://i2.hdslb.com/bfs/archive/09a668cfdb38fb3a85f905c10f48a2947e36a695.jpg", - "upper": { - "mid": 7792521, - "name": "还有一天就放假了", - "face": "" - }, - "cover_type": 2, - "intro": "", - "ctime": 1553700224, - "mtime": 1557291666, - "state": 0, - "fav_state": 0, - "media_count": 25 - }] - } -} -``` - -
- -## 课程 - - - -### 查询用户发布的课程列表 - -> http://api.bilibili.com/pugv/app/web/season/page - -*请求方式:GET* - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | -------- | -| mid | num | 目标用户mid | 必要 | | -| pn | num | 页码 | 非必要 | 默认为1 | -| ps | num | 每页项数 | 非必要 | 默认为20 | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ---------------------------------------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ---- | ----- | -------- | ---- | -| list | array | 课程列表 | | -| page | obj | 页面信息 | | - -`data`中的`page`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ---- | -------------- | ------------------------------------- | -| next | bool | 是否存在下一页 | false:最后一页
true:存在下一页 | -| num | num | 当前页码 | | -| size | num | 每页项数 | | -| total | num | 总计项数 | | - -`data`中的`list`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ----------- | -------------------------- | -| 0 | obj | 课程1 | | -| n | obj | 课程(n+1) | 按照目标用户的发布顺序排列 | -| …… | obj | …… | | - -`data`中的`list`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------- | ---- | ------------ | ------------- | -| cover | str | 课程封面url | | -| ep_count | num | 课程集数 | | -| link | str | 课程页面url | 手机版页面url | -| page | num | 1 | 作用尚不明确 | -| play | num | 课程播放数 | | -| season_id | num | 课程ssid | | -| status | str | 更新状态说明 | | -| subtitle | str | 课程副标题 | | -| title | str | 课程标题 | | - -**示例:** - -查询用户`mid=33683045`的课程发布列表 - -```shell -curl -G 'http://api.bilibili.com/pugv/app/web/season/page' \ ---data-urlencode 'mid=33683045' \ ---data-urlencode 'ps=5' \ ---data-urlencode 'pn=1' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "data": { - "items": [ - { - "cover": "http://i0.hdslb.com/bfs/archive/596575057885fff7f0ceff047437186cba459358.jpg", - "ep_count": 10, - "link": "https://m.bilibili.com/cheese/play/ss80", - "page": 1, - "play": 174467, - "season_id": 80, - "status": "共10期", - "subtitle": "百科全书式军事科普短视频系列", - "title": "《战忽知道》第一季" - }, - { - "cover": "http://i0.hdslb.com/bfs/archive/322aa94d27cece62d2a859caf71ac2426f29eee2.jpg", - "ep_count": 1, - "link": "https://m.bilibili.com/cheese/play/ss145", - "page": 1, - "play": 22155, - "season_id": 145, - "status": "更新至第1期", - "subtitle": "此课程为《局座:第四次工业革命来了》部分集数,请谨慎购买", - "title": "【体验课】局座讲5G:5G如何改变我们的生活?" - }, - { - "cover": "http://i0.hdslb.com/bfs/archive/b9794ac4507f8764e219df413b661b5faf499a19.jpg", - "ep_count": 10, - "link": "https://m.bilibili.com/cheese/play/ss113", - "page": 1, - "play": 49833, - "season_id": 113, - "status": "更新至第10期", - "subtitle": "百科全书式军事科普短视频系列", - "title": "《战忽知道》第二季" - }, - { - "cover": "http://i0.hdslb.com/bfs/archive/7351fcb33592a4bc7aac9f71d421b4b5ce0177d3.jpg", - "ep_count": 10, - "link": "https://m.bilibili.com/cheese/play/ss51", - "page": 1, - "play": 4981037, - "season_id": 51, - "status": "共10期", - "subtitle": "洞悉国际局势,学习战略思维", - "title": "局座的国际战略课" - }, - { - "cover": "http://i0.hdslb.com/bfs/archive/31e2a170b5a815e34f0537a2727b28f1b87dca18.jpg", - "ep_count": 10, - "link": "https://m.bilibili.com/cheese/play/ss121", - "page": 1, - "play": 30754, - "season_id": 121, - "status": "更新至第10期", - "subtitle": "百科全书式军事科普短视频系列", - "title": "《战忽知道》第三季" - } - ], - "page": { - "next": true, - "num": 1, - "size": 5, - "total": 8 - } - }, - "message": "success" -} -``` - -
- -## 订阅 - - - -### 查询用户追番预览列表 - -> http://space.bilibili.com/ajax/Bangumi/getList - -*请求方式:GET* - -认证方式:Cookie(SESSDATA) - -如设置隐私查看自己的需要认证 - -带有转义,且只能获取最多15条 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| mid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------ | ------------------------ | ---------------------------------- | --------------------------- | -| status | bool | 状态 | false:失败
true:成功 | -| data | 失败:str
成功:obj | 失败:错误信息
成功:信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------ | ----- | ------------ | ------------ | -| count | num | 总计追番数 | | -| pages | num | 0 | 作用尚不明确 | -| result | array | 追番预览列表 | | - -`data`中的`result`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ----------- | -------------------------- | -| 0 | obj | 追番1 | | -| n | obj | 追番(n+1) | 按照目标用户的关注顺序排列 | -| …… | obj | …… | | -| 14 | obj | 追番15 | 最后一项 | - -`data`中的`result`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| --------------- | ---- | --------------- | --------------------------------- | -| brief | str | 简介 | | -| cover | str | 封面图片url | | -| evaluate | str | 空 | | -| favorites | num | 追番数 | | -| is_finish | num | 是否已完结 | 0:未完结
1:已完结 | -| last_ep_index | num | 0 | 作用尚不明确 | -| newest_ep_index | num | 最新一话 | 可能为0 | -| season_id | str | 番剧ssid | | -| share_url | str | 播放页面链接url | | -| title | str | 标题 | | -| total_count | num | 总计集数 | 未完结:-1
已完结:非0正整数 | - -**示例:** - -查看用户`mid=14082`的追番预览列表 - -```shell -curl -G 'http://space.bilibili.com/ajax/Bangumi/getList' \ ---data-urlencode 'mid=14082' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "status": true, - "data": { - "count": 25, - "pages": 0, - "result": [{ - "season_id": "29310", - "share_url": "http:\/\/bangumi.bilibili.com\/anime\/29310\/", - "title": "异度侵入 ID:INVADED", - "is_finish": 1, - "favorites": 3479220, - "newest_ep_index": 13, - "last_ep_index": 0, - "total_count": 13, - "cover": "http:\/\/i0.hdslb.com\/bfs\/bangumi\/image\/9bf9e66968f85b33ec3769a16c86b36dc984abbc.png", - "evaluate": "", - "brief": "本片讲述利用能检测出人们杀意的装置以及利用思想粒子做出的“井”,来探知事件真相的科幻故事。" - }, { - "season_id": "25739", - "share_url": "http:\/\/bangumi.bilibili.com\/anime\/25739\/", - "title": "关于我转生变成史莱姆这档事", - "is_finish": 1, - "favorites": 5518829, - "newest_ep_index": 0, - "last_ep_index": 0, - "total_count": 27, - "cover": "http:\/\/i0.hdslb.com\/bfs\/bangumi\/a4c0e0ccc44fe3949a734f546cf5bb07da925bad.png", - "evaluate": "", - "brief": "史莱姆生活,开始了。\n上班族的三上悟在道路上被歹徒给刺杀身亡后,回过神来发现自己转生到了异世界。\n不..." - }, - ………… - ] - } -} -``` - -
- -### 查询用户追番(追剧)明细 - -> http://api.bilibili.com/x/space/bangumi/follow/list - -*请求方式:GET* - -认证方式:Cookie(SESSDATA) - -如设置隐私查看自己的需要认证 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | -------------------- | -| vmid | num | 目标用户mid | 必要 | | -| pn | num | 页码 | 非必要 | 默认为1 | -| ps | num | 每页项数 | 非必要 | 默认为15 定义域1-30 | -| type | num | 查询类型 | 必要 | 1:追番
2:追剧 | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------- | ---- | -------- | ---------------------------------------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
53013:用户隐私设置未公开 | -| message | str | 错误信息 | 默认为0 | -| ttl | num | 1 | | -| data | obj | 信息本体 | | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ----- | ---------- | ---- | -| list | array | 追番列表 | | -| pn | num | 当前页码 | | -| ps | num | 每页项数 | | -| total | num | 总计追番数 | | - -`data`中的`list`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | ----------- | -------------------------- | -| 0 | obj | 追番1 | | -| n | obj | 追番(n+1) | 按照目标用户的关注顺序排列 | -| …… | obj | …… | | - -`data`中的`list`数组中的对象: - -基本同「番剧详细信息」中的result对象(未完工) - -**示例:** - -查看用户`mid=14082`的追番明细 - -```shell -curl -G 'http://api.bilibili.com/x/space/bangumi/follow/list' \ ---data-urlencode 'vmid=14082' \ ---data-urlencode 'type=1' \ ---data-urlencode 'ps=2' \ ---data-urlencode 'pn=1' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "code": 0, - "message": "0", - "ttl": 1, - "data": { - "list": [{ - "season_id": 29310, - "media_id": 28224080, - "season_type": 1, - "season_type_name": "番剧", - "title": "异度侵入 ID:INVADED", - "cover": "http://i0.hdslb.com/bfs/bangumi/image/9bf9e66968f85b33ec3769a16c86b36dc984abbc.png", - "total_count": 13, - "is_finish": 1, - "is_started": 1, - "is_play": 1, - "badge": "会员专享", - "badge_type": 0, - "rights": { - "allow_review": 1, - "is_selection": 1, - "selection_style": 1 - }, - "stat": { - "follow": 3475768, - "view": 87500861, - "danmaku": 1334654, - "reply": 316632, - "coin": 835150, - "series_follow": 3475242, - "series_view": 87500861 - }, - "new_ep": { - "id": 307774, - "index_show": "全13话", - "cover": "http://i0.hdslb.com/bfs/archive/3dce2b856a7b0ea667aa288b51b7c0478fa56c4d.jpg", - "title": "13", - "long_title": "CHANNELEDⅡ", - "pub_time": "2020-03-23 00:30:00", - "duration": 1481000 - }, - "rating": { - "score": 9.8, - "count": 262589 - }, - "square_cover": "http://i0.hdslb.com/bfs/bangumi/image/664dbf039ec2da8dd982b697a108e28e87b9897e.jpg", - "season_status": 13, - "season_title": "TV", - "badge_ep": "会员", - "media_attr": 196608, - "season_attr": 0, - "evaluate": "本片讲述利用能检测出人们杀意的装置以及利用思想粒子做出的“井”,来探知事件真相的科幻故事。...", - "areas": [{ - "id": 2, - "name": "日本" - }], - "subtitle": "", - "first_ep": 307446, - "can_watch": 1, - "series": { - "series_id": 4760, - "title": "ID:INVADED", - "season_count": 1, - "new_season_id": 29310 - }, - "publish": { - "pub_time": "2020-01-06 00:30:00", - "pub_time_show": "敬请期待", - "release_date": "2020-01-06", - "release_date_show": "2020年1月6日" - }, - "mode": 2, - "section": [{ - "section_id": 39327, - "season_id": 29310, - "limit_group": 328, - "watch_platform": 15, - "copyright": "dujia", - "ban_area_show": 1 - }, { - "section_id": 39633, - "season_id": 29310, - "limit_group": 328, - "watch_platform": 15, - "type": 1, - "copyright": "dujia", - "title": "其他", - "ban_area_show": 1 - }, { - "section_id": 44101, - "season_id": 29310, - "limit_group": 316, - "watch_platform": 15, - "type": 4, - "copyright": "ugc", - "ban_area_show": 1 - }], - "url": "https://www.bilibili.com/bangumi/play/ss29310", - "follow_status": 2, - "is_new": 0, - "progress": "", - "both_follow": true - }, { - "season_id": 25739, - "media_id": 139252, - "season_type": 1, - "season_type_name": "番剧", - "title": "关于我转生变成史莱姆这档事", - "cover": "http://i0.hdslb.com/bfs/bangumi/a4c0e0ccc44fe3949a734f546cf5bb07da925bad.png", - "total_count": 27, - "is_finish": 1, - "is_started": 1, - "is_play": 1, - "badge": "会员专享", - "badge_type": 0, - "rights": { - "allow_review": 1, - "is_selection": 1, - "selection_style": 1 - }, - "stat": { - "follow": 5516519, - "view": 246739631, - "danmaku": 3802465, - "reply": 460225, - "coin": 1338958, - "series_follow": 5516535, - "series_view": 246739631 - }, - "new_ep": { - "id": 316957, - "index_show": "全27话", - "cover": "http://i0.hdslb.com/bfs/archive/81d07d1a478ce3a6209b557e14df9b9c78c42abb.jpg", - "title": "OAD03", - "long_title": "外传:利姆鲁的华丽教师生活 其一", - "pub_time": "2020-03-27 00:00:03", - "duration": 1493000 - }, - "rating": { - "score": 9.4, - "count": 83354 - }, - "square_cover": "http://i0.hdslb.com/bfs/bangumi/8d9f5b4a566d0547bc2e3f6f733b732a09c0d3d4.jpg", - "season_status": 13, - "season_title": "TV", - "badge_ep": "会员", - "media_attr": 0, - "season_attr": 0, - "evaluate": "史莱姆生活,开始了。\n上班族的三上悟在道路上被歹徒给刺杀身亡后,回过神来发现自己转生到了异世界。\n不过,自己居然是“史莱姆”!\n他在得到利姆鲁这个名字后开始了自己的史莱姆人生,随着与各个种族相处交流的...", - "areas": [{ - "id": 2, - "name": "日本" - }], - "subtitle": "", - "first_ep": 250460, - "can_watch": 1, - "series": { - "series_id": 4188, - "title": "关于我转生变成史莱姆这档事", - "season_count": 1, - "new_season_id": 25739 - }, - "publish": { - "pub_time": "2018-10-02 00:30:00", - "pub_time_show": "2018年10月02日00:30", - "release_date": "2018-10-02", - "release_date_show": "2018年10月2日" - }, - "mode": 2, - "section": [{ - "section_id": 34988, - "season_id": 25739, - "limit_group": 328, - "watch_platform": 15, - "copyright": "bilibili", - "ban_area_show": 1 - }], - "url": "https://www.bilibili.com/bangumi/play/ss25739", - "follow_status": 2, - "is_new": 0, - "progress": "", - "both_follow": true - }], - "pn": 1, - "ps": 2, - "total": 25 - } -} -``` - -
- - - - - -### 查询用户关注的TAG(话题) - -> http://space.bilibili.com/ajax/tags/getSubList - -*请求方式:GET* - -认证方式:Cookie(SESSDATA) - -如设置隐私查看自己的需要认证 - -带有转义 - -只显示前100个 - -**url参数:** - -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------ | ---- | ----------- | ------ | ---- | -| mid | num | 目标用户mid | 必要 | | - -**json回复:** - -根对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------ | ---------------------------- | -------------------------------------- | --------------------------- | -| ststus | bool | 返回值 | false:错误
true:正确 | -| data | 错误时:str
正确时:obj | 错误时:错误信息
正确时:数据本体 | 正确时不返回错误信息 | - -`data`对象: - -| 字段 | 类型 | 内容 | 备注 | -| ----- | ----- | ----------- | ---- | -| tags | array | 关注TAG列表 | | -| count | num | 关注TAG的数 | | - -`data`中的`tags`数组: - -| 项 | 类型 | 内容 | 备注 | -| ---- | ---- | -------------- | -------- | -| 0 | obj | 关注TAG1 | | -| n | obj | 关注TAG(n+1) | | -| …… | obj | …… | …… | -| 99 | obj | 关注TAG100 | 最后一项 | - -`data`中的`tags`数组中的对象: - -| 字段 | 类型 | 内容 | 备注 | -| ------------- | ---- | ------------------- | ------------ | -| archive_count | num | 0 | 作用尚不明确 | -| cover | str | TAG图片url | 无则为空 | -| name | str | TAG名 | | -| notify | num | 1 | 作用尚不明确 | -| tag_id | num | tag_id | | -| updated_ts | str | 1970-01-01 08:00:00 | 作用尚不明确 | - -**示例:** - -查询用户`mid=2`的关注TAG - -```shell -curl -G 'http://space.bilibili.com/ajax/tags/getSubList' \ ---data-urlencode 'mid=2' \ --b 'SESSDATA=xxx' -``` - -
-查看响应示例: - -```json -{ - "status": true, - "data": { - "tags": [{ - "name": "豪宅", - "cover": "", - "tag_id": 47637, - "notify": 1, - "archive_count": 0, - "updated_ts": "1970-01-01 08:00:00" - }, { - "name": "死亡搁浅", - "cover": "", - "tag_id": 1737239, - "notify": 1, - "archive_count": 0, - "updated_ts": "1970-01-01 08:00:00" - }, - ………… - ], - "count": 58 - } -} -``` - -
From 436f26f15bab7855184e40b21c54ab0e41fb6133 Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Mon, 3 Jul 2023 17:04:00 +0800 Subject: [PATCH 052/159] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20#517=20=E7=9A=84?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {dynamic => docs/dynamic}/all.md | 0 {dynamic => docs/dynamic}/detail.md | 0 {dynamic => docs/dynamic}/dynamic_enum.md | 0 {dynamic => docs/dynamic}/space.md | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {dynamic => docs/dynamic}/all.md (100%) rename {dynamic => docs/dynamic}/detail.md (100%) rename {dynamic => docs/dynamic}/dynamic_enum.md (100%) rename {dynamic => docs/dynamic}/space.md (100%) diff --git a/dynamic/all.md b/docs/dynamic/all.md similarity index 100% rename from dynamic/all.md rename to docs/dynamic/all.md diff --git a/dynamic/detail.md b/docs/dynamic/detail.md similarity index 100% rename from dynamic/detail.md rename to docs/dynamic/detail.md diff --git a/dynamic/dynamic_enum.md b/docs/dynamic/dynamic_enum.md similarity index 100% rename from dynamic/dynamic_enum.md rename to docs/dynamic/dynamic_enum.md diff --git a/dynamic/space.md b/docs/dynamic/space.md similarity index 100% rename from dynamic/space.md rename to docs/dynamic/space.md From 21c7f54e0519b10a8e00edb88d11caa470683571 Mon Sep 17 00:00:00 2001 From: Clover614 <61135990+Clov614@users.noreply.github.com> Date: Wed, 5 Jul 2023 00:52:31 +0800 Subject: [PATCH 053/159] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E9=A6=96=E9=A1=B5=E8=A7=86=E9=A2=91=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E5=88=97=E8=A1=A8=20(#733)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 新增获取首页视频推荐列表 Update: recommend.md * typo: https 改为 http * feat: 新增获取首页视频推荐列表 --- docs/video/recommend.md | 126 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) diff --git a/docs/video/recommend.md b/docs/video/recommend.md index 5cd341a..8415f4d 100644 --- a/docs/video/recommend.md +++ b/docs/video/recommend.md @@ -1,5 +1,10 @@ # 视频推荐 +- [获取单视频推荐列表(web端)](#获取单视频推荐列表(web端)) +- [获取首页视频推荐列表(web端)](#获取首页视频推荐列表(web端)) + +--- + ## 获取单视频推荐列表(web端) > https://api.bilibili.com/x/web-interface/archive/related @@ -46,14 +51,14 @@ avid方式: ```shell -curl -G 'https://api.bilibili.com/x/web-interface/archive/related' \ +curl -G 'http://api.bilibili.com/x/web-interface/archive/related' \ --data-urlencode 'aid=7' ``` bvid方式: ```shell -curl -G 'https://api.bilibili.com/x/web-interface/archive/related' \ +curl -G 'http://api.bilibili.com/x/web-interface/archive/related' \ --data-urlencode 'bvid=BV1xx411c7m9' ``` @@ -288,3 +293,120 @@ curl -G 'https://api.bilibili.com/x/web-interface/archive/related' \ ```
+ + +## 获取首页视频推荐列表(web端) + +> https://api.bilibili.com/x/web-interface/index/top/rcmd + +*请求方式:GET* + +认证方式:Cookie(SESSDATA) + +最多获取14条推荐视频 + +**url参数:** + +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +|--------------|-----|---------------------------|-----|------------------------------| +| fresh_type | num | 相关性 | 非必要 | 默认为3
值越大推荐内容越相关 | +| version | num | web端新旧版本:0为旧版本1为新版本 | 非必要 | 默认为0
1,0分别为新旧web端 | +| ps | num | pagesize 单页返回的记录条数默认为10或8 | 非必要 | 默认为10
当version为1时默认为8 | +| fresh_idx | num | 翻页相关 | 非必要 | 默认为1
与翻页相关 | +| fresh_idx_1h | num | 翻页相关 | 非必要 | 默认为1
与翻页相关 | + +**json回复:** + +根对象: + +| 字段 | 类型 | 内容 | 备注 | +|-------------|-------|------|----------------------| +| code | num | 返回值 | 0:成功
-400:请求错误 | +| message | str | 错误信息 | 默认为0 | +| ttl | num | 1 | | +| data | array | 推荐列表 | | +| userfeature | str | 用户功能 | | +| abtest | obj | 用户分组 | | + +`data`数组: + +| 项 | 类型 | 内容 | 备注 | +|-----| ---- |-----------| ---- | +| 0 | obj | 推荐视频1 | | +| n | obj | 推荐视频(n+1) | | +| …… | obj | …… | …… | +| 13 | obj | 推荐视频13 | | + +`data`数组中的对象: + +基本同「[获取视频详细信息(web端)](info.md#获取视频详细信息(web端))」中的data对象 + +`abtest`对象: + +| 字段 | 类型 | 内容 | 备注 | +|-------|-----|------|-----| +| group | str | 用户分组 | | + +**示例:** + +获取新版web端首页推荐视频列表 + +```shell +curl -G 'http://api.bilibili.com/x/web-interface/index/top/rcmd' \ +--data-urlencode 'fresh_type=3' \ +--data-urlencode 'version=1' \ +--data-urlencode 'ps=10' \ +--data-urlencode 'fresh_idx=1' \ +--data-urlencode 'fresh_idx_1h=1' +``` + +
+查看响应示例: + +```json +{ + "code": 0, + "message": "0", + "ttl": 1, + "data": { + "item": [ + { + "id": 511495739, + "bvid": "BV1Cu411z7mG", + "cid": 717978243, + "goto": "av", + "uri": "http://www.bilibili.com/video/BV1Cu411z7mG", + "pic": "http://i2.hdslb.com/bfs/archive/e05f487bc9f26baa568f10fe69a0e1ea5e0fbc23.jpg", + "title": "请大家助力我的梦想!为凑够10万赞,在街头唱《Be Crazy For Me》!", + "duration": 199, + "pubdate": 1652605500, + "owner": { + "mid": 1723817, + "name": "樱萍Apple", + "face": "http://i2.hdslb.com/bfs/face/6e0fa1bdbbf7e0dd929d968df3b57ca99d187e25.jpg" + }, + "stat": { + "view": 263169, + "like": 39871, + "danmaku": 543 + }, + "avfeature": "{\"ctr\":0.192554,\"wdur\":2.323159,\"duration\":213.318313,\"wdlks\":0.685926,\"multi_score_0\":0.452564,\"multi_score_1\":0.112414,\"multi_score_2\":0.03976,\"rankscore\":13.906487,\"av_play\":258890,\"av_like\":39224,\"av_coin\":7165,\"reason_type\":3,\"av_feature\":\"|real_matchtype -1 |s_e online_av2av_v2 |source_len 1 |m_k_w 0 \"}", + "isfollowed": 0, + "rcmdreason": { + "content": "3万点赞", + "reasontype": 3 + }, + "showinfo": 1, + "trackid": "web_pegasus_0.shylf-ai-recsys-1355.165525355529.398" + } + ...... + ], + "userfeature": "{\"enter_rank\":1500,\"is_fallback\":0,\"s_fresh_idx\":41,\"s_fresh_idx_session\":31,\"s_session_idx\":1,\"fresh_idx\":1,\"fresh_idx_1h\":1}", + "abtest": { + "group": "b" + } + } +} +``` + +
\ No newline at end of file From 47a157e08b8098ca4f07dc5dae80c0a497b1a62f Mon Sep 17 00:00:00 2001 From: Zhengyang Song Date: Mon, 10 Jul 2023 23:34:14 +0800 Subject: [PATCH 054/159] Fill in the correct API URL of dynamic/space. (#736) --- docs/dynamic/space.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dynamic/space.md b/docs/dynamic/space.md index c801efb..f9d1fce 100644 --- a/docs/dynamic/space.md +++ b/docs/dynamic/space.md @@ -1,6 +1,6 @@ # 获取用户空间动态 -> 接口URL +> https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/space 请求方式:`GET` From aa233779e1a909168338d7252b0a7a11f167592d Mon Sep 17 00:00:00 2001 From: SocialSisterYi <1440239038@qq.com> Date: Tue, 11 Jul 2023 22:36:38 +0800 Subject: [PATCH 055/159] =?UTF-8?q?=E6=9B=B4=E6=96=B0gRPC=20proto=E5=AE=9A?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bilibili/app/dynamic/v2/dynamic.proto | 10 ++ .../dagw/component/avatar/common/common.proto | 109 ++++++++++++++++- .../dagw/component/avatar/v1/avatar.proto | 113 +++++++++++++++++- .../dagw/component/avatar/v1/plugin.proto | 91 ++++++++++++++ 4 files changed, 321 insertions(+), 2 deletions(-) create mode 100644 grpc_api/bilibili/dagw/component/avatar/v1/plugin.proto diff --git a/grpc_api/bilibili/app/dynamic/v2/dynamic.proto b/grpc_api/bilibili/app/dynamic/v2/dynamic.proto index 0cb27da..5ca37c9 100644 --- a/grpc_api/bilibili/app/dynamic/v2/dynamic.proto +++ b/grpc_api/bilibili/app/dynamic/v2/dynamic.proto @@ -785,6 +785,16 @@ message CampusHomePagesReq { int32 page_type = 6; } +// +enum CampusRcmdReqFrom { + CAMPUS_RCMD_FROM_UNKNOWN = 0; + CAMPUS_RCMD_FROM_HOME_UN_OPEN = 1; + CAMPUS_RCMD_FROM_VISIT_OTHER = 2; + CAMPUS_RCMD_FROM_HOME_MOMENT = 3; + CAMPUS_RCMD_FROM_DYN_MOMENT = 4; + CAMPUS_RCMD_FROM_PAGE_SUBORDINATE_MOMENT = 5; +} + // enum CampusHomePageType { // diff --git a/grpc_api/bilibili/dagw/component/avatar/common/common.proto b/grpc_api/bilibili/dagw/component/avatar/common/common.proto index 0ffdd02..4823322 100644 --- a/grpc_api/bilibili/dagw/component/avatar/common/common.proto +++ b/grpc_api/bilibili/dagw/component/avatar/common/common.proto @@ -1 +1,108 @@ -// TODO \ No newline at end of file +syntax = "proto3"; + +package bilibili.dagw.component.avatar.common; + +// +message BasicRenderSpec { + // + double opacity = 1; +} + +// +message ColorConfig { + // + bool is_dark_mode_aware = 1; + // + ColorSpec day = 2; + // + ColorSpec night = 3; +} + +// +message ColorSpec { + // + string argb = 1; +} + +// +message LayerGeneralSpec { + // + PositionSpec pos_spec = 1; + // + SizeSpec size_spec = 2; + // + BasicRenderSpec render_spec = 3; +} + +// +message MaskProperty { + // + LayerGeneralSpec general_spec = 1; + // + ResourceSource mask_src = 2; +} + +// +message NativeDrawRes { + // + int32 draw_type = 1; + // + int32 fill_mode = 2; + // + ColorConfig color_config = 3; + // + double edge_weight = 4; +} + +// +message PositionSpec { + // + int32 coordinate_pos = 1; + // + double axis_x = 2; + // + double axis_y = 3; +} + +// +message RemoteRes { + // + string url = 1; + // + string bfs_style = 2; +} + +// +message ResourceSource { + // + enum LocalRes { + LOCAL_RES_INVALID = 0; + LOCAL_RES_ICON_VIP = 1; + LOCAL_RES_ICON_SMALL_VIP = 2; + LOCAL_RES_ICON_PERSONAL_VERIFY = 3; + LOCAL_RES_ICON_ENTERPRISE_VERIFY = 4; + LOCAL_RES_ICON_NFT_MAINLAND = 5; + LOCAL_RES_DEFAULT_AVATAR = 6; + } + // + int32 src_type = 1; + // + int32 placeholder = 2; + // + oneof res { + // + RemoteRes remote = 3; + // + LocalRes local = 4; + // + NativeDrawRes draw = 5; + } +} + +// +message SizeSpec { + // + double width = 1; + // + double height = 2; +} \ No newline at end of file diff --git a/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto b/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto index 0ffdd02..f4ced14 100644 --- a/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto +++ b/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto @@ -1 +1,112 @@ -// TODO \ No newline at end of file +syntax = "proto3"; + +package bilibili.dagw.component.avatar.v1; + +import "bilibili/dagw/component/avatar/common/common.proto"; +import "bilibili/dagw/component/avatar/v1/plugin.proto"; + +// +message AvatarItem { + // + bilibili.dagw.component.avatar.common.SizeSpec container_size = 1; + // + repeated LayerGroup layers = 2; + // + LayerGroup fallback_layers = 3; + // + int64 mid = 4; +} + +// +message BasicLayerResource { + // + int32 res_type = 1; + // + oneof payload { + // + ResImage res_image = 2; + // + ResAnimation res_animation = 3; + /// + ResNativeDraw res_native_draw = 4; + }; +} + +// +message GeneralConfig { + // + map web_css_style = 1; +} + +// +message Layer { + // + string layer_id = 1; + // + bool visible = 2; + // + LayerGeneralSpec general_spec = 3; + // + LayerConfig layer_config = 4; + // + BasicLayerResource resource = 5; +} + +// +message LayerConfig { + // + map tags = 1; + // + bool is_critical = 2; + // + bool allow_over_paint = 3; + // + MaskProperty layer_mask = 4; +} + +// +message LayerGroup { + // + string group_id = 1; + // + repeated Layer layers = 2; + // + MaskProperty group_mask = 3; + // + bool is_critical_group = 4; +} + +// +message LayerTagConfig { + // + int32 config_type = 1; + // + oneof config { + // + GeneralConfig general_config = 2; + // + bilibili.dagw.component.avatar.v1.plugin.GyroConfig gyro_config = 3; + // + bilibili.dagw.component.avatar.v1.plugin.CommentDoubleClickConfig comment_doubleClick_config = 4; + // + bilibili.dagw.component.avatar.v1.plugin.LiveAnimeConfig live_anime_config = 5; + }; +} + +// +message ResAnimation { + // + ResourceSource webp_src = 1; +} + +// +message ResImage { + // + ResourceSource image_src = 1; +} + +// +message ResNativeDraw { + // + ResourceSource draw_src = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/dagw/component/avatar/v1/plugin.proto b/grpc_api/bilibili/dagw/component/avatar/v1/plugin.proto new file mode 100644 index 0000000..a5d3702 --- /dev/null +++ b/grpc_api/bilibili/dagw/component/avatar/v1/plugin.proto @@ -0,0 +1,91 @@ +syntax = "proto3"; + +package bilibili.dagw.component.avatar.v1.plugin; + +// +message CommentDoubleClickConfig { + // + Interaction interaction = 1; + // + double animation_scale = 2; +} + +// +message GyroConfig { + // + NFTImageV2 gyroscope = 1; +} + +// +message GyroscopeContentV2 { + // + string file_url = 1; + // + float scale = 2; + // + repeated PhysicalOrientationV2 physical_orientation = 3; +} + +// +message GyroscopeEntityV2 { + // + string display_type = 1; + // + repeated GyroscopeContentV2 contents = 2; +} + +// +message Interaction { + // + string nft_id = 1; + // + bool enabled = 2; + // + string itype = 3; + // + string metadata_url = 4; +} + +// +message LiveAnimeConfig { + // + bool is_live = 1; +} + +// +message LiveAnimeItem { + // + ColorConfig color = 1; + // + double start_ratio = 2; + // + double end_ratio = 3; + // + double start_stroke = 4; + // + double start_opacity = 5; + // + int64 phase = 6; +} + +// +message NFTImageV2 { + // + repeated GyroscopeEntityV2 gyroscope = 1; +} + +// +message PhysicalOrientationAnimation { + // + string type = 1; + // + string bezier = 3; +} + +// +message PhysicalOrientationV2 { + // + string type = 1; + // + repeated PhysicalOrientationAnimation animations = 3; +} \ No newline at end of file From f5263d04570c9dcd1d1554a0c67651c532fe1b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AF=92=E5=BD=A4?= <70561268+cxw620@users.noreply.github.com> Date: Fri, 14 Jul 2023 12:46:41 +0800 Subject: [PATCH 056/159] add grpc docs (#741) --- docs/misc/device_identity.md | 104 ++++++++++++ .../bilibili/metadata/fawkes/fawkes.proto | 6 +- grpc_api/bilibili/metadata/metadata.proto | 14 +- .../parabox/{pararbox.proto => parabox.proto} | 0 grpc_api/readme.md | 149 +++++++++++++++--- 5 files changed, 244 insertions(+), 29 deletions(-) create mode 100644 docs/misc/device_identity.md rename grpc_api/bilibili/metadata/parabox/{pararbox.proto => parabox.proto} (100%) diff --git a/docs/misc/device_identity.md b/docs/misc/device_identity.md new file mode 100644 index 0000000..5fae7fd --- /dev/null +++ b/docs/misc/device_identity.md @@ -0,0 +1,104 @@ +# 设备各类标识算法(APP 端) + +## 设备唯一标识 BUVID + +注意区分于 Web 端的 buvid3, buvid4. + +BUVID 在 APP 首次安装于某设备, 且首次启动时生成. + +APP 首次(即每次安装后)启动, 会向云端发送本机各类设备特征, 含 `AndroidId`, `DrmId` 等, 请求是否有匹配的 BUVID, 有就使用云端的, 否则使用本地生成的. + +APP 请求是否有匹配的 BUVID 发送的本机各类设备特征包括(但不限于): + ++ `AndroidID` ++ `DrmId` ++ `IMEI` ++ `OAID` ++ 手机网卡 `MAC` ++ 设备品牌 ++ 设备 Model ++ 本地生成的 BUVID + +### 生成方法 + +1. 选定设备特征码, 可以是 `AndroidID`, `DrmId`, 手机网卡 `MAC` 等. 记为 `ID`. 特别地, `MAC` 应当去掉 `:`, `GUID`(即 UUID) 应当去掉 `-`. + +2. 计算 `ID` 的 MD5. 记为 `ID_MD5`. + +3. 从 `ID_MD5` 抽取第 3, 13, 23 位, 失败就默认为 000, 记为 `ID_E`. + +4. 根据选定的设备特征码类型确定 BUVID Prefix, 见附录. 记为 `BUVID_Prefix`. + +5. 按 `{BUVID_Prefix}{ID_E}{ID_MD5}` 的顺序连接起来, 共37位(2+3+32). 结果应当为大写. + +### Demo + +#### Rust + +代码及测试样例见 [Rust Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=40b5906cf3838a60efa83fa368b15147). + +## 设备指纹 fp (fp_local, fp_remote) + +用于请求账户相关 REST API, 及 gRPC Metadata 生成. + +在请求头中, `fp_local` 和 `fp_remote` 设置为同一值即可, 暂不清楚区别. + +### 生成方法 + +1. 获取 BUVID. 此处一般使用 XU Prefix 的 BUVID. + +2. 获取设备 Model(`Build.MODEL`), 如 `NOH-AN01`. + +3. 获取手机无线电固件版本号(`Build.getRadioVersion()`), 失败则留空. 如 `21C20B686S000C000,21C20B686S000C000`. + +4. 按前述顺序拼接字符串, 计算得 MD5. + +5. 获取年月日, 格式 `yyyyMMddhhmmss`, 拼接到 4 得到的字符串后. + +6. 生成 16 位随机字符串, CharSet 为 `0123456789abcdef`, 拼接到 5 得到的字符串后, 记为 `fp_raw`. + +7. 计算得到一个特殊字符串, 拼接到 `fp_raw` 后, 即得到最终的 `fp`, 特殊字符串算法见下: + +```rust +let mut veri_code = 0; +// 有点像 HEX 的操作 +let fp_raw_sub_str = fp_raw + .as_bytes() // 将字符串 fp_raw 转换为字节数组 + .chunks(2) // 按每两个字节一组进行切分 + .map(|s| unsafe { ::std::str::from_utf8_unchecked(s) }) // 对每一组解析作为 UTF-8 字符串 + .collect::>(); // 将结果收集到 Vec 中 +// 如果 fp_raw 的长度小于 62, 则向下取偶数减半作为循环终止条件, 否则终止条件为31 +for i in 0..({ + if fp_raw.len() < 62 { + fp_raw.len() - fp_raw.len() % 2 // 取偶数 + } else { + 62 + } +} / 2) +{ + // 将每组字符串转换为对应的 16 进制整数, 将转换得到的整数加到 veri_code 上. + veri_code += i32::from_str_radix(fp_raw_sub_str[i], 16).unwrap_or(0); +} +// 最后将 veri_code 对 256 取余, 格式化为两位的 16 进制字符串 +let veri_code = format!("{:0>2x}", veri_code % 256); +``` + +### Demo + +#### Rust + +代码及测试样例见 [Rust Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=40b5906cf3838a60efa83fa368b15147). + +## 附录 + +### BUVID Prefix + +|设备特征码|BUVID Prefix|备注| +|:-:|:-:|:-:| +|`AndroidID`|`XX`|| +|`DrmId`|`XU`|| +|`IMEI`|`XZ`|已弃用| +|`GUID`|`XW`|已弃用| +|`MAC`|`XY`|| +|`GoogleId`|`XG`|东南亚版本| +|`FacebookId`|`XF`|东南亚版本| diff --git a/grpc_api/bilibili/metadata/fawkes/fawkes.proto b/grpc_api/bilibili/metadata/fawkes/fawkes.proto index dfdbfa1..6cbc18f 100644 --- a/grpc_api/bilibili/metadata/fawkes/fawkes.proto +++ b/grpc_api/bilibili/metadata/fawkes/fawkes.proto @@ -12,10 +12,10 @@ message FawkesReply { // message FawkesReq { - // 客户端在fawkes系统的唯一名 + // 客户端在fawkes系统的唯一名, 如 `android64` string appkey = 1; - // 客户端在fawkes系统中的环境参数 + // 客户端在fawkes系统中的环境参数, 如 `prod` string env = 2; - // 启动id + // 启动id, 32 位 0~9, a~z 组成的字符串 string session_id = 3; } diff --git a/grpc_api/bilibili/metadata/metadata.proto b/grpc_api/bilibili/metadata/metadata.proto index 9af2607..9befe06 100644 --- a/grpc_api/bilibili/metadata/metadata.proto +++ b/grpc_api/bilibili/metadata/metadata.proto @@ -5,18 +5,18 @@ package bilibili.metadata; // 请求元数据 // gRPC头部:x-bili-metadata-bin message Metadata { - // 登录Token + // 登录 access_key string access_key = 1; - // 包类型 + // 包类型, 如 `android` string mobi_app = 2; - // 运行设备 + // 运行设备, 留空即可 string device = 3; - // 构建id + // 构建id, 如 `7380300` int32 build = 4; - // APP分发渠道 + // APP分发渠道, 如 `master` string channel = 5; - // 设备buvid + // 设备唯一标识 string buvid = 6; - // 平台类型 + // 平台类型, 如 `android` string platform = 7; } diff --git a/grpc_api/bilibili/metadata/parabox/pararbox.proto b/grpc_api/bilibili/metadata/parabox/parabox.proto similarity index 100% rename from grpc_api/bilibili/metadata/parabox/pararbox.proto rename to grpc_api/bilibili/metadata/parabox/parabox.proto diff --git a/grpc_api/readme.md b/grpc_api/readme.md index ea0e57f..b388543 100644 --- a/grpc_api/readme.md +++ b/grpc_api/readme.md @@ -1,38 +1,149 @@ -# grpc 接口定义(protobuf 结构体) +# gRPC 接口定义(protobuf 结构体) 注: -1. proto 结构体文件按照包名分类,同级放在同一目录中 +1. proto 结构体文件按照包名分类, 同级放在同一目录中 -2. 暂时无说明文档,稍后添加 +2. gRPC 接口定义全部来自对官方粉版(即大陆版本) APP 的逆向工程, 一般不会有错误, 但是可能有更新, 有实际应用需求的建议自行反编译 APP, 定位到 `com.bapis.*` 自行补足. -3. 以下文件全部来自 apk 的逆向工程,如有疏漏请包涵 +## gRPC 主机 -## grpc 主机 +B 站客户端的 gRPC 接口主机包括: -B 站客户端的 grpc 接口主机为以下服务器 ++ `grpc.biliapi.net` 原生 gRPC 接口 ++ `app.bilibili.com` Failover gRPC 接口 -> grpc.biliapi.net -> -> app.bilibili.com +实际应用中, 后者速度相对更快. 但是需要设置如 gRPC 超时时间等参数时只能使用前者. -## grpc 鉴权 +## gRPC 鉴权 -需要在请求 http 头部中添加`access_key`,如下 +需要在 Metadata 中添加 `authorization`: `identify_v1 {access_key}`. -``` -authorization:identify_v1 {access_key} -``` +## gRPC Metadata -## grpc 头部 +参考 [gRPC Go 官方文档](https://github.com/grpc/grpc-go/blob/master/Documentation/grpc-metadata.md) 对 `Metadata` 的说明. + +gRPC 的 `Metadata` 简单理解,就是 HTTP 的 Header 中的 key-value 对, 本质上是一个 Map. 在 gRPC `Metadata` 中,key 永远是 String,但是 value 可以是 String 也可以是二进制数据. **需要存储二进制数据时, key 应当加上一个 `-bin` 后缀, 同时二进制 value 应当编码为 Base64**. + +一般而言, 设定 Binary 类型的 `Metadata` 时, 需要调用各个语言的 gRPC 库的相应方法, 库会帮我们编码二进制数据, 无需我们自行编码. + +需要的 `Metadata` 包括(但不限于): + ++ Ascii 类 + + `user-agent` 客户端 UA, 如 `Dalvik/2.1.0 (Linux; U; Android 12; {device_model} Build/{device_build}) {app_ver} os/android model/{device_model} mobi_app/{mobi_app} build/{app_build} channel/master innerVer/{app_build_inner} osVer/12 network/2 grpc-java-cronet/1.36.1`(其中 `grpc-java-cronet/1.36.1` 为原生 gRPC 接口才需要的). **必需**. + + `device_model` 设备 Model, 如 `NOH-AN01`. + + `device_build` 设备 Build, 如 `HUAWEINOH-AN01`. + + `app_ver` APP 版本号, 如 `7.38.0`. + + `mobi_app` APP 包类型, 参考 [APPKey.md](/docs/misc/sign/APPKey.md). + + `app_build` APP 版本号, 如 `7380300`. + + `app_build_inner` APP 版本号(内部), 如 `7380310`. 实际应用中设置为 `app_build` 即可. + + `x-bili-gaia-vtoken` 暂时留空. + + `x-bili-aurora-eid` 如 `UFUFQ1AA`. 算法见附录. 未登录留空. **必需**. + + `x-bili-mid` 用户 UID, 未登录默认为 0. **必需**. + + `x-bili-aurora-zone` 留空. **必需**. + + `x-bili-trace-id` 如 `06e903399574695df75be114ff63ac64:f75be114ff63ac64:0:0`. 算法见附录. **必需**. + + `authorization` 鉴权, 登录时设定为 `identify_v1 {access_key}`, 未登录时无需此项. + + `buvid` 设备唯一标识, 算法见 [device_identity.md](/docs/misc/device_identity.md). **必需(?)**. + + `bili-http-engine` 恒定为 `cronet`, 使用 `grpc.biliapi.net` 作为 gRPC 主机时无需此项. + + `te` 恒定为 `trailers`, Java gRPC 库固定添加, 使用 `app.bilibili.com` 作为 gRPC 主机时无需此项. ++ Binary 类 + + `x-bili-fawkes-req-bin` 设备 Fawkes 信息, 使用 [FawkesReq](bilibili/metadata/fawkes/fawkes.proto) 生成. **必需**. + + `x-bili-metadata-bin` 使用 [Metadata](bilibili/metadata/metadata.proto) 生成. **必需**. + + `x-bili-device-bin` 设备信息, 使用 [Device](bilibili/metadata/device/device.proto) 生成. **必需**. + + `x-bili-network-bin` 设备网络信息, 使用 [Network](bilibili/metadata/network/network.proto) 生成. **必需**. + + `x-bili-restriction-bin` 限制信息, 使用 [Restriction](bilibili/metadata/restriction/restriction.proto) 生成. 本项一般直接传空值即可. **必需**. + + `x-bili-locale-bin` 设备区域信息, 使用 [Locale](bilibili/metadata/locale/locale.proto) 生成. **必需**. + + `x-bili-exps-bin` 使用 [Exps](bilibili/metadata/pararbox/pararbox.proto) 生成. 本项一般直接传空值即可. **必需**. -- [bilibili.metadata](bilibili/metadata):客户端环境参数 -- [bilibili.rpc](bilibili/rpc/status.proto):响应错误信息 ## 接口请求定义 -_稍后补充_ +等待补充, 参见 proto 文件注释. 以下仅介绍常用接口: -## 示例 ++ [bilibili.app.playeronline.v1 -> PlayerOnline](bilibili/app/playeronline/v1/playeronline.proto) 视频在线人数接口. ++ [bilibili.app.playerunite.v1 -> PlayViewUnite](bilibili/app/playerunite/v1/playerunite.proto) United 视频播放链接接口(同时适用于 PGC, UGC 视频). ++ [bilibili.app.playurl.v1 -> PlayURL](bilibili/app/playurl/v1/playurl.proto) UGC 视频播放链接接口(V1 版本). ++ [bilibili.pgc.gateway.player.v1 -> PlayView](bilibili/pgc/gateway/player/v1/playurl.proto) PGC 视频播放链接接口(V1 版本). ++ [bilibili.pgc.gateway.player.v2 -> PlayView](bilibili/pgc/gateway/player/v2/playurl.proto) PGC 视频播放链接接口(V2 版本). ++ [bilibili.polymer.app.search.v1 -> SearchAll, etc](bilibili/polymer/app/search/v1/search.proto) 搜索接口(V1 版本). ++ [bilibili.app.dynamic.v2 -> DynAll, etc](bilibili/app/dynamic/v2/dynamic.proto) 动态接口(V2 版本). ++ ... + +## 应用示例 + +### Golang B 站 gRPC API Golang 封装:[XiaoMiku01/bilibili-grpc-api-go](https://github.com/XiaoMiku01/bilibili-grpc-api-go) + +## 附录 + +
+点此展开 + +### `x-bili-aurora-eid` 生成算法 + +```rust +pub fn gen_aurora_eid(uid: u64) -> Option { + if uid == 0 { + return None; + } + let mut result_byte = Vec::with_capacity(64); + // 1. 将 UID 字符串转为字节数组. + let mid_byte = uid.to_string().into_bytes(); + // 2. 将字节数组逐位(记为第 i 位)与 b"ad1va46a7lza" 中第 (i % 12) 位进行异或操作, 作为结果数组第 i 位. + mid_byte.iter().enumerate().for_each(|(i, v)| { + result_byte.push(v ^ (b"ad1va46a7lza"[i % 12])) + }); + // 3. 对字节数组执行 Base64 编码, 注意 no padding, 即得到 x-bili-aurora-eid. + Some(base64::Engine::encode( + &base64::engine::general_purpose::STANDARD_NO_PAD, + result_byte, + )) +} +``` + +### `x-bili-trace-id` 生成算法 + +```rust +pub fn gen_trace_id() -> String { + // 1. 生成 32 位随机字符串 random_id , Charset 为 0~9, a~z. + let random_id = gen_random_string!(32); + let mut random_trace_id = String::with_capacity(40); + // 2. 取 random_id 前 24 位, 作为 random_trace_id. + random_trace_id.push_str(&random_id[0..24]); + // 3. 初始化一个长度为 3 的数组 b_arr, 初始值都为 0. + let mut b_arr: [i8; 3] = [0i8; 3]; + // 并获取当前时间戳 + let mut ts = chrono::Local::now().timestamp(); + // 使用循环从高位到低位遍历 b_arr 数组, 循环体内执行以下逻辑: + // - 首先将 ts 右移 8 位 + // - 然后根据条件向 b_arr 的第 i 位赋值: + // - 如果 (ts / 128) % 2的结果为0, 则 b_arr[i] = ts % 256 + // - 否则 b_arr[i] = ts % 256 - 256 + for i in (0..3).rev() { + ts >>= 8; + b_arr[i] = { + if ((ts / 128) % 2) == 0 { + (ts % 256) as i8 + } else { + (ts % 256 - 256) as i8 + } + } + } + // 4. 将数组 b_arr 中的每个元素逐个转换为两位的十六进制字符串并追加到 random_trace_id 中. + for i in 0..3 { + random_trace_id.push_str(&format!("{:0>2x}", b_arr[i])) + } + // 5. 将 random_id 的第 31, 32 个字符追加到 random_trace_id 中, 此时 random_trace_id 生成完毕, 应当为 32 位长度. + random_trace_id.push_str(&random_id[30..32]); + // 6. 最后, 按 `{random_trace_id}:{random_trace_id[16..32]}:0:0` 的顺序拼接起来, 即为 x-bili-trace-id + let mut random_trace_id_final = String::with_capacity(64); + random_trace_id_final.push_str(&random_trace_id); + random_trace_id_final.push_str(":"); + random_trace_id_final.push_str(&random_trace_id[16..32]); + random_trace_id_final.push_str(":0:0"); + random_trace_id_final +} +``` + +
From 563dd3f7231e65564f438d43bd6c8fc6a365a235 Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Mon, 17 Jul 2023 07:33:25 +0800 Subject: [PATCH 057/159] =?UTF-8?q?=E4=BF=AE=E5=A4=8DgRPC=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E6=96=87=E4=BB=B6=E7=9A=84=E4=B8=80=E4=BA=9B=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20(#743)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复一些协议文件错误 * 删除上次提交添加的无效注释 * 修复类型包名错误 * 修复Campus服务返回类型 --- .../bilibili/app/distribution/v1/distribution.proto | 2 ++ grpc_api/bilibili/app/dynamic/v2/campus.proto | 2 +- grpc_api/bilibili/app/dynamic/v2/dynamic.proto | 2 +- grpc_api/bilibili/app/interfaces/v1/history.proto | 2 +- grpc_api/bilibili/app/interfaces/v1/media.proto | 2 +- grpc_api/bilibili/app/interfaces/v1/search.proto | 2 +- grpc_api/bilibili/app/interfaces/v1/space.proto | 2 +- grpc_api/bilibili/app/listener/v1/listener.proto | 2 +- .../bilibili/dagw/component/avatar/v1/avatar.proto | 12 ++++++------ .../bilibili/dagw/component/avatar/v1/plugin.proto | 4 +++- 10 files changed, 18 insertions(+), 14 deletions(-) diff --git a/grpc_api/bilibili/app/distribution/v1/distribution.proto b/grpc_api/bilibili/app/distribution/v1/distribution.proto index 87972f3..71c9947 100644 --- a/grpc_api/bilibili/app/distribution/v1/distribution.proto +++ b/grpc_api/bilibili/app/distribution/v1/distribution.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package bilibili.app.distribution.v1; +import "google/protobuf/any.proto"; + // APP配置 service Distribution { // 获取云端储存的用户偏好 diff --git a/grpc_api/bilibili/app/dynamic/v2/campus.proto b/grpc_api/bilibili/app/dynamic/v2/campus.proto index 3859c2e..1f94706 100644 --- a/grpc_api/bilibili/app/dynamic/v2/campus.proto +++ b/grpc_api/bilibili/app/dynamic/v2/campus.proto @@ -10,7 +10,7 @@ import "bilibili/app/dynamic/v2/dynamic.proto"; service Campus { // - rpc WaterFlowRcmd (WaterFlowRcmdReq) returns (WaterFlowRcmdReply); + rpc WaterFlowRcmd (WaterFlowRcmdReq) returns (WaterFlowRcmdResp); } // diff --git a/grpc_api/bilibili/app/dynamic/v2/dynamic.proto b/grpc_api/bilibili/app/dynamic/v2/dynamic.proto index 5ca37c9..07e749e 100644 --- a/grpc_api/bilibili/app/dynamic/v2/dynamic.proto +++ b/grpc_api/bilibili/app/dynamic/v2/dynamic.proto @@ -780,7 +780,7 @@ message CampusHomePagesReq { // double lng = 4; // - PlayerArgs player_args = 5; + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 5; // int32 page_type = 6; } diff --git a/grpc_api/bilibili/app/interfaces/v1/history.proto b/grpc_api/bilibili/app/interfaces/v1/history.proto index 7690cac..3723963 100644 --- a/grpc_api/bilibili/app/interfaces/v1/history.proto +++ b/grpc_api/bilibili/app/interfaces/v1/history.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.app.interfaces.v1; +package bilibili.app.interface.v1; import "bilibili/app/archive/middleware/v1/preload.proto"; diff --git a/grpc_api/bilibili/app/interfaces/v1/media.proto b/grpc_api/bilibili/app/interfaces/v1/media.proto index ca90359..440430a 100644 --- a/grpc_api/bilibili/app/interfaces/v1/media.proto +++ b/grpc_api/bilibili/app/interfaces/v1/media.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.app.interfaces.v1; +package bilibili.app.interface.v1; // service Media { diff --git a/grpc_api/bilibili/app/interfaces/v1/search.proto b/grpc_api/bilibili/app/interfaces/v1/search.proto index 75459da..1654c54 100644 --- a/grpc_api/bilibili/app/interfaces/v1/search.proto +++ b/grpc_api/bilibili/app/interfaces/v1/search.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.app.interfaces.v1; +package bilibili.app.interface.v1; // 搜索 service Search { diff --git a/grpc_api/bilibili/app/interfaces/v1/space.proto b/grpc_api/bilibili/app/interfaces/v1/space.proto index 65f6c0b..236dca3 100644 --- a/grpc_api/bilibili/app/interfaces/v1/space.proto +++ b/grpc_api/bilibili/app/interfaces/v1/space.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.app.interfaces.v1; +package bilibili.app.interface.v1; import "bilibili/app/archive/middleware/v1/preload.proto"; import "bilibili/app/archive/v1/archive.proto"; diff --git a/grpc_api/bilibili/app/listener/v1/listener.proto b/grpc_api/bilibili/app/listener/v1/listener.proto index 6c431fa..5485e71 100644 --- a/grpc_api/bilibili/app/listener/v1/listener.proto +++ b/grpc_api/bilibili/app/listener/v1/listener.proto @@ -287,7 +287,7 @@ message DetailItem { // string history_tag = 13; // - bilibili.app.interfaces.v1.DeviceType device_type = 14; + bilibili.app.interface.v1.DeviceType device_type = 14; // FavFolder ugc_season_info = 15; } diff --git a/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto b/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto index f4ced14..d1be861 100644 --- a/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto +++ b/grpc_api/bilibili/dagw/component/avatar/v1/avatar.proto @@ -45,7 +45,7 @@ message Layer { // bool visible = 2; // - LayerGeneralSpec general_spec = 3; + bilibili.dagw.component.avatar.common.LayerGeneralSpec general_spec = 3; // LayerConfig layer_config = 4; // @@ -61,7 +61,7 @@ message LayerConfig { // bool allow_over_paint = 3; // - MaskProperty layer_mask = 4; + bilibili.dagw.component.avatar.common.MaskProperty layer_mask = 4; } // @@ -71,7 +71,7 @@ message LayerGroup { // repeated Layer layers = 2; // - MaskProperty group_mask = 3; + bilibili.dagw.component.avatar.common.MaskProperty group_mask = 3; // bool is_critical_group = 4; } @@ -96,17 +96,17 @@ message LayerTagConfig { // message ResAnimation { // - ResourceSource webp_src = 1; + bilibili.dagw.component.avatar.common.ResourceSource webp_src = 1; } // message ResImage { // - ResourceSource image_src = 1; + bilibili.dagw.component.avatar.common.ResourceSource image_src = 1; } // message ResNativeDraw { // - ResourceSource draw_src = 1; + bilibili.dagw.component.avatar.common.ResourceSource draw_src = 1; } \ No newline at end of file diff --git a/grpc_api/bilibili/dagw/component/avatar/v1/plugin.proto b/grpc_api/bilibili/dagw/component/avatar/v1/plugin.proto index a5d3702..7e88289 100644 --- a/grpc_api/bilibili/dagw/component/avatar/v1/plugin.proto +++ b/grpc_api/bilibili/dagw/component/avatar/v1/plugin.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package bilibili.dagw.component.avatar.v1.plugin; +import "bilibili/dagw/component/avatar/common/common.proto"; + // message CommentDoubleClickConfig { // @@ -55,7 +57,7 @@ message LiveAnimeConfig { // message LiveAnimeItem { // - ColorConfig color = 1; + bilibili.dagw.component.avatar.common.ColorConfig color = 1; // double start_ratio = 2; // From 8cbfc6c7daa0257401453872ff4e0d9c6c68a0f9 Mon Sep 17 00:00:00 2001 From: nailvcoronation Date: Sat, 22 Jul 2023 23:13:29 +1000 Subject: [PATCH 058/159] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8C=85=E5=86=85=E5=AE=B9=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?typo=20(#748)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/live/message_stream.md | 88 ++++++++++++++++++++++++++++++++++--- 1 file changed, 82 insertions(+), 6 deletions(-) diff --git a/docs/live/message_stream.md b/docs/live/message_stream.md index dc97599..c598d3e 100644 --- a/docs/live/message_stream.md +++ b/docs/live/message_stream.md @@ -294,6 +294,9 @@ json格式 | ---- | ---- | ------ | --------- | | cmd | str | "DANMU_MSG" | 如果是弹幕消息,内容则是"DANMU_MSG" | | info | array | 这条弹幕的用户、内容与粉丝勋章等各种信息 | 待调查其中每个数据的含义 | +| is_report | bool | false | 含义待调查 | +| msg_id | str | 消息id | | +| send_time | num | 毫秒时间戳 | |