mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2025-01-29 21:30:10 +08:00
例行更新
This commit is contained in:
parent
0ebcc2995c
commit
a372355616
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,4 +4,3 @@ user/space.md
|
||||
login/password&SMS.md
|
||||
B站API.txt
|
||||
video/info.md
|
||||
video/snapshot.md
|
||||
|
28
README.md
28
README.md
@ -7,6 +7,8 @@
|
||||
**不断更新中....**
|
||||
|
||||
计划整理分类&目录:
|
||||
|
||||
- cookie
|
||||
- 文章
|
||||
- 音频
|
||||
- 番剧
|
||||
@ -14,16 +16,32 @@
|
||||
- 评论区
|
||||
- 创作中心
|
||||
- 弹幕
|
||||
- 实时弹幕
|
||||
- 历史弹幕
|
||||
- 弹幕快照
|
||||
- 弹幕操作
|
||||
- 动态
|
||||
- 历史&稍后再看
|
||||
- 发送动态
|
||||
- 动态列表
|
||||
- 历史&收藏
|
||||
- 历史记录
|
||||
- 稍后再看
|
||||
- 收藏夹
|
||||
- 直播
|
||||
- [登录](https://github.com/SocialSisterYi/bilibili-API-collect/tree/master/login)
|
||||
- [二维码登录](https://github.com/SocialSisterYi/bilibili-API-collect/tree/master/login/QR.md)√
|
||||
- 密码&短信登录
|
||||
- qq&微博登录
|
||||
- 登录基本信息
|
||||
- [用户](https://github.com/SocialSisterYi/bilibili-API-collect/tree/master/user)
|
||||
- [基本信息](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/user/info.md)√
|
||||
- [状态数](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/user/status_number.md)√
|
||||
- 关系
|
||||
- 个人空间
|
||||
- [视频](https://github.com/SocialSisterYi/bilibili-API-collect/tree/master/video)
|
||||
- [状态数](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/video/status_number.md)√
|
||||
- [快照](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/video/snapshot.md)√
|
||||
- 赞&币&收
|
||||
|
||||
B站专栏同步推出[《B站api研究记》](https://www.bilibili.com/read/readlist/rl207146)系列,欢迎关注
|
||||
|
||||
@ -36,3 +54,11 @@ B站专栏同步推出[《B站api研究记》](https://www.bilibili.com/read/rea
|
||||
![](https://i2.hdslb.com/bfs/face/480e2e98513aaeb65d2f2c76dbae750c4de722e9.jpg)
|
||||
|
||||
**--by [社会易姐QwQ](https://space.bilibili.com/293793435)**
|
||||
|
||||
|
||||
|
||||
备注:
|
||||
|
||||
不了解http的请移步,[传送门](https://www.cnblogs.com/an-wen/p/11180076.html)
|
||||
|
||||
不了解json的请移步,[传送门](https://www.sojson.com/json/json_index.html)
|
@ -32,7 +32,7 @@ data 对象:
|
||||
示例:
|
||||
|
||||
http://passport.bilibili.com/qrcode/getLoginUrl
|
||||
```
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"status": true,
|
||||
@ -78,7 +78,7 @@ data 对象:
|
||||
示例:(重要token已河蟹处理)
|
||||
|
||||
curl -d "oauthKey=xxx" "http://passport.bilibili.com/qrcode/getLoginInfo"
|
||||
```
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"status": true,
|
||||
@ -93,7 +93,7 @@ curl -d "oauthKey=xxx" "http://passport.bilibili.com/qrcode/getLoginInfo"
|
||||
|
||||
可明显看见设置了几个cookie(本人手打cookie,成功登录B站)(重要token已河蟹处理)
|
||||
|
||||
```
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Date: Wed, 04 Mar 2020 10:36:37 GMT
|
||||
Content-Type: application/json;charset=UTF-8
|
||||
|
10
user/info.md
10
user/info.md
@ -60,7 +60,7 @@ vip 对象:
|
||||
示列:
|
||||
|
||||
http://api.bilibili.com/x/space/acc/info?mid=2
|
||||
```
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
@ -108,8 +108,8 @@ api.bilibili.com/x/web-interface/card
|
||||
| -------| -------------------- | ------ |--------------- |
|
||||
| mid | 用户UID | 必要 | |
|
||||
| photo | 是否请求用户主页头图 | 非必要 | true是 false否 |
|
||||
|
||||
|
||||
|
||||
|
||||
**json回复:**
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ----- | --------- | ------------------ |
|
||||
@ -213,7 +213,7 @@ space 对象:
|
||||
示列:
|
||||
|
||||
http://api.bilibili.com/x/web-interface/card?mid=2&photo=true
|
||||
```
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
@ -381,7 +381,7 @@ level_exp 对象:
|
||||
示例:
|
||||
|
||||
http://api.bilibili.com/x/space/myinfo
|
||||
```
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
|
@ -30,7 +30,7 @@ data 对象:
|
||||
示例:
|
||||
|
||||
http://api.bilibili.com/x/relation/stat?vmid=332704117
|
||||
```
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
@ -84,7 +84,7 @@ article 对象:
|
||||
示例:
|
||||
|
||||
http://api.bilibili.com/x/space/upstat?mid=456664753
|
||||
```
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
@ -151,7 +151,7 @@ favourite 对象:
|
||||
示例:
|
||||
|
||||
http://api.bilibili.com/x/space/navnum?mid=23920239
|
||||
```
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
|
193
video/snapshot.md
Normal file
193
video/snapshot.md
Normal file
@ -0,0 +1,193 @@
|
||||
# 视频快照
|
||||
|
||||
## 获取视频快照1(用于进度条预览)
|
||||
api.bilibili.com/x/player/videoshot
|
||||
|
||||
*方式:GET*
|
||||
|
||||
参数:
|
||||
| 参数名 | 内容 | 必要性 | 备注 |
|
||||
| ------ | ------------------ | ------ | ------------- |
|
||||
| aid | 视频avID | 必要 | |
|
||||
| cid | 分P CID | 非必要 | 无为1P |
|
||||
| index | json数组截取时间表 | 非必要 | 1需要 0不需要 |
|
||||
|
||||
**json回复:**
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | -------------------------------- |
|
||||
| code | num | 返回值 | 0成功 40001请求错误 40003无视频 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | 作用尚不明确 |
|
||||
| data | obj | 信息本体 | |
|
||||
|
||||
data 对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ---------- | ----- | ---------------------- | --------- |
|
||||
| pvdata | str | bin格式截取时间表url | |
|
||||
| img_x_len | num | 每行图片数 | 一般为10 |
|
||||
| img_y_len | num | 每列图片数 | 一般为10 |
|
||||
| img_x_size | num | 每张图片长 | 一般为160 |
|
||||
| img_y_size | num | 每张图片宽 | 一般为90 |
|
||||
| image | array | 图片拼版 | |
|
||||
| index | array | json数组格式截取时间表 | 无为空 |
|
||||
|
||||
image 数组(类型:str):
|
||||
|
||||
| 项 | 内容 | 备注 |
|
||||
| ---- | ----------------- | -------------------------- |
|
||||
| 0 | 图片拼版1 url | jpg |
|
||||
| n | 图片拼版(n+1) url | 第一张拼版占满时延续第二张 |
|
||||
| …… | …… | …… |
|
||||
|
||||
index 数组(类型:num):
|
||||
|
||||
| 项 | 内容 | 备注 |
|
||||
| ---- | --------------- | --------------- |
|
||||
| 0 | 恒为0 | |
|
||||
| 1 | 图片1 截取时间 | 视频0秒截取时间 |
|
||||
| n | 图片n 截取时间 | 单位为秒 |
|
||||
| …… | …… | 单位为秒 |
|
||||
|
||||
示例:
|
||||
|
||||
http://api.bilibili.com/x/player/videoshot?aid=26273789&index=1
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
"ttl": 1,
|
||||
"data": {
|
||||
"pvdata": "//i0.hdslb.com/bfs/videoshot/49075258.bin",
|
||||
"img_x_len": 10,
|
||||
"img_y_len": 10,
|
||||
"img_x_size": 160,
|
||||
"img_y_size": 90,
|
||||
"image": ["//i0.hdslb.com/bfs/videoshot/49075258.jpg", "//i0.hdslb.com/bfs/videoshot/49075258-1.jpg"],
|
||||
"index": [0, 0, 8, 14, 19, 25, 34, 40, 46, 56, 63, 70, 80, 87, 93, 100, 109, 117, 124, 133, 142, 148, 156, 164, 171, 179, 184, 192, 198, 206, 214, 223, 232, 239, 246, 254, 261, 269, 275, 283, 289, 299, 305, 310, 315, 322, 330, 339, 348, 358, 364, 371, 376, 382, 391, 404, 413, 421, 426, 434, 441, 452, 458, 463, 473, 479, 491, 497, 504, 514, 521, 528, 533, 540, 546, 552, 558, 567, 575, 586, 591, 602, 609, 615, 623, 629, 639, 647, 653, 658, 664, 670, 675, 684, 691, 698, 713, 724, 729, 737, 743, 754, 762, 772, 779, 784, 797, 803, 810, 817, 825, 834, 845, 851, 857, 867, 878, 888, 896, 903, 909, 914, 919, 928, 935, 944, 958, 970, 977, 988, 996, 1004, 1011, 1018, 1026, 1035, 1041, 1048, 1055, 1063, 1073, 1079, 1086, 1095, 1106, 1111, 1124, 1135, 1147, 1153, 1159, 1165, 1171, 1184, 1198, 1209, 1215, 1221, 1228, 1236, 1242, 1253, 1258, 1269, 1276, 1284, 1289, 1300, 1306, 1315, 1321, 1328, 1340, 1347, 1354, 1361, 1366, 1371, 1383, 1390, 1396, 1403, 1415]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 获取视频快照2 (用于封面预览)
|
||||
|
||||
api.bilibili.com/pvideo
|
||||
*方式:GET*
|
||||
|
||||
内容与「获取视频快照1」加参数「index」=1相同,但url带有转义,仅限第1P
|
||||
|
||||
| 参数名 | 内容 | 必要性 | 备注 |
|
||||
| ------ | -------- | ------ | ---- |
|
||||
| aid | 视频avID | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------- |
|
||||
| code | num | 返回值 | 0成功 40001请求错误 -404无视频 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | 作用尚不明确 |
|
||||
| data | obj | 信息本体 | |
|
||||
|
||||
data 对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ---------- | ----- | ---------------------- | --------- |
|
||||
| pvdata | str | bin格式截取时间表url | |
|
||||
| img_x_len | num | 每行图片数 | 一般为10 |
|
||||
| img_y_len | num | 每列图片数 | 一般为10 |
|
||||
| img_x_size | num | 每张图片长 | 一般为160 |
|
||||
| img_y_size | num | 每张图片宽 | 一般为90 |
|
||||
| image | array | 图片拼版 | |
|
||||
| index | array | json数组格式截取时间表 | 无为空 |
|
||||
|
||||
image 数组(类型:str):
|
||||
|
||||
| 项 | 内容 | 备注 |
|
||||
| ---- | ----------------- | -------------------------- |
|
||||
| 0 | 图片拼版1 url | jpg |
|
||||
| n | 图片拼版(n+1) url | 第一张拼版占满时延续第二张 |
|
||||
| …… | …… | …… |
|
||||
|
||||
index 数组(类型:num):
|
||||
|
||||
| 项 | 内容 | 备注 |
|
||||
| ---- | --------------- | --------------- |
|
||||
| 0 | 恒为0 | |
|
||||
| 1 | 图片1 截取时间 | 视频0秒截取时间 |
|
||||
| n | 图片n 截取时间 | 单位为秒 |
|
||||
| …… | …… | 单位为秒 |
|
||||
|
||||
示例:
|
||||
|
||||
http://api.bilibili.com/pvideo?aid=26273789
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
"ttl": 1,
|
||||
"data": {
|
||||
"pvdata": "\/\/i0.hdslb.com\/bfs\/videoshot\/49075258.bin",
|
||||
"img_x_len": 10,
|
||||
"img_y_len": 10,
|
||||
"img_x_size": 160,
|
||||
"img_y_size": 90,
|
||||
"image": ["\/\/i0.hdslb.com\/bfs\/videoshot\/49075258.jpg", "\/\/i0.hdslb.com\/bfs\/videoshot\/49075258-1.jpg"],
|
||||
"index": [0, 0, 8, 14, 19, 25, 34, 40, 46, 56, 63, 70, 80, 87, 93, 100, 109, 117, 124, 133, 142, 148, 156, 164, 171, 179, 184, 192, 198, 206, 214, 223, 232, 239, 246, 254, 261, 269, 275, 283, 289, 299, 305, 310, 315, 322, 330, 339, 348, 358, 364, 371, 376, 382, 391, 404, 413, 421, 426, 434, 441, 452, 458, 463, 473, 479, 491, 497, 504, 514, 521, 528, 533, 540, 546, 552, 558, 567, 575, 586, 591, 602, 609, 615, 623, 629, 639, 647, 653, 658, 664, 670, 675, 684, 691, 698, 713, 724, 729, 737, 743, 754, 762, 772, 779, 784, 797, 803, 810, 817, 825, 834, 845, 851, 857, 867, 878, 888, 896, 903, 909, 914, 919, 928, 935, 944, 958, 970, 977, 988, 996, 1004, 1011, 1018, 1026, 1035, 1041, 1048, 1055, 1063, 1073, 1079, 1086, 1095, 1106, 1111, 1124, 1135, 1147, 1153, 1159, 1165, 1171, 1184, 1198, 1209, 1215, 1221, 1228, 1236, 1242, 1253, 1258, 1269, 1276, 1284, 1289, 1300, 1306, 1315, 1321, 1328, 1340, 1347, 1354, 1361, 1366, 1371, 1383, 1390, 1396, 1403, 1415]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 图片拼版
|
||||
|
||||
以160x90像素为一张,横向10张,纵向10张,从左到右从上到下进行裁剪
|
||||
|
||||
图1为0s,图2为8s,图3为14s,以此类推……
|
||||
|
||||
示例拼版图片url:http://i0.hdslb.com/bfs/videoshot/49075258.jpg
|
||||
|
||||
![](http://i0.hdslb.com/bfs/videoshot/49075258.jpg)
|
||||
|
||||
## bin格式截取时间表
|
||||
|
||||
bin的内容为uint16数组,与json数组格式一一对应
|
||||
|
||||
0第项恒为0,从第1项开始作为截取图片的时间(秒)
|
||||
|
||||
示例bin格式截取时间表url:http://i0.hdslb.com/bfs/videoshot/49075258.bin
|
||||
|
||||
```
|
||||
0000000 0000 0000 0800 0e00 1300 1900 2200 2800
|
||||
0000010 2e00 3800 3f00 4600 5000 5700 5d00 6400
|
||||
0000020 6d00 7500 7c00 8500 8e00 9400 9c00 a400
|
||||
0000030 ab00 b300 b800 c000 c600 ce00 d600 df00
|
||||
0000040 e800 ef00 f600 fe00 0501 0d01 1301 1b01
|
||||
0000050 2101 2b01 3101 3601 3b01 4201 4a01 5301
|
||||
0000060 5c01 6601 6c01 7301 7801 7e01 8701 9401
|
||||
0000070 9d01 a501 aa01 b201 b901 c401 ca01 cf01
|
||||
0000080 d901 df01 eb01 f101 f801 0202 0902 1002
|
||||
0000090 1502 1c02 2202 2802 2e02 3702 3f02 4a02
|
||||
00000a0 4f02 5a02 6102 6702 6f02 7502 7f02 8702
|
||||
00000b0 8d02 9202 9802 9e02 a302 ac02 b302 ba02
|
||||
00000c0 c902 d402 d902 e102 e702 f202 fa02 0403
|
||||
00000d0 0b03 1003 1d03 2303 2a03 3103 3903 4203
|
||||
00000e0 4d03 5303 5903 6303 6e03 7803 8003 8703
|
||||
00000f0 8d03 9203 9703 a003 a703 b003 be03 ca03
|
||||
0000100 d103 dc03 e403 ec03 f303 fa03 0204 0b04
|
||||
0000110 1104 1804 1f04 2704 3104 3704 3e04 4704
|
||||
0000120 5204 5704 6404 6f04 7b04 8104 8704 8d04
|
||||
0000130 9304 a004 ae04 b904 bf04 c504 cc04 d404
|
||||
0000140 da04 e504 ea04 f504 fc04 0405 0905 1405
|
||||
0000150 1a05 2305 2905 3005 3c05 4305 4a05 5105
|
||||
0000160 5605 5b05 6705 6e05 7405 7b05 8705
|
||||
```
|
||||
|
@ -39,7 +39,7 @@ data 对象:
|
||||
示例:
|
||||
|
||||
http://api.bilibili.com/archive_stat/stat?aid=91572143
|
||||
```
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
|
Loading…
Reference in New Issue
Block a user