bilibili-API-collect/video/pbp.md
MineCreeper86 cd410bb56d 格式化
2020-08-31 16:37:38 +08:00

68 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 高能进度条
高能进度条反应了在时域上,单位时间内弹幕发送量的变化趋势
并用曲线顶点表示在进度条上,实现可视化
## 获取弹幕趋势顶点列表
> http://api.bilibili.com/pbp/data
*请求方式GET*
**url参数**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | ---- | ------- | ------ | ---- |
| vid | num | 视频CID | 必要 | |
**json回复**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| -------- | ---- | ------------ | ---------------------------- |
| step_sec | num | 采样间隔时间 | 单位为秒<br />由视频时长决定 |
| tagstr | str | | 作用尚不明确 |
| events | obj | 数据本体 | |
| debug | str | 调试信息 | json字串 |
`events`对象:
| 字段 | 类型 | 内容 | 备注 |
| ------- | ------ | ---------- | ---- |
| default | array | 顶点值列表 | |
`events`对象中的数组:
| 项 | 类型 | 内容 | 备注 |
| ---- | ---- | --------- | -------------------------------- |
| 0 | num | 顶点1 | |
| n | num | 顶点(n+1) | 顶点个数由视频时长和采样时间决定 |
| …… | num | …… | …… |
**示例:**
获取视频`CID=3724723`的获取弹幕趋势顶点列表
```shell
curl -G 'http://api.bilibili.com/pbp/data'\
--data-urlencode 'cid=3724723'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"step_sec": 3,
"tagstr": "pbphide_0&client_&innersign_0&group_eg&nocheck_0&version_&pbphide_0",
"events": {
"default": [0, 8853, 8011, 8043.5, 8602.5, 9377, 18838, 9645, 10396, 10672.5, 10316.5, 9987, 9524, 9040, 9081, 8747, 8517, 8559.5, 8220.5, 8133, 7164, 5626, 4992, 4628.5, 4570.5, 4473.5, 4681.5, 4365.5, 3811.5, 3813, 3883, 4059.5, 4103.5, 4227.5, 4330.5, 4096.5, 4228.5, 4337, 5017, 5897, 6220, 5711.5, 4871.5, 4533, 4364, 3976, 4012, 3985, 3658, 3540, 3789, 3646, 3045, 2769, 2587, 2488.5, 2402.5, 2521.5, 2508.5, 2763.5, 2941.5, 3685.5, 3337.5, 2457, 2313, 2322.5, 2480.5, 2595, 2520, 2173.5, 2058.5, 2268.5, 2312.5, 2847, 1083, 1.5, 2.5, 0, 0, 2]
},
"debug": "{\"max_time\":237,\"zero_points_ratio\":0.025,\"total_dm\":1000,\"event_count\":400147}"
}
```
</details>