返回提交历史
Modified
README.md
+29
-0
Modified
dynamic/publish.md
+1
-1
Modified
electric/Bcoin.md
+1
-1
Modified
electric/charge_msg.md
+1
-1
Modified
user/relation.md
+7
-7
Modified
user/space.md
+117
-0
Modified
video/like_coin_fav.md
+1
-1
XFEstudio/bilibili-API-collect
添加修改空间布局和隐私设置的两个api,并修改格式
3a14612
代码差异
7 个文件
+157
-11
@@ -126,3 +126,32 @@ B站专栏同步推出[《B站api研究记》](https://www.bilibili.com/read/rea
126
126
不了解http的请移步,[传送门](https://www.cnblogs.com/an-wen/p/11180076.html)
127
127
128
128
不了解json的请移步,[传送门](https://www.sojson.com/json/json_index.html)
129
130
131
132
**相关项目**:
133
134
https://github.com/zyzsdy/biliroku
135
136
https://github.com/bilibili-helper/bilibili-helper-o
137
138
https://github.com/apachecn/BiliDriveEx
139
140
https://github.com/apachecn/CDNDrive
141
142
https://github.com/Hsury/BiliDrive
143
144
https://github.com/Tsuk1ko/bilibili-live-chat
145
146
https://github.com/SocialSisterYi/bv2av_convert
147
148
https://github.com/fython/BilibiliAPIDocs
149
150
https://github.com/czp3009/bilibili-api
151
152
https://github.com/Vespa314/bilibili-api
153
154
https://github.com/Hsury/Geetest3-Crack
155
156
https://github.com/Hsury/Bilibili-Toolkit
157
@@ -41,7 +41,7 @@
41
41
42
42
上传了一张图片`test.png`类型为`日常`
43
43
44
curl -b SESSDATA=xxx -F "file_up=@test.png" -F "category=daily" "http://api.vc.bilibili.com/api/v1/drawImage/upload"
44
curl -b "SESSDATA=xxx" -F "file_up=@test.png" -F "category=daily" "http://api.vc.bilibili.com/api/v1/drawImage/upload"
45
45
46
46
```json
47
47
{
@@ -51,7 +51,7 @@
51
51
52
52
~~(自己冲自己QAQ)~~
53
53
54
curl -b SESSDATA=xxx -d "elec_num=20&u
54
curl -b "SESSDATA=xxx" -d "elec_num=20&u
55
55
p_mid=293793435&otype=up&oid=293793435&csrf=xxx" "http://api.bilibili.com/x/ugcpay/trade/elec/pay/quick"
56
56
57
57
```json
@@ -28,7 +28,7 @@
28
28
29
29
成功为交易编号为`BPRG5CEC3VUPOOANA540`的充电操作,添加了内容为`支持一下大佬`的留言
30
30
31
curl -b SESSDATA=xxx -d "csrf=xxx&order_id=BPRG
31
curl -b "SESSDATA=xxx" -d "csrf=xxx&order_id=BPRG
32
32
5CEC3VUPOOANA540&message=%e6%94%af%e6%8c%81%e4%b8%80%e4%b8%8b%e5%a4%a7%e4%bd%ac" "http://api.bilibili.com/x/ugcpay/trade/elec/message"
33
33
34
34
```json
@@ -367,7 +367,7 @@ http://api.bilibili.com/x/relation/followings?vmid=293793435&ps=2&pn=1
367
367
368
368
关注`UID=14082`的用户
369
369
370
curl -b SESSDATA=xxx -d "fid=14082&act=1&re_src=11&csrf=xxx" http://api.bilibili.com/x/relation/modify
370
curl -b SESSDATA=xxx -d "fid=14082&act=1&re_src=11&csrf=xxx" "http://api.bilibili.com/x/relation/modify"
371
371
372
372
```json
373
373
{
@@ -830,7 +830,7 @@ http://api.bilibili.com/x/relation/tag/user?fid=319214221
830
830
831
831
创建了名为`vUP`的分组,得到ID为`216677`
832
832
833
curl -b SESSDATA=xxx -d "tag=vUP&csrf=xxx" http://api.bilibili.com/x/relation/tag/create
833
curl -b SESSDATA=xxx -d "tag=vUP&csrf=xxx" "http://api.bilibili.com/x/relation/tag/create"
834
834
835
835
```json
836
836
{
@@ -875,7 +875,7 @@ curl -b SESSDATA=xxx -d "tag=vUP&csrf=xxx" http://api.bilibili.com/x/relation/ta
875
875
876
876
把ID为`194112`的分组更名为`膜法师`
877
877
878
curl -b SESSDATA=xxx -d "tagid=194112&name=%e8%86%9c%e6%b3%95%e5%b8%88&csrf=xxx" http://api.bilibili.com/x/relation/tag/update
878
curl -b SESSDATA=xxx -d "tagid=194112&name=%e8%86%9c%e6%b3%95%e5%b8%88&csrf=xxx" "http://api.bilibili.com/x/relation/tag/update"
879
879
880
880
```json
881
881
{
@@ -918,7 +918,7 @@ curl -b SESSDATA=xxx -d "tagid=194112&name=%e8%86%9c%e6%b3%95%e5%b8%88&csrf=xxx"
918
918
919
919
删除分组ID为`216699`的分组
920
920
921
curl -b SESSDATA=xxx -d "tagid=216699&csrf=xxx" http://api.bilibili.com/x/relation/tag/del
921
curl -b SESSDATA=xxx -d "tagid=216699&csrf=xxx" "http://api.bilibili.com/x/relation/tag/del"
922
922
923
923
```json
924
924
{
@@ -962,7 +962,7 @@ curl -b SESSDATA=xxx -d "tagid=216699&csrf=xxx" http://api.bilibili.com/x/relati
962
962
963
963
把关注用户`UID=205631797`同时添加分组关系到ID为`-10`和`207542`的分组中
964
964
965
curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" http://api.bilibili.com/x/relation/tags/addUsers
965
curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" "http://api.bilibili.com/x/relation/tags/addUsers"
966
966
967
967
```json
968
968
{
@@ -1004,7 +1004,7 @@ curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" http://api
1004
1004
1005
1005
把关注用户`UID=4856007`和`UID=326499679`同时复制到ID为`231305`的分组中
1006
1006
1007
curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" http://api.bilibili.com/x/relation/tags/copyUsers
1007
curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" "http://api.bilibili.com/x/relation/tags/copyUsers"
1008
1008
1009
1009
```json
1010
1010
{
@@ -1049,7 +1049,7 @@ curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" http:/
1049
1049
69`和`UID=327086920`同时从ID为`207542`的分组移动到ID为`231305`的分组中
1050
1050
1051
1051
curl -b SESSDATA=xxx -d "beforeTagids=207542&afterTagids=231305&fids=3211734
1052
69%2C327086920&csrf=xxx" http://api.bilibili.com/x/relation/tags/moveUsers
1052
69%2C327086920&csrf=xxx" "http://api.bilibili.com/x/relation/tags/moveUsers"
1053
1053
1054
1054
```json
1055
1055
{
@@ -1650,6 +1650,123 @@ curl -b "sessdata=xxx" -d "csrf=xxx¬ice=%E9%B8%BD%E5%AD%90" "http://api.bilib
1650
1650
1651
1651
1652
1652
1653
### 修改空间隐私权限
1654
1655
> http://space.bilibili.com/ajax/settings/setPrivacy
1656
1657
*方式:POST*
1658
1659
需要登录(SESSDATA)
1660
1661
需要验证`DedeUserID`及`DedeUserID__ckMd5`存在且不为0
1662
1663
需要验证`referer`为 `http://www.bilibili.com`或`https://www.bilibili.com`域名下
1664
1665
**参数( application/x-www-form-urlencoded ):**
1666
1667
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
1668
| ----------- | ---- | ------------------- | ------ | ------------------------------ |
1669
| fav_video | data | 收藏视频 | 非必要 | 0:隐藏<br />1:公开<br />下同 |
1670
| bangumi | data | 追番及追剧 | 非必要 | |
1671
| tags | data | 关注的TAG | 非必要 | |
1672
| coins_video | data | 投币的视频 | 非必要 | |
1673
| user_info | data | 个人信息 | 非必要 | |
1674
| played_game | data | 玩过的游戏 | 非必要 | |
1675
| csrf | data | cookies中的bili_jct | 必要 | |
1676
1677
**json回复:**
1678
1679
根对象:
1680
1681
| 字段 | 类型 | 内容 | 备注 |
1682
| ------ | ---- | -------- | ----------------------------------- |
1683
| ststus | bool | 操作结果 | true:操作成功<br />false:操作失败 |
1684
| data | str | 错误信息 | 正确时无此项 |
1685
1686
**示例:**
1687
1688
设置`关注的TAG`为隐藏
1689
1690
curl --referer "http://www.bilibili.com" -b "SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;" -d "csrf=xxx&tags=0" "http://space.bilibili.com/ajax/settings/setPrivacy"
1691
1692
```json
1693
{
1694
"status": true
1695
}
1696
```
1697
1698
1699
1700
### 调整空间板块布局
1701
1702
> http://space.bilibili.com/ajax/settings/setIndexOrder
1703
1704
*方式:POST*
1705
1706
需要登录(SESSDATA)
1707
1708
需要验证`DedeUserID`及`DedeUserID__ckMd5`存在且不为0
1709
1710
需要验证`referer`为 `http://www.bilibili.com`或`https://www.bilibili.com`域名下
1711
1712
**参数( application/x-www-form-urlencoded ):**
1713
1714
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
1715
| ----------- | ---- | ------------------- | ------ | ------------------------------------------------------------ |
1716
| index_order | data | 布局列表 | 必要 | 每个值之间用","(%2C)分隔<br />先左侧布局再右侧布局<br />值的意义见下表 |
1717
| csrf | data | cookies中的bili_jct | 必要 | |
1718
1719
布局参数`index_order`:
1720
1721
| 值 | 含义 |
1722
| ---- | ---------------------- |
1723
| 1 | (左侧)我的稿件 |
1724
| 2 | (左侧)我的收藏夹 |
1725
| 3 | (左侧)订阅番剧 |
1726
| 4 | (左侧)订阅标签 |
1727
| 5 | (左侧)最近投币的视频 |
1728
| 6 | **作用尚不明确** |
1729
| 7 | (左侧)我的频道 |
1730
| 8 | (左侧)我的专栏 |
1731
| 9 | (左侧)我的相簿 |
1732
| 21 | (右侧)公告 |
1733
| 22 | (右侧)直播间 |
1734
| 23 | (右侧)个人资料 |
1735
| 24 | (右侧)官方活动 |
1736
| 25 | (右侧)最近玩的游戏 |
1737
1738
**json回复:**
1739
1740
根对象:
1741
1742
| 字段 | 类型 | 内容 | 备注 |
1743
| ------ | ---- | -------- | ----------------------------------- |
1744
| ststus | bool | 操作结果 | true:操作成功<br />false:操作失败 |
1745
| data | str | 错误信息 | 正确时无此项 |
1746
1747
**示例:**
1748
1749
调整空间布局为:
1750
1751
>我的稿件 直播间
1752
>我的专栏 个人资料
1753
>订阅番剧 公告
1754
>我的收藏夹 官方活动
1755
>我的相簿 最近玩的游戏
1756
>最近投币的视频
1757
>订阅标签
1758
>我的频道
1759
1760
curl --referer "http://www.bilibili.com" -b "SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;" -d "csrf=xxx&index_order=1%2C8%2C3%2C2%2C9%2C5%2C4%2C7%2C22%2C23%2C21%2C24%2C25%2C6" "http://space.bilibili.com/ajax/settings/setIndexOrder"
1761
1762
```json
1763
{
1764
"status": true
1765
}
1766
```
1767
1768
1769
1653
1770
### 修改个人TAG
1654
1771
1655
1772
> http://api.bilibili.com/x/space/acc/tags/set
@@ -113,7 +113,7 @@ curl -b "SESSDATA=xxx" -d "aid=90671873&select_like=1&multiply=2&csrf=xxx" "http
113
113
114
114
*方式:POST*
115
115
116
需要验证referer为 `http://www.bilibili.com`或`https://www.bilibili.com`域名下
116
需要验证`referer`为 `http://www.bilibili.com`或`https://www.bilibili.com`域名下
117
117
118
118
**参数( application/x-www-form-urlencoded ):**
119
119