From 4dac6cc2d0013c06c5cdf397d9dfc72a1c3531c4 Mon Sep 17 00:00:00 2001 From: LaMerChiang Date: Sun, 1 Oct 2023 17:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E6=B3=A8=E9=83=A8=E5=88=86=20wbi=20?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=20(#827)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update space.md * update wbi * update wbi * Update list.md * Update space.md --- docs/article/list.md | 6 +++++- docs/comment/list.md | 6 +++++- docs/danmaku/danmaku_proto.md | 2 ++ docs/search/hot.md | 6 +++++- docs/search/search_request.md | 12 ++++++++++-- docs/user/space.md | 28 +++++++++++++++++++--------- docs/video/info.md | 4 ++++ docs/video/videostream_url.md | 6 +++++- 8 files changed, 55 insertions(+), 15 deletions(-) diff --git a/docs/article/list.md b/docs/article/list.md index cf457e447a..29098bca06 100644 --- a/docs/article/list.md +++ b/docs/article/list.md @@ -2,12 +2,16 @@ ## 获取用户专栏文章列表 -> https://api.bilibili.com/x/space/article +> https://api.bilibili.com/x/space/wbi/article + +> ~~https://api.bilibili.com/x/space/article~~(旧链接) *请求方式:GET* 认证方式:Cookie(SESSDATA) +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + **url参数:** | 参数名 | 类型 | 内容 | 必要性 | 备注 | diff --git a/docs/comment/list.md b/docs/comment/list.md index 71ccfd4830..90731ac87f 100644 --- a/docs/comment/list.md +++ b/docs/comment/list.md @@ -856,12 +856,16 @@ curl -G 'https://api.bilibili.com/x/v2/reply' \ ## 获取评论区明细_懒加载 -> https://api.bilibili.com/x/v2/reply/main +> https://api.bilibili.com/x/v2/reply/wbi/main + +> ~~https://api.bilibili.com/x/v2/reply/main~~ *请求方式:GET* 认证方式:Cookie(SESSDATA)或APP +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + **url参数:** | 参数名 | 类型 | 内容 | 必要性 | 备注 | diff --git a/docs/danmaku/danmaku_proto.md b/docs/danmaku/danmaku_proto.md index ad7f18c846..b21bd3218c 100644 --- a/docs/danmaku/danmaku_proto.md +++ b/docs/danmaku/danmaku_proto.md @@ -8,6 +8,8 @@ > https://api.bilibili.com/x/v2/dm/web/seg.so (web端) > +> https://api.bilibili.com/x/v2/dm/wbi/web/seg.so (web 端新接口,需要 wbi 认证) +> > https://api.bilibili.com/x/v2/dm/list/seg.so (APP端) > > https://i0.hdslb.com/bfs/dm/{data}.bin (BAS/代码弹幕专包) diff --git a/docs/search/hot.md b/docs/search/hot.md index 907087d24e..02fdf2e4c8 100644 --- a/docs/search/hot.md +++ b/docs/search/hot.md @@ -2,10 +2,14 @@ ## 获取默认搜索内容(web端) -> https://api.bilibili.com/x/web-interface/search/default +> https://api.bilibili.com/x/web-interface/wbi/search/default + +> ~~https://api.bilibili.com/x/web-interface/search/default~~ (旧链接) *请求方式:GET* +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + 默认搜索为搜索框中默认填充内容,用于官方推荐内容,若不输入点击搜索按钮跳转为`url`中的链接 **json回复:** diff --git a/docs/search/search_request.md b/docs/search/search_request.md index e4b2ad6c54..becab32a32 100644 --- a/docs/search/search_request.md +++ b/docs/search/search_request.md @@ -4,12 +4,16 @@ ## 综合搜索(web端) -> https://api.bilibili.com/x/web-interface/search/all/v2 +> https://api.bilibili.com/x/web-interface/wbi/search/all/v2 + +> ~~https://api.bilibili.com/x/web-interface/search/all/v2~~ (旧链接) *方式:GET* 认证方式:Cookie(SESSDATA) +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + 返回和关键字相关的20条信息 综合搜索为默认搜索方式,主要用于优先搜索用户、影视、番剧、游戏、话题等,并加载第一页的20项相关视频,还用于展示各个类型的结果数目,便于进一步分类搜索 @@ -579,12 +583,16 @@ curl -G 'https://api.bilibili.com/x/web-interface/search/all/v2' \ ## 分类搜索(web端) -> https://api.bilibili.com/x/web-interface/search/type +> https://api.bilibili.com/x/web-interface/wbi/search/type + +> ~~https://api.bilibili.com/x/web-interface/search/type~~ (旧链接) *请求方式:GET* 认证方式:Cookie(SESSDATA) +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + 根据关键词进行搜索,返回结果每页20项 **url参数:** diff --git a/docs/user/space.md b/docs/user/space.md index 91e9850a6b..f815b9bf2d 100644 --- a/docs/user/space.md +++ b/docs/user/space.md @@ -1523,20 +1523,24 @@ curl -G 'http://space.bilibili.com/x/space/coin/video' \ ### 查询用户投稿视频明细 -> https://api.bilibili.com/x/space/arc/search +> https://api.bilibili.com/x/space/wbi/arc/search + +> ~~https://api.bilibili.com/x/space/arc/search~~ (已废弃,保留是方便遇到问题的人搜索到此处) *请求方式:GET* +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + **url参数:** -| 参数名 | 类型 | 内容 | 必要性 | 备注 | -| ------- | ---- | ------------ | ------ | ------------------------------------------------------------ | -| mid | num | 目标用户mid | 必要 | | +| 参数名 | 类型 | 内容 | 必要性 | 备注 | +| ------- | ---- | ------------ | ------ | ----------------------------------------------------------------------------- | +| mid | num | 目标用户mid | 必要 | | | order | str | 排序方式 | 非必要 | 默认为pubdate
最新发布:pubdate
最多播放:click
最多收藏:stow | -| tid | num | 筛选目标分区 | 非必要 | 默认为0
0:不进行分区筛选
分区tid为所筛选的分区 | -| keyword | str | 关键词筛选 | 非必要 | 用于使用关键词搜索该UP主视频稿件 | -| pn | num | 页码 | 必要 | | -| ps | num | 每页项数 | 必要 | | +| tid | num | 筛选目标分区 | 非必要 | 默认为0
0:不进行分区筛选
分区tid为所筛选的分区 | +| keyword | str | 关键词筛选 | 非必要 | 用于使用关键词搜索该UP主视频稿件 | +| pn | num | 页码 | 非必要 | 默认为 `1` | +| ps | num | 每页项数 | 非必要 | 默认为 `30` | **json回复:** @@ -1556,6 +1560,9 @@ curl -G 'http://space.bilibili.com/x/space/coin/video' \ | list | obj | 列表信息 | | | page | obj | 页面信息 | | | episodic_button | obj | “播放全部“按钮 | | +| is_risk | bool | | | +| gaia_res_type | num | | | +| gaia_data | obj | | | `data`中的`list`对象: @@ -1592,17 +1599,20 @@ curl -G 'http://space.bilibili.com/x/space/coin/video' \ | 字段 | 类型 | 内容 | 备注 | | -------------- | ---- | -------------- | ---------------------------- | | aid | num | 稿件avid | | +| attribute | num | | | | author | str | 视频UP主 | 不一定为目标用户(合作视频) | | bvid | str | 稿件bvid | | | comment | num | 视频评论数 | | -| copyright | str | 空 | 作用尚不明确 | +| copyright | str | 视频版权类型 | | | created | num | 投稿时间 | 时间戳 | | description | str | 视频简介 | | +| enable_vt | num | | | | hide_click | bool | false | 作用尚不明确 | | is_pay | num | 0 | 作用尚不明确 | | is_union_video | num | 是否为合作视频 | 0:否
1:是 | | length | str | 视频长度 | MM:SS | | mid | num | 视频UP主mid | 不一定为目标用户(合作视频) | +| meta | obj | | 无数据时为 null | | pic | str | 视频封面 | | | play | num | 视频播放次数 | | | review | num | 0 | 作用尚不明确 | diff --git a/docs/video/info.md b/docs/video/info.md index e83c03bef0..9d51162394 100644 --- a/docs/video/info.md +++ b/docs/video/info.md @@ -534,10 +534,14 @@ https://i1.hdslb.com/bfs/archive/ea0dd34bf41e23a68175680a00e3358cd249105f.jpg > https://api.bilibili.com/x/web-interface/view/detail +> https://api.bilibili.com/x/web-interface/wbi/view/detail + *请求方式:GET* 认证方式:Cookie(SESSDATA) +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + 限制游客访问的视频需要登录 **url参数:** diff --git a/docs/video/videostream_url.md b/docs/video/videostream_url.md index 90ee955a04..964c0849cb 100644 --- a/docs/video/videostream_url.md +++ b/docs/video/videostream_url.md @@ -69,12 +69,16 @@ ## 获取视频流地址_web端 -> https://api.bilibili.com/x/player/playurl +> https://api.bilibili.com/x/player/wbi/playurl + +> ~~https://api.bilibili.com/x/player/playurl~~ (旧链接) *请求方式:GET* 认证方式:Cookie(SESSDATA) +鉴权方式:[Wbi 签名](../misc/sign/wbi.md) + --- 关于视频流会员鉴权: