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