feat: 更新web端视频操作播放合集相关接口 (#1064)
- [d1a4f6d](https://github.com/SocialSisterYi/bilibili-API-collect/pull/1064/commits/d1a4f6dd2b4e5d57188d56671b1dfacc299ea3fd) close #1062 ~by myself~ - [ff450a6](https://github.com/SocialSisterYi/bilibili-API-collect/pull/1064/commits/ff450a65693dbdc3c9a78a05c67ddbc1a783a532) add Wbi API - [b3c3fce](https://github.com/SocialSisterYi/bilibili-API-collect/pull/1064/commits/b3c3fce1646e72985e46492224554ba8b505849a) close #707 - [fa6c9c8](https://github.com/SocialSisterYi/bilibili-API-collect/pull/1064/commits/fa6c9c8f575a617f6603935b5a77c9624dd5b9fb) new method of `buvid3` & `b_nut` from #790 - [45755b0](https://github.com/SocialSisterYi/bilibili-API-collect/pull/1064/commits/45755b01d8d9593d50658de83322dd79e7b45e21#diff-1a8d1ba142e61d01fd3b24620847ca2f2ff93f880973ea1e1d71de79d0123096R133) close #380 - [45755b0](https://github.com/SocialSisterYi/bilibili-API-collect/pull/1064/commits/45755b01d8d9593d50658de83322dd79e7b45e21#diff-1a8d1ba142e61d01fd3b24620847ca2f2ff93f880973ea1e1d71de79d0123096R542) add details in #244 - [1c5b778](https://github.com/SocialSisterYi/bilibili-API-collect/pull/1064/commits/1c5b7788f717f92a0e3f655e947db49e842f80e0) - [85e8fc5](https://github.com/SocialSisterYi/bilibili-API-collect/pull/1064/commits/85e8fc5304d94ccb7480545e38201219b71370ad) close #945
This commit is contained in:
+38
-1
@@ -1,4 +1,4 @@
|
||||
# 获取 buvid3 / buvid4
|
||||
# 获取 buvid3 / buvid4 / b_nut
|
||||
|
||||
## 游客获取 buvid3 / buvid4
|
||||
|
||||
@@ -46,3 +46,40 @@ curl -G 'https://api.bilibili.com/x/frontend/finger/spi'
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## 从响应头获取 buvid3 / b_nut
|
||||
|
||||
使用 `GET` 或 `HEAD` 方法请求 `https://www.bilibili.com/`, 且请求头中 `User-Agent` 字段不包含 `curl` `python` `awa` 等敏感子字符串, 且相同 `User-Agent` 字段不得短时多次请求. 在响应头中的 `Set-Cookie` 字段中, 即可找到 `buvid3` 和 `b_nut`.
|
||||
|
||||
若不带任何 Cookie 请求, 则 `b_nut` 为响应生成时刻的 UNIX 秒级时间戳.
|
||||
若请求 Cookie 仅带有 `buvid3`, 则 `b_nut` 为 `100`.
|
||||
若请求 Cookie 仅带有 `b_nut`, 则与不带任何 Cookie 的响应相同.
|
||||
若请求 Cookie 仅带有 `buvid3` 和 `b_nut`, 则响应无 `Set-Cookie` 字段.
|
||||
若请求 Cookie 带有其他字段, 无影响.
|
||||
|
||||
**示例:**
|
||||
|
||||
```shell
|
||||
curl -I "https://www.bilibili.com/" -A "awa"
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>查看响应示例:</summary>
|
||||
|
||||
```http
|
||||
HTTP/2 200
|
||||
date: Fri, 26 Jul 2024 06:38:43 GMT
|
||||
content-type: text/html; charset=utf-8
|
||||
support: nantianmen
|
||||
set-cookie: buvid3=805E4894-96A2-0684-6F00-C6EA1FFB911023315infoc; path=/; expires=Sat, 26 Jul 2025 06:38:43 GMT; domain=.bilibili.com
|
||||
set-cookie: b_nut=1721975923; path=/; expires=Sat, 26 Jul 2025 06:38:43 GMT; domain=.bilibili.com
|
||||
vary: Origin,Accept-Encoding
|
||||
idc: shjd
|
||||
expires: Fri, 26 Jul 2024 06:38:42 GMT
|
||||
cache-control: no-cache
|
||||
x-cache-webcdn: MISS from blzone01
|
||||
x-cache-time: 0
|
||||
x-save-date: Fri, 26 Jul 2024 06:38:43 GMT
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user