mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2025-01-30 05:40:08 +08:00
添加发送弹幕的api并更新科技区相关信息
This commit is contained in:
parent
ffd5f0e8b6
commit
98ecfccbf9
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,4 +5,3 @@ live/info_flow.md
|
||||
bangumi/info.md
|
||||
bangumi/ststus_number.md
|
||||
live/live_manage.md
|
||||
danmaku/action.md
|
||||
|
10
README.md
10
README.md
@ -48,9 +48,9 @@
|
||||
- [实时弹幕&弹幕格式](danmaku/danmaku.md)√
|
||||
- [历史弹幕](danmaku/history.md)√
|
||||
- [快照](danmaku/snapshot.md)√
|
||||
- 弹幕操作
|
||||
- [弹幕操作](danmaku/action.md)×
|
||||
- [专栏](article)
|
||||
- [基本信息](article/info.md)
|
||||
- [基本信息](article/info.md)×
|
||||
- 点赞&投币&收藏
|
||||
- 文集基本信息
|
||||
- 音频
|
||||
@ -76,8 +76,8 @@
|
||||
- 列表查询相关
|
||||
- 电磁力相关
|
||||
- [实时广播](broadcast)
|
||||
- [总则](broadcast/general.md)
|
||||
- [视频内广播](broadcast/video_room.md)
|
||||
- [总则](broadcast/general.md)√
|
||||
- [视频内广播](broadcast/video_room.md)√
|
||||
- 分区实时在线
|
||||
- [充电](electric)
|
||||
- [B币方式](electric/Bcoin.md)√
|
||||
@ -119,7 +119,7 @@ B站专栏同步推出[《B站api研究记》](https://www.bilibili.com/read/rea
|
||||
|
||||
(重要的话说三遍,本人不承担任何责任)
|
||||
|
||||
<img src="https://i2.hdslb.com/bfs/face/480e2e98513aaeb65d2f2c76dbae750c4de722e9.jpg" width="100" height="100"/>
|
||||
<img src="https://i2.hdslb.com/bfs/face/480e2e98513aaeb65d2f2c76dbae750c4de722e9.jpg@100w_100h" />
|
||||
|
||||
**--by [社会易姐QwQ](https://space.bilibili.com/293793435)**
|
||||
|
||||
|
69
danmaku/action.md
Normal file
69
danmaku/action.md
Normal file
@ -0,0 +1,69 @@
|
||||
# 弹幕操作
|
||||
|
||||
## 发送视频弹幕
|
||||
|
||||
> http://api.bilibili.com/x/v2/dm/post
|
||||
|
||||
*方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
**参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| -------- | ---- | ---------------------- | ------ | ------------------------------------------------------------ |
|
||||
| type | data | 1 | 必要 | |
|
||||
| oid | data | 视频CID | 必要 | |
|
||||
| msg | data | 弹幕内容 | 必要 | 长度小于100字符 |
|
||||
| bvid | data | 视频bvID | 非必要 | avID与bvID任选一个 |
|
||||
| aid | data | 视频avID | 非必要 | avID与bvID任选一个 |
|
||||
| progress | data | 弹幕出现在视频内的时间 | 非必要 | 单位为毫秒<br />默认为0 |
|
||||
| color | data | 弹幕颜色设置 | 非必要 | 详见[「弹幕」中的属性 p](danmaku.md#属性 p)<br />默认为16777215(#FFFFFF)白色 |
|
||||
| fontsize | data | 弹幕字号设置 | 非必要 | 详见[「弹幕」中的属性 p](danmaku.md#属性 p)<br />默认为25 |
|
||||
| pool | data | 弹幕池选择 | 非必要 | 0:普通弹幕<br />1:字幕弹幕<br />默认为0 |
|
||||
| mode | data | 弹幕类型选择 | 必要 | 详见[「弹幕」中的属性 p](danmaku.md#属性 p) |
|
||||
| rnd | data | 16位10进制随机数 | 非必要 | **若无此项,则发送弹幕冷却时间限制为90s**<br />若有此项,则发送弹幕冷却时间限制为5s |
|
||||
| csrf | data | cookies中的bili_jct | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-102:账号被封停<br />-111:csrf校验失败<br />-400:请求错误<br />-404:无此项<br />36702:弹幕长度大于100<br />36703:发送频率过快<br />36711:该视频禁止发送弹幕<br />36714:弹幕出现时刻超过视频总时长<br />**(其他错误码有待补充)** |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | 作用尚不明确 |
|
||||
| data | obj | 信息本体 | |
|
||||
|
||||
`data`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| -------- | ---- | ------ | ------------ |
|
||||
| action | str | 空 | 作用尚不明确 |
|
||||
| dmid | num | 弹幕ID | |
|
||||
| dmid_str | str | 弹幕ID | 字串形式 |
|
||||
| visible | bool | true | 作用尚不明确 |
|
||||
|
||||
**示例:**
|
||||
|
||||
为视频`av2`/`BV1xx411c7mD`(CID为`62131`)的5s位置发送一条弹幕`前来考古`(颜色为#FFFFFF,字号25,普通弹幕,游动弹幕)
|
||||
|
||||
curl -b "SESSDATA=xxx" -d "type=1&oid=62131&msg=%e5%89%8d%e6%9d%a5%e8%80%83%e5%8f%a4&aid=2&progress=5000&color=16777215&fontsize=25&pool=0&mode=1&rnd=3456789987654321&csrf=xxx" "http://api.bilibili.com/x/v2/dm/post"
|
||||
|
||||
同curl -b "SESSDATA=xxx" -d "type=1&oid=62131&msg=%e5%89%8d%e6%9d%a5%e8%80%83%e5%8f%a4&bvid=BV1xx411c7mD&progress=5000&color=16777215&fontsize=25&pool=0&mode=1&rnd=3456789987654321&csrf=xxx" "http://api.bilibili.com/x/v2/dm/post"
|
||||
|
||||
```json
|
||||
{
|
||||
"code":0,
|
||||
"message":"0",
|
||||
"ttl":1,
|
||||
"data":{
|
||||
"action":"",
|
||||
"dmid":32161968826613767,
|
||||
"dmid_str":"32161968826613767",
|
||||
"visible":true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -92,15 +92,16 @@
|
||||
|
||||
<img src="/imgs/zone/technology.svg" width="100" height="100"/>
|
||||
|
||||
| 名称 | 代号 | tID | 简介 | url路由 |
|
||||
| -------------- | ------------- | ---- | ------------------------------------------------ | --------------------------- |
|
||||
| 科技(主分区) | technology | 36 | | /v/technology |
|
||||
| 趣味科普人文 | fun | 124 | 含有科普或人文性质的视频 | /v/technology/fun |
|
||||
| 野生技术协会 | wild | 122 | 展示一定改装/创作能力的视频 | /v/technology/wild |
|
||||
| 演讲·公开课 | speech_course | 39 | 演讲、教育课程相关的视频 | /v/technology/speech_course |
|
||||
| 星海 | military | 96 | 军事相关视频 | /v/technology/military |
|
||||
| 机械 | mechanical | 98 | 机械设备展示或制作视频 | /v/technology/mechanical |
|
||||
| 汽车 | automobile | 176 | 汽车、摩托车、公交车以及竞赛用车等轮式交通工具相 | /v/technology/automobile |
|
||||
| 名称 | 代号 | tID | 简介 | url路由 |
|
||||
| ---------------------------- | ------------- | ---- | ------------------------------------------------------------ | --------------------------- |
|
||||
| 科技(主分区) | technology | 36 | | /v/technology |
|
||||
| 科学科普 | science | 201 | 回答你的十万个为什么 | /v/technology/science |
|
||||
| 社科人文~~(趣味科普人文)~~ | fun | 124 | 聊聊财经/社会/法律,看看历史趣闻,品品人文艺术~~(含有科普或人文性质的视频)~~ | /v/technology/fun |
|
||||
| 野生技术协会 | wild | 122 | 是时候展现真正的技术了~~(展示一定改装/创作能力的视频)~~ | /v/technology/wild |
|
||||
| 演讲·公开课 | speech_course | 39 | 涨知识的好地方,给爱学习的你~~(演讲、教育课程相关的视频)~~ | /v/technology/speech_course |
|
||||
| 星海 | military | 96 | 军事类内容的圣地~~(军事相关视频)~~ | /v/technology/military |
|
||||
| 机械 | mechanical | 98 | 机械设备展示或制作视频 | /v/technology/mechanical |
|
||||
| 汽车 | automobile | 176 | 让我们共同感受驰骋的快感~~(汽车、摩托车、公交车以及竞赛用车等轮式交通工具相)~~ | /v/technology/automobile |
|
||||
|
||||
## 数码
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user