2020-07-30 23:29:40 +08:00
|
|
|
|
# 弹幕快照
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
# 获取弹幕快照
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
2020-04-02 16:53:01 +08:00
|
|
|
|
> http://api.bilibili.com/x/v2/dm/ajax
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:GET*
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
2020-04-02 16:53:01 +08:00
|
|
|
|
最近产生的几条弹幕内容,**最多20条**
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
2020-06-08 22:44:46 +08:00
|
|
|
|
**url参数:**
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
2020-06-08 22:44:46 +08:00
|
|
|
|
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
|
|
|
|
| ------ | -------- | ------------------ | ------ | ---- |
|
2020-10-11 15:41:50 +08:00
|
|
|
|
| aid | num或str | 稿件avID或稿件bvID | 必要 | |
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
|
|
|
|
**json回复:**
|
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
根对象:
|
|
|
|
|
|
2020-04-06 17:23:43 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ----- | -------- | --------------------------------------------- |
|
|
|
|
|
| code | num | 返回值 | 0:成功<br />-400:请求错误<br />-404:无视频 |
|
|
|
|
|
| message | str | 错误信息 | 默认为0 |
|
2020-07-17 23:50:28 +08:00
|
|
|
|
| ttl | num | 1 | |
|
2020-04-06 17:23:43 +08:00
|
|
|
|
| data | array | 预览列表 | |
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
2020-03-21 14:37:55 +08:00
|
|
|
|
`data`数组:
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
|
|
|
|
| 项 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ---- | ---- | --------------- | -------- |
|
|
|
|
|
| 0 | str | 预览内容1 | |
|
|
|
|
|
| n | str | 预览内容(n+1) | |
|
|
|
|
|
| …… | str | …… | …… |
|
|
|
|
|
| 19 | str | 预览内容20 | 最后一条 |
|
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
**示例:**
|
|
|
|
|
|
|
|
|
|
获取视频`av43337021`/`BV1rb411m7gE`的弹幕快照,总计20条
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
avID方式:
|
2020-03-18 17:13:30 +08:00
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
```shell
|
2020-10-16 19:31:41 +08:00
|
|
|
|
curl -G 'http://api.bilibili.com/x/v2/dm/ajax' \
|
2020-07-18 23:56:10 +08:00
|
|
|
|
--data-urlencode 'aid=43337021'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
bvID方式:
|
|
|
|
|
|
|
|
|
|
```shell
|
2020-10-16 19:31:41 +08:00
|
|
|
|
curl -G 'http://api.bilibili.com/x/v2/dm/ajax' \
|
2020-07-18 23:56:10 +08:00
|
|
|
|
--data-urlencode 'aid=BV1rb411m7gE'
|
|
|
|
|
```
|
2020-03-23 16:46:13 +08:00
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-03-21 14:37:55 +08:00
|
|
|
|
```json
|
2020-03-18 17:13:30 +08:00
|
|
|
|
{
|
|
|
|
|
"code": 0,
|
|
|
|
|
"message": "0",
|
|
|
|
|
"ttl": 1,
|
2020-03-19 22:42:26 +08:00
|
|
|
|
"data": [
|
2020-03-18 17:13:30 +08:00
|
|
|
|
"漫画比动漫好看而且血腥",
|
|
|
|
|
"666",
|
|
|
|
|
"金木小天使",
|
2020-03-19 22:42:26 +08:00
|
|
|
|
"太喜欢了",
|
|
|
|
|
"每天一遍防止抑郁",
|
|
|
|
|
"我还记得土豆那时候还有的看",
|
|
|
|
|
"把在给我摸摸~",
|
|
|
|
|
"突然泪目",
|
|
|
|
|
"感谢野生字幕君",
|
|
|
|
|
"993-7",
|
|
|
|
|
"刚刚出的时候小学看,现在高二了",
|
|
|
|
|
"原版op有这么长吗?搞笑,肯定做了剪辑,op会给你放全歌?",
|
|
|
|
|
"让你看个op 3 : 5 4 秒?",
|
|
|
|
|
"说原版不原版的都是弱智",
|
|
|
|
|
"樱花",
|
|
|
|
|
"请打开洗脑循环食用,请打开洗脑循环食用,请打开洗脑循环食用,请打开洗脑循环食用,请打开洗脑循环食用,",
|
|
|
|
|
"再来亿遍",
|
|
|
|
|
"错的不是我,而是这个世界。",
|
|
|
|
|
"吃货的第一季的最后一季足以让他封神!",
|
|
|
|
|
"+"
|
2020-03-18 17:13:30 +08:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
</details>
|