mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2024-12-26 20:40:13 +08:00
优化文档格式
This commit is contained in:
parent
08f1671e6c
commit
f272277d22
698
B站API.txt
Normal file
698
B站API.txt
Normal file
@ -0,0 +1,698 @@
|
||||
#视频短网址
|
||||
b23.tv/ avID/ssID/epID/smID
|
||||
跳转至
|
||||
www.bilibili.com/video/ avID
|
||||
www.bilibili.com/bangumi/play/ ssID/epID
|
||||
www.nicovideo.jp/watch/ smID
|
||||
|
||||
#跳转至主站
|
||||
acg.tv
|
||||
bilibili.cn
|
||||
bilibili.tv
|
||||
|
||||
|
||||
## at我的明细
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
访问则消去未读
|
||||
|
||||
api.bilibili.com/x/msgfeed/at
|
||||
|
||||
*方式:GET*
|
||||
|
||||
|
||||
|
||||
## 系统通知明细
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
访问则消去未读
|
||||
|
||||
message.bilibili.com/api/notify/query.sysnotify.list.do
|
||||
|
||||
*方式:GET*
|
||||
|
||||
在线用户
|
||||
api.bilibili.com/x/web-interface/online
|
||||
方式:GET
|
||||
json回复
|
||||
{
|
||||
"code":0,
|
||||
"message":"0",
|
||||
"ttl":1,
|
||||
"data":{
|
||||
"region_count":{
|
||||
"1":6516,动画
|
||||
"11":7,电视剧
|
||||
"119":499,鬼畜
|
||||
"129":1472,舞蹈
|
||||
"13":338,番剧
|
||||
"138":7908,搞笑
|
||||
"155":2270,时尚
|
||||
"160":56943,生活
|
||||
"165":386,广告
|
||||
"167":439,国创
|
||||
"17":12698,单机游戏
|
||||
"177":957,纪录片
|
||||
"181":12761,影视
|
||||
"188":1830,数码
|
||||
"23":2,电影
|
||||
"3":10583,音乐
|
||||
"36":10074,科技
|
||||
"4":48084,游戏
|
||||
"5":10106,娱乐
|
||||
"75":3918,动物圈
|
||||
"76":3492 美食圈
|
||||
},
|
||||
"all_count":(num:),
|
||||
"web_online":(num:在线人数),
|
||||
"play_online":12561016
|
||||
}
|
||||
}
|
||||
|
||||
默认搜索
|
||||
api.bilibili.com/x/web-interface/search/default
|
||||
方式:GET
|
||||
json回复
|
||||
{
|
||||
"code":0,
|
||||
"message":"0",
|
||||
"ttl":1,
|
||||
"data":{
|
||||
"seid":"12670784065342714945",
|
||||
"id":9185549926650114417,
|
||||
"type":0,
|
||||
"show_name":(str:展示名),
|
||||
"name":"",
|
||||
"goto_type":1,
|
||||
"goto_value":(str:内容ID),
|
||||
"url":(str:内容网址)
|
||||
}
|
||||
}
|
||||
|
||||
主页浮标
|
||||
api.bilibili.com/x/web-interface/index/icon
|
||||
方式:GET
|
||||
json回复
|
||||
{
|
||||
"code":0,
|
||||
"message":"0",
|
||||
"ttl":1,
|
||||
"data":{
|
||||
"id":(num:编号),
|
||||
"title":(str:名称),
|
||||
"links":[(str:链接)],
|
||||
"icon":(str:图标链接),
|
||||
"weight":20
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-------------------------------------------------
|
||||
#用户相关
|
||||
|
||||
获取用户空间设置
|
||||
space.bilibili.com/ajax/settings/getSettings?mid=1
|
||||
方式:GET
|
||||
{
|
||||
"status":true,
|
||||
"data":{
|
||||
"privacy":{
|
||||
"bangumi":1,
|
||||
"bbq":1,
|
||||
"channel":1,
|
||||
"coins_video":0,
|
||||
"comic":1,
|
||||
"dress_up":1,
|
||||
"fav_video":1,
|
||||
"groups":1,
|
||||
"likes_video":0,
|
||||
"played_game":1,
|
||||
"tags":0,
|
||||
"user_info":1
|
||||
},
|
||||
"index_order":[{"id":1,"name":"\u6211\u7684\u7a3f\u4ef6"},
|
||||
{"id":8,"name":"\u6211\u7684\u4e13\u680f"},
|
||||
{"id":7,"name":"\u6211\u7684\u9891\u9053"},
|
||||
{"id":2,"name":"\u6211\u7684\u6536\u85cf\u5939"},
|
||||
{"id":3,"name":"\u8ba2\u9605\u756a\u5267"},
|
||||
{"id":4,"name":"\u8ba2\u9605\u6807\u7b7e"},
|
||||
{"id":5,"name":"\u6700\u8fd1\u6295\u5e01\u7684\u89c6\u9891"},
|
||||
{"id":6,"name":"\u6211\u7684\u5708\u5b50"},
|
||||
{"id":9,"name":"\u6211\u7684\u76f8\u7c3f"},
|
||||
{"id":21,"name":"\u516c\u544a"},
|
||||
{"id":22,"name":"\u76f4\u64ad\u95f4"},
|
||||
{"id":23,"name":"\u4e2a\u4eba\u8d44\u6599"},
|
||||
{"id":24,"name":"\u5b98\u65b9\u6d3b\u52a8"},
|
||||
{"id":25,"name":"\u6700\u8fd1\u73a9\u8fc7\u7684\u6e38\u620f"}
|
||||
],
|
||||
"theme":"default",
|
||||
"theme_preview_img_path":"",
|
||||
"toutu":{
|
||||
"sid":1,
|
||||
"expire":2844296881,
|
||||
"s_img":"bfs\/space\/768cc4fd97618cf589d23c2711a1d1a729f42235.png",
|
||||
"l_img":"bfs\/space\/cb1c3ef50e22b6096fde67febe863494caefebad.png",
|
||||
"android_img":"",
|
||||
"iphone_img":"",
|
||||
"ipad_img":"",
|
||||
"thumbnail_img":"",
|
||||
"platform":0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
用户收藏夹预览
|
||||
api.bilibili.com/medialist/gateway/base/created?up_mid=&pn=&ps=
|
||||
方式:GET
|
||||
请求参数
|
||||
up_mid=(用户UID)
|
||||
pn=(页码)
|
||||
ps=(每页项数)
|
||||
|
||||
|
||||
-------------------------------------------------
|
||||
#视频相关
|
||||
|
||||
更改弹幕池 (需要登录)
|
||||
api.bilibili.com/x/v2/dm/edit/pool
|
||||
方式:POST
|
||||
参数:
|
||||
参数名 type oid pool dmids csrf
|
||||
内容 视频CID 弹幕池 0普通 1字幕 弹幕ID CSRF Token(位于cookie)
|
||||
必要性 必要 必要 必要
|
||||
json回复
|
||||
{"code":0,"message":"0","ttl":1}
|
||||
|
||||
操作弹幕 (需要登录)
|
||||
api.bilibili.com/x/v2/dm/edit/state
|
||||
方式:POST
|
||||
操作代码:
|
||||
1删除
|
||||
2保护
|
||||
3取消保护
|
||||
参数:
|
||||
参数名 type oid state dmids csrf
|
||||
内容 视频CID 操作代码 弹幕ID CSRF Token(位于cookie)
|
||||
必要性 必要 必要 必要
|
||||
|
||||
-------------------------------------------------
|
||||
#创作中心相关
|
||||
|
||||
电磁力状态 (需要登录)
|
||||
api.bilibili.com/studio/up-rating/rating/status
|
||||
方式:GET
|
||||
json回复
|
||||
{
|
||||
"code":0,
|
||||
"message":"0",
|
||||
"ttl":1,
|
||||
"data":{
|
||||
"status":1,
|
||||
"level":(num:电磁力等级),
|
||||
"color":(str:文字颜色)
|
||||
}
|
||||
}
|
||||
|
||||
最新回复 (需要登录)
|
||||
member.bilibili.com/x/web/replies
|
||||
方式:GET
|
||||
|
||||
最新弹幕 (需要登录)
|
||||
member.bilibili.com/x/web/danmu/recent?pn=1&ps=50
|
||||
方式:GET
|
||||
|
||||
全部稿件 (需要登录)
|
||||
member.bilibili.com/x/web/archives?status=is_pubing%2Cpubed%2Cnot_pubed&pn=1&ps=10&coop=1&interactive=1
|
||||
方式:GET
|
||||
|
||||
全部专栏 (需要登录)
|
||||
api.bilibili.com/x/article/creative/article/list?group=0&sort=&pn=1
|
||||
方式:GET
|
||||
|
||||
全部申诉 (需要登录)
|
||||
member.bilibili.com/x/web/appeal/list?ps=10&state=all&pn=1
|
||||
方式:GET
|
||||
|
||||
收到的字幕 (需要登录)
|
||||
api.bilibili.com/x/v2/dm/subtitle/search/assist?type=1&status=0&page=1&size=10
|
||||
方式:GET
|
||||
|
||||
视频播放来源 (需要登录)
|
||||
member.bilibili.com/x/web/data/playsource
|
||||
方式:GET
|
||||
|
||||
视频游客分析 (需要登录)
|
||||
member.bilibili.com/x/web/data/base
|
||||
方式:GET
|
||||
|
||||
游客内容倾向 (需要登录)
|
||||
member.bilibili.com/x/web/data/trend
|
||||
方式:GET
|
||||
|
||||
粉丝变化历史 (需要登录)
|
||||
member.bilibili.com/x/web/data/action
|
||||
方式:GET
|
||||
|
||||
最新粉丝动态 (需要登录)
|
||||
member.bilibili.com/x/web/data/fan
|
||||
方式:GET
|
||||
|
||||
-------------------------------------------------
|
||||
#收藏夹与历史记录相关
|
||||
收藏夹明细
|
||||
api.bilibili.com/medialist/gateway/base/spaceDetail?media_id=&pn=&ps=
|
||||
方式:GET
|
||||
|
||||
|
||||
-------------------------------------------------
|
||||
#TAG相关
|
||||
TAG详细信息
|
||||
api.bilibili.com/x/web-interface/channel/detail?channel_id=(TAGID)
|
||||
方式:GET
|
||||
|
||||
-------------------------------------------------
|
||||
#番剧相关
|
||||
最新更新
|
||||
bangumi.bilibili.com/api/timeline_v2_global
|
||||
|
||||
番剧状态数
|
||||
api.bilibili.com/pgc/web/season/stat?season_id=
|
||||
|
||||
番剧精选短评
|
||||
api.bilibili.com/pgc/review/relate?media_id=
|
||||
|
||||
-------------------------------------------------
|
||||
#音频相关
|
||||
歌单简介
|
||||
www.bilibili.com/audio/music-service-c/web/menu/info?sid=10624
|
||||
|
||||
歌单明细
|
||||
www.bilibili.com/audio/music-service-c/web/song/of-menu?sid=10624&pn=1&ps=100
|
||||
|
||||
歌曲简介
|
||||
www.bilibili.com/audio/music-service-c/web/song/info?sid=1294480
|
||||
|
||||
歌曲TAG
|
||||
www.bilibili.com/audio/music-service-c/web/tag/song?sid=1294480
|
||||
|
||||
歌曲制作组
|
||||
www.bilibili.com/audio/music-service-c/web/member/song?sid=1294480
|
||||
|
||||
歌曲相似推荐
|
||||
www.bilibili.com/audio/music-service-c/web/song/similar?sid=1294480
|
||||
|
||||
音乐用户简介
|
||||
www.bilibili.com/audio/music-service-c/web/user/info?uid=
|
||||
|
||||
音乐用户状态数
|
||||
www.bilibili.com/audio/music-service-c/web/stat/user?uid=8775742
|
||||
|
||||
音乐获取地址
|
||||
www.bilibili.com/audio/music-service-c/web/url?sid=1294480
|
||||
|
||||
音频榜单
|
||||
www.bilibili.com/audio/music-service-c/web/home/list-rank?pn=1&ps=10
|
||||
|
||||
音频榜单明细
|
||||
www.bilibili.com/audio/music-service-c/web/home/hit-rank
|
||||
|
||||
{
|
||||
"code":0,
|
||||
"msg":"success",
|
||||
"data":[
|
||||
#新歌榜歌单
|
||||
{
|
||||
"menuId":10624,
|
||||
"uid":32708543,
|
||||
"uname":"大家的音乐姬",
|
||||
"title":"每日新曲推荐(每日11:00更新)",
|
||||
"cover":"http://i0.hdslb.com/bfs/music/a32c1ed4f6ec3f74f8240f4486a750dda3a509e5.jpg",
|
||||
"intro":"每天11:00更新,为你推送最新音乐",
|
||||
"type":2,
|
||||
"off":0,
|
||||
"ctime":1501209433,
|
||||
"curtime":1582165425,
|
||||
"statistic":{
|
||||
"sid":10624,
|
||||
"play":1969454,
|
||||
"collect":17525,
|
||||
"comment":973,
|
||||
"share":453
|
||||
},
|
||||
"snum":20,
|
||||
"attr":0,
|
||||
"isDefault":0,
|
||||
"collectionId":0,
|
||||
"audios":[
|
||||
{
|
||||
"id":817499,
|
||||
"title":"【ゆう十】好想爱这个世界啊",
|
||||
"duration":264
|
||||
},
|
||||
#向下扩展
|
||||
]
|
||||
},
|
||||
#热歌榜歌单
|
||||
{
|
||||
"menuId":10627,
|
||||
"uid":32708543,
|
||||
"uname":"大家的音乐姬",
|
||||
"title":"热歌榜(每日11:00更新)",
|
||||
"cover":"http://i0.hdslb.com/bfs/music/bc735b32ab123f7ddc602b9194defae2cd66062f.jpg",
|
||||
"intro":"每日上午11:00更新,精选三日内热门投稿作品。",
|
||||
"type":2,
|
||||
"off":0,
|
||||
"ctime":1501211353,
|
||||
"curtime":1582165425,
|
||||
"statistic":{
|
||||
"sid":10627,
|
||||
"play":1536399,
|
||||
"collect":8661,
|
||||
"comment":323,
|
||||
"share":145
|
||||
},
|
||||
"snum":19,
|
||||
"attr":0,
|
||||
"isDefault":0,
|
||||
"collectionId":0,
|
||||
"audios":[
|
||||
{
|
||||
"id":829642,
|
||||
"title":"曙光",
|
||||
"duration":287
|
||||
},
|
||||
#向下扩展
|
||||
]
|
||||
},
|
||||
#原创榜歌单
|
||||
{
|
||||
"menuId":10628,
|
||||
"uid":32708543,
|
||||
"uname":"大家的音乐姬",
|
||||
"title":"原创榜(每日11:00更新)",
|
||||
"cover":"http://i0.hdslb.com/bfs/music/58782504cefb307878d12422fd365ed7f971fad1.jpg",
|
||||
"intro":"每日上午11:00更新,精选三日内原创投稿音乐。",
|
||||
"type":2,
|
||||
"off":0,
|
||||
"ctime":1501211627,
|
||||
"curtime":1582165425,
|
||||
"statistic":{
|
||||
"sid":10628,
|
||||
"play":262030,
|
||||
"collect":1962,
|
||||
"comment":260,
|
||||
"share":71
|
||||
},
|
||||
"snum":20,
|
||||
"attr":0,
|
||||
"isDefault":0,
|
||||
"collectionId":0,
|
||||
"audios":[
|
||||
{
|
||||
"id":829642,
|
||||
"title":"曙光",
|
||||
"duration":287
|
||||
},
|
||||
#向下扩展
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
-------------------------------------------------
|
||||
#专栏相关
|
||||
|
||||
文集基本信息
|
||||
api.bilibili.com/x/article/list/web/articles?id=
|
||||
|
||||
点赞专栏 (需要登录)
|
||||
api.bilibili.com/x/article/like
|
||||
方式:POST
|
||||
参数:
|
||||
参数名 aid type csrf
|
||||
内容 专栏cvID 1点赞 2取消赞 CSRF Token(位于cookie)
|
||||
必要性 必要 必要 必要
|
||||
{
|
||||
"code":0,
|
||||
"message":"0",
|
||||
"ttl":1
|
||||
}
|
||||
|
||||
投币专栏 (需要登录)
|
||||
api.bilibili.com/x/web-interface/coin/add
|
||||
方式:POST
|
||||
参数:
|
||||
参数名 aid multiply upid avtype csrf
|
||||
内容 专栏cvID 投币数量 上限为2 作者UID 必须为2 CSRF Token(位于cookie)
|
||||
必要性 必要 必要 必要 必要 必要
|
||||
json回复
|
||||
{
|
||||
"code":0,
|
||||
"message":"0",
|
||||
"ttl":1,
|
||||
"data":{
|
||||
"like":false
|
||||
}
|
||||
}
|
||||
|
||||
收藏专栏 (需要登录)
|
||||
api.bilibili.com/x/article/favorites/add
|
||||
方式:POST
|
||||
参数:
|
||||
参数名 aid csrf
|
||||
内容 专栏cvID CSRF Token(位于cookie)
|
||||
必要性 必要 必要
|
||||
json回复
|
||||
{
|
||||
"code":0,
|
||||
"message":"0",
|
||||
"ttl":1
|
||||
}
|
||||
|
||||
|
||||
-------------------------------------------------
|
||||
#动态相关
|
||||
未读动态数 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=293793435&update_num_dy_id=360462659397144349&type_list=8,512
|
||||
|
||||
动态内容 (仅自己可见时需要登录)
|
||||
api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/get_dynamic_detail
|
||||
方式:GET
|
||||
参数名 dynamic_id
|
||||
内容 动态ID
|
||||
必要性 必要
|
||||
|
||||
发表文字动态 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/create
|
||||
方式:POST
|
||||
参数:
|
||||
type=必须为4 必要
|
||||
content=文字内容 必要
|
||||
extension=%7B%22emoji_type%22%3A1%7D 必要
|
||||
at_uids=需要at的uid 非必要
|
||||
ctrl=%5B%5D 非必要
|
||||
|
||||
{
|
||||
"code":(num:0成功 -6账号未登录 500103无内容),
|
||||
"msg":(str:错误信息 默认为空),
|
||||
"message":(str:错误信息 默认为空),
|
||||
"data":{
|
||||
"result":0,
|
||||
"errmsg":";Create dynamic 362109538834657119 OK, result:1; Push create kafka:0; Register comment result:0; Add outbox result:1; Send at_msg result:0",
|
||||
"dynamic_id":(num:动态ID),
|
||||
"create_result":1,
|
||||
"dynamic_id_str":(str:动态ID),
|
||||
"_gt_":0
|
||||
}
|
||||
}
|
||||
|
||||
发表相簿动态 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/create_draw
|
||||
方式:POST
|
||||
biz=必须为3
|
||||
category=必须为3
|
||||
type=必须为0
|
||||
pictures=%5B%7B%22img_src%22%3A%22http%3A%2F%2Fi0.hdslb.com%2Fbfs%2Falbum%2Fd0431e47263b56d1d0f6b59af0e5fedaefb5de74.jpg%22%2C%22img_width%22%3A695%2C%22img_height%22%3A1000%2C%22img_size%22%3A686.537109375%7D%2C%7B%22img_src%22%3A%22http%3A%2F%2Fi0.hdslb.com%2Fbfs%2Falbum%2F918db3bcacef6793c3ad2fe84dd804750c2052f5.png%22%2C%22img_width%22%3A1000%2C%22img_height%22%3A688%2C%22img_size%22%3A516.90625%7D%5D
|
||||
title=
|
||||
tags=
|
||||
description=文字内容
|
||||
content=文字内容
|
||||
setting=%7B%22copy_forbidden%22%3A0%2C%22cachedTime%22%3A0%7D
|
||||
from=必须为create.dynamic.web
|
||||
extension=%7B%22emoji_type%22%3A1%7D
|
||||
at_uids=需要at的uid 非必要
|
||||
at_control=%5B%5D
|
||||
csrf_token=5e8178eeedd85fdae78a47cabad198a7
|
||||
|
||||
{
|
||||
"code":0,
|
||||
"msg":"",
|
||||
"message":"",
|
||||
"data":{
|
||||
"doc_id":"59718150",
|
||||
"dynamic_id":362117390040148339,
|
||||
"dynamic_id_str":"362117390040148339",
|
||||
"_gt_":0
|
||||
}
|
||||
}
|
||||
|
||||
发起投票
|
||||
api.vc.bilibili.com/vote_svr/v1/vote_svr/create_vote
|
||||
|
||||
|
||||
发表定时动态 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_draft/v1/dynamic_draft/add_draft
|
||||
方式:POST
|
||||
type=4
|
||||
publish_time=1583159280
|
||||
request=%7B%22dynamic_id%22%3A0%2C%22type%22%3A4%2C%22rid%22%3A0%2C%22content%22%3A%22%E6%B5%8B%E8%AF%95%22%2C%22extension%22%3A%22%7B%5C%22emoji_type%5C%22%3A1%7D%22%2C%22at_uids%22%3A%22%22%2C%22ctrl%22%3A%22%5B%5D%22%7D&csrf_token=5e8178eeedd85fdae78a47cabad198a7
|
||||
{
|
||||
"code":0,
|
||||
"msg":"",
|
||||
"message":"",
|
||||
"data":{
|
||||
"errmsg":"add draft succ.",
|
||||
"draft_id":52393,
|
||||
"_gt_":0
|
||||
}
|
||||
}
|
||||
|
||||
删除定时动态 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_draft/v1/dynamic_draft/rm_draft
|
||||
|
||||
转载动态 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_repost/v1/dynamic_repost/repost
|
||||
方式:POST
|
||||
uid=293793435
|
||||
dynamic_id=362041815795291620
|
||||
content=%E5%B9%B2%E5%BE%97%E6%BC%82%E4%BA%AE%EF%BC%81
|
||||
extension=%7B%22emoji_type%22%3A1%7D
|
||||
at_uids=
|
||||
ctrl=%5B%5D
|
||||
csrf_token=5e8178eeedd85fdae78a47cabad198a7
|
||||
|
||||
{
|
||||
"code":0,
|
||||
"msg":"",
|
||||
"message":"",
|
||||
"data":{
|
||||
"result":0,
|
||||
"errmsg":"符合条件,允许发布",
|
||||
"_gt_":0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
删除动态 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/rm_dynamic
|
||||
方式:POST
|
||||
参数:
|
||||
参数名 dynamic_id
|
||||
内容 动态ID
|
||||
必要性 必要
|
||||
json回复
|
||||
{
|
||||
"code":(num:0成功 -6账号未登录 500003参数错误 500404不能重复删除 500405动态ID不合法),
|
||||
"msg":(str:错误信息 默认为空),
|
||||
"message":(str:错误信息 默认为空),
|
||||
"data":{
|
||||
"_gt_":0
|
||||
}
|
||||
}
|
||||
|
||||
点赞动态 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_like/v1/dynamic_like/thumb
|
||||
方式:POST
|
||||
uid=293793435
|
||||
dynamic_id=362113743614996443
|
||||
up=1
|
||||
csrf_token=5e8178eeedd85fdae78a47cabad198a7
|
||||
{
|
||||
"code":0,
|
||||
"msg":"",
|
||||
"message":"",
|
||||
"data":{
|
||||
"_gt_":0
|
||||
}
|
||||
}
|
||||
|
||||
置顶动态 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_mix/v1/dynamic_mix/space_top_set
|
||||
方式:GET
|
||||
参数:
|
||||
参数名 dynamic_id
|
||||
内容 动态ID
|
||||
必要性 必要
|
||||
无返回
|
||||
|
||||
取消置顶动态 (需要登录)
|
||||
api.vc.bilibili.com/dynamic_mix/v1/dynamic_mix/space_top_rm
|
||||
方式:GET
|
||||
参数:
|
||||
参数名 dynamic_id
|
||||
内容 动态ID
|
||||
必要性 必要
|
||||
无返回
|
||||
|
||||
搜索用户昵称
|
||||
api.vc.bilibili.com/dynamic_repost/v1/dynamic_repost/name_search?keyword=
|
||||
|
||||
昵称转换UID
|
||||
api.vc.bilibili.com/dynamic_mix/v1/dynamic_mix/name_to_uid?names=%E5%B0%8F%E6%9E%97%E5%AE%B6%E7%9A%84%E5%9E%83%E5%9C%BE%E7%8E%8BR&teenagers_mode=0
|
||||
|
||||
-------------------------------------------------
|
||||
#直播相关
|
||||
最热直播间
|
||||
api.live.bilibili.com/room/v1/RoomRecommend/biliIndexRecList
|
||||
|
||||
小图标
|
||||
https://www.bilibili.com/index/index-icon.json
|
||||
|
||||
上传稿件封面
|
||||
POST
|
||||
http://member.bilibili.com/x/vu/web/cover/up
|
||||
data
|
||||
cover:
|
||||
csrf:
|
||||
|
||||
活动
|
||||
GET
|
||||
https://member.bilibili.com/x/app/h5/mission/type/v2?tid=194&from=0
|
||||
|
||||
验证TAG
|
||||
GET
|
||||
https://member.bilibili.com/x/app/h5/archive/tag/info?tag_name=
|
||||
|
||||
提交投稿
|
||||
https://member.bilibili.com/x/vu/web/add
|
||||
POST
|
||||
url
|
||||
csrf:
|
||||
data
|
||||
json:
|
||||
{
|
||||
"copyright":1,
|
||||
"videos":[
|
||||
{
|
||||
"filename":"m200524a23m79uhneooxzh3q99xe8xsq",
|
||||
"title":"【SN76489音源】异度侵入ID INVADED OP(ミスターフィクサー)_1",
|
||||
"desc":""
|
||||
}
|
||||
],
|
||||
"no_reprint":1,
|
||||
"interactive":0,
|
||||
"tid":分区tID,
|
||||
"cover":"封面",
|
||||
"title":"标题",
|
||||
"tag":"TAG",
|
||||
"desc_format_id":0,
|
||||
"desc":"简介",
|
||||
"dynamic":"同步动态内容",
|
||||
"open_elec":允许充电,
|
||||
"subtitle":{
|
||||
"open":允许提交字幕,
|
||||
"lan":""
|
||||
}
|
||||
}
|
@ -29,16 +29,16 @@
|
||||
|
||||
---
|
||||
|
||||
计划整理分类&目录:(√代表已完成,x代表正在施工...)
|
||||
计划整理分类&目录:(√代表已完成,x代表正在施工...)二级目录正在建设中.....
|
||||
|
||||
- [API认证与鉴权(APP与Cookie方式)](other/API_auth.md)×
|
||||
- [图片格式化](other/picture.md)√
|
||||
- [登录](login)
|
||||
- [二维码登录](login/QR.md)√
|
||||
- [验证码登录](login/verify)√
|
||||
- [登录操作](login/login_action)√
|
||||
+ [短信登录](login/verify/SMS.md)√
|
||||
+ [密码登录](login/verify/password.md)√
|
||||
- qq&微博登录
|
||||
+ [二维码登录](login/QR.md)√
|
||||
+ SNS登录(QQ&微博)
|
||||
- [登录基本信息](login/login_info.md)√
|
||||
- [个人中心](login/member_center.md)×
|
||||
- [消息中心](message)
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/article/viewinfo
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/article/like
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -50,7 +50,7 @@ curl -b "SESSDATA=xxx" -d "id=5806746&type=1&csrf=xxx" "http://api.bilibili.com/
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/coin/add
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -102,7 +102,7 @@ curl -b "SESSDATA=xxx" -d "aid=5806746&multiply=1&csrf=xxx" "http://api.bilibili
|
||||
|
||||
>http://api.bilibili.com/x/article/favorites/add
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
|
175
bangumi/info.md
Normal file
175
bangumi/info.md
Normal file
@ -0,0 +1,175 @@
|
||||
# 番剧基本信息
|
||||
|
||||
> http://api.bilibili.com/pgc/view/web/season
|
||||
|
||||
*请求方式:GET*
|
||||
|
||||
**参数:**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| --------- | ---- | -------- | ------ | ------------------------ |
|
||||
| season_id | url | 番剧ssID | 非必要 | season_id与ep_id任选其一 |
|
||||
| ep_id | url | 剧集epID | 非必要 | season_id与ep_id任选其一 |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ----------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />-404:错误 |
|
||||
| message | str | 错误信息 | 默认为success |
|
||||
| ttl | num | 1 | 作用尚不明确 |
|
||||
| result | obj | 信息本体 | |
|
||||
|
||||
`result`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| --------------- | ------ | -------------------------- | ------------------------------------------ |
|
||||
| activity | obj | 参与的活动 | |
|
||||
| alias | str | 空 | 作用尚不明确 |
|
||||
| bkg_cover | str | 背景图片url | 无则为空 |
|
||||
| cover | str | 封面图片url | |
|
||||
| episodes | array | 剧集列表 | |
|
||||
| evaluate | str | 简介 | |
|
||||
| jp_title | str | 空 | 作用尚不明确 |
|
||||
| link | str | 简介网址url | |
|
||||
| media_id | num | 番剧mdID | |
|
||||
| mode | num | | |
|
||||
| new_ep | obj | 更新信息 | |
|
||||
| payment | obj | 会员&付费信息 | 若无相关内容则无此项 |
|
||||
| positive | obj | | |
|
||||
| publish | obj | 发布信息 | |
|
||||
| rating | obj | 评分信息 | 若无相关内容则无此项 |
|
||||
| record | str | 备案号 | 无则为空 |
|
||||
| rights | obj | 属性标志信息 | |
|
||||
| season_id | num | 番剧ssID | |
|
||||
| season_title | str | 标题 | |
|
||||
| seasons | array | 同系列其他季 | 无则为空 |
|
||||
| section | array | 花絮、PV、番外等非正片内容 | 若无相关内容则无此项 |
|
||||
| series | obj | 系列信息 | |
|
||||
| share_copy | str | 《标题》+签名 | |
|
||||
| share_sub_title | str | 签名 | 无则为空 |
|
||||
| share_url | str | 番剧播放页面url | |
|
||||
| show | obj | 网页全屏标志 | |
|
||||
| square_cover | str | 方形封面图片url | 若无相关内容则无此项 |
|
||||
| stat | obj | 状态数 | |
|
||||
| status | num | | |
|
||||
| subtitle | str | 观看次数文字介绍 | |
|
||||
| title | str | 标题 | |
|
||||
| total | num | 总计集数 | 未完结:大多为-1<br />已完结:大多为正整数 |
|
||||
| type | num | | |
|
||||
| up_info | obj | UP主信息 | 若无相关内容则无此项 |
|
||||
|
||||
`result`中的`activity`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----------- | ---- | -------- | ------------ |
|
||||
| head_bg_url | str | 空 | 作用尚不明确 |
|
||||
| id | num | 活动id | |
|
||||
| title | str | 活动标题 | |
|
||||
|
||||
`result`中的`episodes`数组:
|
||||
|
||||
|
||||
|
||||
`result`中的`new_ep`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------ | ---- | ------------ | ---------------- |
|
||||
| desc | str | 更新备注 | |
|
||||
| id | num | 最新一话epID | |
|
||||
| is_new | num | 是否最新发布 | 0:否<br />1:是 |
|
||||
| title | str | 最新一话标题 | |
|
||||
|
||||
`result`中的`payment`对象:
|
||||
|
||||
|
||||
|
||||
`result`中的`positive`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----- | ---- | ---- | ---- |
|
||||
| id | num | | |
|
||||
| title | str | | |
|
||||
|
||||
`result`中的`publish`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| --------------- | ---- | ---------------- | ------------------------ |
|
||||
| is_finish | num | 完结状态 | 0:未完结<br />1:已完结 |
|
||||
| is_started | num | 是否发布 | 0:未发布<br />1:已发布 |
|
||||
| pub_time | str | 发布时间 | YYYY-MM-DDD hh:mm:ss |
|
||||
| pub_time_show | str | 发布时间文字介绍 | |
|
||||
| unknow_pub_date | num | 0 | 作用尚不明确 |
|
||||
| weekday | num | 0 | 作用尚不明确 |
|
||||
|
||||
`result`中的`rating`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----- | ---- | ------------ | ---- |
|
||||
| count | num | 总计评分人数 | |
|
||||
| score | num | 评分 | |
|
||||
|
||||
`result`中的`rights`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----------------- | ---- | -------- | ------------------------------- |
|
||||
| allow_bp | num | | |
|
||||
| allow_bp_rank | num | | |
|
||||
| allow_download | num | | |
|
||||
| allow_review | num | | |
|
||||
| area_limit | num | | |
|
||||
| ban_area_show | num | | |
|
||||
| can_watch | num | | |
|
||||
| copyright | str | 版权标志 | bilibili:授权<br />dujia:独家 |
|
||||
| forbid_pre | num | | |
|
||||
| is_cover_show | num | | |
|
||||
| is_preview | num | | |
|
||||
| only_vip_download | num | | |
|
||||
| resource | str | | |
|
||||
| watch_platform | num | | |
|
||||
|
||||
`result`中的`seasons`数组:
|
||||
|
||||
|
||||
|
||||
`result`中的`section`数组:
|
||||
|
||||
|
||||
|
||||
`result`中的`series`对象:
|
||||
|
||||
|
||||
|
||||
`result`中的`show`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----------- | ---- | ------ | -------------------- |
|
||||
| wide_screen | num | 投币数 | 0:正常<br />1:全屏 |
|
||||
|
||||
`result`中的`stat`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| --------- | ---- | ------ | ---- |
|
||||
| coins | num | 投币数 | |
|
||||
| danmakus | num | 弹幕数 | |
|
||||
| favorites | num | 收藏数 | |
|
||||
| reply | num | 评论数 | |
|
||||
| share | num | 分享数 | |
|
||||
| views | num | 播放数 | |
|
||||
|
||||
`result`中的`up_info`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----------- | ---- | ----------- | ---- |
|
||||
| avatar | str | 头像图片url | |
|
||||
| follower | num | 粉丝数 | |
|
||||
| is_follow | num | | |
|
||||
| mid | num | UP主UID | |
|
||||
| pendant | obj | | |
|
||||
| theme_type | num | | |
|
||||
| uname | str | | |
|
||||
| verify_type | num | | |
|
||||
| vip_status | num | | |
|
||||
| vip_type | num | | |
|
@ -32,7 +32,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/credit/blocked/list
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
每页最多10项
|
||||
|
||||
@ -168,7 +168,7 @@ http://api.bilibili.com/x/credit/blocked/list?btype=&otype=0&pn=1
|
||||
|
||||
> http://api.bilibili.com/x/credit/blocked/info
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/broadcast/servers
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
> http://api.bilibili.com/pugv/view/web/season
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -442,7 +442,7 @@ http://api.bilibili.com/pugv/view/web/season?season_id=61
|
||||
|
||||
> http://api.bilibili.com/pugv/view/web/ep/list
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/pugv/player/web/playurl
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
本接口为课程视频专用,故与普通视频不互通
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
| ep_id | num | 课程epID | 必要 | |
|
||||
| cid | num | 视频CID | 必要 | |
|
||||
| qn | num | 视频清晰度选择 | 非必要 | 未登录默认32(480P)<br />登录默认64(720P)<br />**值含义见下表** |
|
||||
| fourk | num | 是否允许4K视频 | 非必要 | 默认为0<br />画质最高1080P:0<br />画质最高4K:1 |
|
||||
|
||||
分辨率代码:
|
||||
|
||||
@ -131,7 +132,14 @@
|
||||
|
||||
获取课程`ep790`(CID=`132105993`,avID=`76973173`)的视频流url,清晰度为1080P60
|
||||
|
||||
http://api.bilibili.com/pugv/player/web/playurl?ep_id=790&avid=76973173&cid=132105993&qn=116
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/pugv/player/web/playurl'\
|
||||
--data-urlencode 'ep_id=790'\
|
||||
--data-urlencode 'avid=76973173'\
|
||||
--data-urlencode 'cid=132105993'\
|
||||
--data-urlencode 'qn=116'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -234,6 +242,10 @@ http://api.bilibili.com/pugv/player/web/playurl?ep_id=790&avid=76973173&cid=1321
|
||||
|
||||
**以上述视频url为例:**
|
||||
|
||||
wget --referer "http://www.bilibili.com" "https://upos-sz-mirrorks3c.bilivideo.com/upgcxcode/93/59/132105993/132105993_da2-1-116.flv?e=ig8euxZM2rNcNbNghzTBhwdlhbNz7bUVhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1591596728&gen=playurl&os=ks3cbv&oi=606633803&trid=76bea9a9e56f4cb89a9aff2f8213c9acu&platform=pc&upsig=b271bf493bff32ffe62969582c8d18b4&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,platform&mid=0&orderid=1,2&logo=40000000" -O video.flv
|
||||
```shell
|
||||
wget 'https://upos-sz-mirrorks3c.bilivideo.com/upgcxcode/93/59/132105993/132105993_da2-1-116.flv?e=ig8euxZM2rNcNbNghzTBhwdlhbNz7bUVhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1591596728&gen=playurl&os=ks3cbv&oi=606633803&trid=76bea9a9e56f4cb89a9aff2f8213c9acu&platform=pc&upsig=b271bf493bff32ffe62969582c8d18b4&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,platform&mid=0&orderid=1,2&logo=40000000'\
|
||||
-e 'https://www.bilibili.com'\
|
||||
-O 'Download_video.flv'
|
||||
```
|
||||
|
||||
回复正文将返回一个flv文件的数据
|
||||
响应正文将返回一个flv文件
|
@ -8,7 +8,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/add
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -218,7 +218,7 @@ curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&message=%E6%B5%8B%E8%AF%95test%5
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/action
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
点赞成功后会同时消去该评论的点踩
|
||||
|
||||
@ -262,7 +262,7 @@ curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=3039053308&action=1&csrf=xx
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/hate
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
点踩成功后会同时消去该评论的点赞
|
||||
|
||||
@ -306,7 +306,7 @@ curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=3039053308&action=1&csrf=xx
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/del
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
只能删除自己的评论,或自己管理的评论区下的评论
|
||||
|
||||
@ -349,7 +349,7 @@ curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=3039053308&csrf=xxx" "http:
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/top
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
只能置顶自己管理的评论区中的一级评论
|
||||
|
||||
@ -393,7 +393,7 @@ curl -b "SESSDATA=xxx" -d "type=1&oid=243322853&rpid=2940645593&action=1&csrf=xx
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/report
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
|
@ -20,11 +20,11 @@
|
||||
| 22 | 漫画 | 漫画mcID |
|
||||
| 33 | 课程 | 课程epID |
|
||||
|
||||
## 获取评论区明细1(无楼层号 web端)
|
||||
## 获取评论区明细1(web端)(无楼层号)
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -2324,11 +2324,11 @@
|
||||
|
||||
|
||||
|
||||
## 获取评论区明细2(带有楼层号 APP端)
|
||||
## 获取评论区明细2(APP端)(带有楼层号 )
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/main
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -4690,11 +4690,11 @@ http://api.bilibili.com/x/v2/reply/main?type=1&oid=2&mode=3&next=0&ps=5
|
||||
|
||||
|
||||
|
||||
## 获取指定评论条目及二级回复明细1(分离结构 无楼层号 web端)
|
||||
## 获取指定评论条目及二级回复明细1(web端)(分离结构 无楼层号)
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/reply
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
按照热度排列
|
||||
|
||||
@ -5412,11 +5412,11 @@ http://api.bilibili.com/x/v2/reply/reply?type=1&oid=2&root=476670&pn=1&ps=5
|
||||
|
||||
|
||||
|
||||
## 获取指定评论条目及二级回复明细2(嵌套结构 带有楼层号 APP端)
|
||||
## 获取指定评论条目及二级回复明细2(APP端)(嵌套结构 带有楼层号)
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/detail
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
按照楼层排列
|
||||
|
||||
@ -6155,11 +6155,11 @@ http://api.bilibili.com/x/v2/reply/reply?type=1&oid=2&root=476670&pn=1&ps=5
|
||||
|
||||
|
||||
|
||||
## 获取指定评论对话树(带有楼层 客户端)
|
||||
## 获取指定评论对话树(APP端)(带有楼层)
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/dialog/cursor
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
按照楼层排列
|
||||
|
||||
@ -7009,7 +7009,7 @@ data`对象:
|
||||
|
||||
> http://api.bilibili.com/x/v2/reply/count
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
> http://member.bilibili.com/x/web/elec/user
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -52,7 +52,7 @@ http://member.bilibili.com/x/web/elec/user
|
||||
|
||||
> http://api.bilibili.com/studio/up-rating/rating/summary
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -129,7 +129,7 @@ http://api.bilibili.com/studio/up-rating/rating/summary
|
||||
|
||||
> http://api.bilibili.com/studio/up-rating/rating/history
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
> http://member.bilibili.com/x/web/index/stat
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -160,7 +160,7 @@ http://member.bilibili.com/x/web/index/stat
|
||||
|
||||
> http://member.bilibili.com/x/web/data/article
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -222,7 +222,7 @@ http://member.bilibili.com/x/web/data/article
|
||||
|
||||
> http://member.bilibili.com/x/web/data/article/thirty
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
数据为前30天
|
||||
|
||||
@ -313,7 +313,7 @@ http://member.bilibili.com/x/web/data/pandect?type=1
|
||||
|
||||
> http://member.bilibili.com/x/web/data/article/thirty
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
数据为前30天
|
||||
|
||||
@ -399,7 +399,7 @@ http://member.bilibili.com/x/web/data/article/thirty?type=1
|
||||
|
||||
> http://member.bilibili.com/x/web/data/survey
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
数据为上一天的
|
||||
|
||||
@ -531,7 +531,7 @@ http://member.bilibili.com/x/web/data/survey?type=1
|
||||
|
||||
> http://member.bilibili.com/x/web/data/playsource
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -607,7 +607,7 @@ http://member.bilibili.com/x/web/data/playsource
|
||||
|
||||
> http://member.bilibili.com/x/web/data/base
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/v2/dm/post
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -73,7 +73,7 @@ curl -b "SESSDATA=xxx" -d "type=1&oid=62131&msg=%e5%89%8d%e6%9d%a5%e8%80%83%e5%8
|
||||
|
||||
> http://api.bilibili.com/x/dm/recall
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
仅能撤回自己两分钟内的弹幕,且每天只有3次机会
|
||||
|
||||
@ -116,7 +116,7 @@ curl -b "SESSDATA=xxx" -d "dmid=32310301474947077&cid=168901231&csrf=xxx" "http:
|
||||
|
||||
> http://api.bilibili.com/x/dm/adv/buy
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -159,7 +159,7 @@ curl -b "SESSDATA=xxx" -d "mode=sp&cid=168901231&csrf=xxx" "http://api.bilibili.
|
||||
|
||||
> http://api.bilibili.com/x/dm/adv/state
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/v1/dm/list.so
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**使用deflate压缩,注意解码**
|
||||
|
||||
@ -24,7 +24,7 @@ http://api.bilibili.com/x/v1/dm/list.so?oid=144541892
|
||||
|
||||
> http://comment.bilibili.com/{cid}.xml
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
效果与前者相同
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/v2/dm/history/index
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -79,7 +79,7 @@ http://api.bilibili.com/x/v2/dm/history/index?type=1&oid=144541892&month=2019-12
|
||||
|
||||
> http://api.bilibili.com/x/v2/dm/history
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
结果为标准xml格式弹幕
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/v2/dm/ajax
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
最近产生的几条弹幕内容,**最多20条**
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# 发布动态
|
||||
|
||||
## 为动态(画友)上传图片
|
||||
## 为图片动态(相簿)上传图片
|
||||
|
||||
> http://api.vc.bilibili.com/api/v1/drawImage/upload
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/ugcpay/trade/elec/pay/quick
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/ugcpay/trade/elec/pay/qr_code/create
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
秘钥有效时间为10分钟
|
||||
|
||||
@ -77,7 +77,7 @@ curl -b "SESSDATA=xxx" -d "up_mid=23215368&elec_num=10&is_bp_remains_prior=false
|
||||
|
||||
> http://api.bilibili.com/x/ugcpay/trade/elec/pay/order/status
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://elec.bilibili.com/api/query.rank.do
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/elec/show
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/ugcpay/trade/elec/message
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/emote/package/add
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
只能添加有会员权限或已购买的表情包
|
||||
|
||||
@ -48,7 +48,7 @@ curl -b "SESSDATA=xxx" -d "package_id=25&business=reply&csrf=xxx" "http://api.bi
|
||||
|
||||
> http://api.bilibili.com/x/emote/package/remove
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/emote/user/panel/web
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
使用登录(SESSDATA)进行会员专属及已购买表情包的分发,否则为免费表情包
|
||||
|
||||
@ -211,7 +211,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/emote/package
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -497,7 +497,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/emote/setting/panel
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
>http://api.bilibili.com/x/web-interface/history/cursor
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -339,7 +339,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/v2/history
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -702,7 +702,7 @@ http://api.bilibili.com/x/v2/history?ps=5&pn=1
|
||||
|
||||
> http://api.bilibili.com/x/v2/history/delete
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -741,7 +741,7 @@ curl -b "SESSDATA=xxx" -d "kid=archive_540580868&csrf=xxx" "http://api.bilibili.
|
||||
|
||||
> http://api.bilibili.com/x/v2/history/clear
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -779,7 +779,7 @@ curl -b "SESSDATA=xxx" -d "csrf=xxx" "http://api.bilibili.com/x/v2/history/clear
|
||||
|
||||
> http://api.bilibili.com/x/v2/history/shadow/set
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
该操作不会影响原有历史记录
|
||||
|
||||
@ -820,7 +820,7 @@ curl -b "SESSDATA=xxx" -d "switch=true&csrf=xxx" "http://api.bilibili.com/x/v2/h
|
||||
|
||||
> http://api.bilibili.com/x/v2/history/shadow
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
>http://api.bilibili.com/x/v2/history/toview/add
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -52,7 +52,7 @@ curl -b "SESSDATA=xxx" -d "aid=41687433&csrf=xxx" "http://api.bilibili.com/x/v2/
|
||||
|
||||
> http://space.bilibili.com/ajax/channel/addAllToView
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -100,7 +100,7 @@ curl --referer "http://.bilibili.com" -b "SESSDATA=xxx;DedeUserID=1;DedeUserID__
|
||||
|
||||
> http://api.bilibili.com/x/v2/history/toview
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -378,7 +378,7 @@ http://api.bilibili.com/x/v2/history/toview
|
||||
|
||||
> http://api.bilibili.com/x/v2/history/toview/del
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -432,7 +432,7 @@ curl -b "SESSDATA=xxx" -d "viewed=true&csrf=xxx" "http://api.bilibili.com/x/v2/h
|
||||
|
||||
> http://api.bilibili.com/x/v2/history/toview/clear
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.live.bilibili.com/room/v1/Room/getRoomInfoOld
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
169
live/info_flow.md
Normal file
169
live/info_flow.md
Normal file
@ -0,0 +1,169 @@
|
||||
# 直播间信息流
|
||||
|
||||
|
||||
|
||||
## 数据包格式
|
||||
|
||||
数据包为websocket,格式为头部数据+正文数据
|
||||
|
||||
操作流程:
|
||||
|
||||
发送认证包->接收认证包回应->接收普通包&(每30秒发送心跳包->接收心跳回应)
|
||||
|
||||
头部格式:
|
||||
|
||||
| 偏移量 | 长度 | 类型 | 含义 |
|
||||
| ------ | ---- | ------ | ------------------------------------------------------------ |
|
||||
| 0 | 4 | uint32 | 封包总大小(头部大小+正文大小) |
|
||||
| 4 | 2 | uint16 | 头部大小(一般为0x0010,16字节) |
|
||||
| 6 | 2 | uint16 | 协议版本:<br />0普通包正文不使用压缩 <br />1心跳及认证包正文不使用压缩<br />2普通包正文使用zlib压缩 |
|
||||
| 8 | 4 | uint32 | 操作码(封包类型) |
|
||||
| 12 | 4 | uint32 | sequence,可以取常数1 |
|
||||
|
||||
操作码:
|
||||
|
||||
| 代码 | 含义 |
|
||||
| ---- | -------------------- |
|
||||
| 2 | 心跳包 |
|
||||
| 3 | 心跳包回复(人气值) |
|
||||
| 5 | 普通包(命令) |
|
||||
| 7 | 认证包 |
|
||||
| 8 | 认证包回复 |
|
||||
|
||||
### 认证包
|
||||
|
||||
方式:(上行)
|
||||
|
||||
连接成功后5秒内发送,否则强制断开连接
|
||||
|
||||
正文:
|
||||
|
||||
json格式
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| --------- | ---- | ------------ | -------------- |
|
||||
| uid | num | 用户UID | 不可为0 |
|
||||
| roomid | num | 加入房间的ID | |
|
||||
| protover | num | 协议版本 | 现在是2 |
|
||||
| platform | str | 平台标识 | 可为"web" |
|
||||
| clientver | str | 客户端版本 | 现在是"1.10.3" |
|
||||
| type | num | 必须为2 | |
|
||||
| key | str | 认证秘钥 | |
|
||||
|
||||
示例:
|
||||
|
||||
```
|
||||
00000000 00 00 00 f0 00 10 00 01 00 00 00 07 00 00 00 01 |................|
|
||||
00000010 7b 22 75 69 64 22 3a 32 39 33 37 39 33 34 33 35 |{"uid":293793435|
|
||||
00000020 2c 22 72 6f 6f 6d 69 64 22 3a 32 31 36 38 36 32 |,"roomid":216862|
|
||||
00000030 33 37 2c 22 70 72 6f 74 6f 76 65 72 22 3a 32 2c |37,"protover":2,|
|
||||
00000040 22 70 6c 61 74 66 6f 72 6d 22 3a 22 77 65 62 22 |"platform":"web"|
|
||||
00000050 2c 22 63 6c 69 65 6e 74 76 65 72 22 3a 22 31 2e |,"clientver":"1.|
|
||||
00000060 31 30 2e 33 22 2c 22 74 79 70 65 22 3a 32 2c 22 |10.3","type":2,"|
|
||||
00000070 6b 65 79 22 3a 22 43 6f 4b 68 5f 61 49 46 42 6c |key":"CoKh_aIFBl|
|
||||
00000080 51 32 4c 57 77 64 79 4e 43 6b 2d 69 5f 42 76 72 |Q2LWwdyNCk-i_Bvr|
|
||||
00000090 64 72 72 55 4d 32 78 57 6c 74 62 35 77 6b 54 50 |drrUM2xWltb5wkTP|
|
||||
000000a0 4e 72 44 55 49 2d 73 46 32 41 56 56 4f 44 78 43 |NrDUI-sF2AVVODxC|
|
||||
000000b0 52 42 39 69 64 76 74 34 46 32 4d 50 31 45 4a 6c |RB9idvt4F2MP1EJl|
|
||||
000000c0 4d 68 49 57 6b 31 5a 69 73 67 6e 32 67 67 66 6c |MhIWk1Zisgn2ggfl|
|
||||
000000d0 68 72 65 6e 4f 4b 65 39 7a 56 65 6d 78 35 7a 5f |hrenOKe9zVemx5z_|
|
||||
000000e0 5a 4d 43 61 55 77 4c 31 65 70 6d 7a 5a 53 22 7d |ZMCaUwL1epmzZS"}|
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 认证包回复
|
||||
|
||||
方式:(下行)
|
||||
|
||||
在认证包发送成功后就会收到
|
||||
|
||||
json格式
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ---- | ---- | ------ | --------- |
|
||||
| code | num | 返回值 | 0认证成功 |
|
||||
|
||||
示例:
|
||||
|
||||
```
|
||||
00000000 00 00 00 1a 00 10 00 01 00 00 00 08 00 00 00 01 |................|
|
||||
00000010 7b 22 63 6f 64 65 22 3a 30 7d |{"code":0}|
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 心跳包
|
||||
|
||||
方式:(上行)
|
||||
|
||||
30秒左右发送一次,否则60秒后会被强制断开连接
|
||||
|
||||
正文:
|
||||
|
||||
特定字符
|
||||
|
||||
[object Object]
|
||||
|
||||
示例:
|
||||
|
||||
```
|
||||
00000000 00 00 00 1f 00 10 00 01 00 00 00 02 00 00 00 01 |................|
|
||||
00000010 5b 6f 62 6a 65 63 74 20 4f 62 6a 65 63 74 5d |[object Object]|
|
||||
```
|
||||
|
||||
### 心跳回应(人气值)
|
||||
|
||||
方式:(下行)
|
||||
|
||||
在心跳包发送成功后就会收到
|
||||
|
||||
正文:
|
||||
|
||||
uint32整数,代表房间当前的人气值
|
||||
|
||||
示例:
|
||||
|
||||
```
|
||||
00000000 00 00 00 14 00 10 00 01 00 00 00 03 00 00 00 01 |................|
|
||||
00000010 00 00 14 83 |....|
|
||||
```
|
||||
|
||||
可见房间内人气值为5251人
|
||||
|
||||
### 普通包
|
||||
|
||||
方式:(下行)
|
||||
|
||||
#### 弹幕
|
||||
|
||||
|
||||
|
||||
#### 送礼
|
||||
|
||||
|
||||
|
||||
#### 欢迎加入房间
|
||||
|
||||
|
||||
|
||||
#### 欢迎房管加入房间
|
||||
|
||||
|
||||
|
||||
#### 系统消息
|
||||
|
||||
|
||||
|
||||
#### 主播准备中
|
||||
|
||||
|
||||
|
||||
#### 直播开始
|
||||
|
||||
|
||||
|
||||
#### 直播状态更新
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.live.bilibili.com/room/v1/Area/getList
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
直播分区共有两级,分别是父分区和子分区
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.live.bilibili.com/room/v1/Room/update
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
还需验证cookie中`bili_jct`的值正确并与`csrf`相同
|
||||
|
||||
@ -50,7 +50,7 @@ curl -b "SESSDATA=xxx;bili_jct=xxx" -d "room_id=10352053&title=%E6%B5%8B%E8%AF%9
|
||||
|
||||
> http://api.live.bilibili.com/room/v1/Room/startLive
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
还需验证cookie中`bili_jct`的值正确并与`csrf`相同
|
||||
|
||||
@ -179,7 +179,7 @@ curl -b "SESSDATA=xxx;bili_jct=xxx" -d "room_id=10352053&area_v2=27&platform=pc&
|
||||
|
||||
> http://api.live.bilibili.com/room/v1/Room/stopLive
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
还需验证cookie中`bili_jct`的值正确并与`csrf`相同
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
> http://passport.bilibili.com/qrcode/getLoginUrl
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
密钥超时为180秒
|
||||
|
||||
@ -43,7 +43,10 @@
|
||||
|
||||
用申请到的`data`.`url`中的值生成二维码,等待手机客户端扫描,并将`data`.`oauthKey`保存等待使用
|
||||
|
||||
http://passport.bilibili.com/qrcode/getLoginUrl
|
||||
```shell
|
||||
curl 'http://passport.bilibili.com/qrcode/getLoginUrl'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
@ -56,13 +59,11 @@ http://passport.bilibili.com/qrcode/getLoginUrl
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 验证二维码登录
|
||||
## 使用扫码登录(验证扫码状态)
|
||||
|
||||
> http://passport.bilibili.com/qrcode/getLoginInfo
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
密钥超时为180秒
|
||||
|
||||
@ -96,7 +97,13 @@ data 对象:
|
||||
|
||||
**示例:**
|
||||
|
||||
curl -d "oauthKey=xxx" "http://passport.bilibili.com/qrcode/getLoginInfo"
|
||||
例如扫码秘钥为`23333`
|
||||
|
||||
```shell
|
||||
curl "http://passport.bilibili.com/qrcode/getLoginInfo"\
|
||||
--data-urlencode 'oauthKey=23333'\
|
||||
-c 'cookie.txt'
|
||||
```
|
||||
|
||||
当密钥正确时但未扫描时`status`为`false`,`data`为num值`-4`
|
||||
|
@ -10,7 +10,7 @@ web端短信登录流程:
|
||||
|
||||
> http://passport.bilibili.com/web/generic/country/list
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -90,7 +90,7 @@ curl 'http://passport.bilibili.com/web/generic/country/list'
|
||||
|
||||
> http://passport.bilibili.com/web/sms/general/v2/send
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
短信发送CD时间为60s
|
||||
|
||||
@ -123,7 +123,7 @@ curl 'http://passport.bilibili.com/web/generic/country/list'
|
||||
例如手机号为`13888888888`,国际ID为`1(中国大陆)`,登录秘钥为`aabbccdd`,极验challenge为`2333`,极验结果为`666666`,进行发送短信验证码操作
|
||||
|
||||
```shell
|
||||
curl --request POST 'http://passport.bilibili.com/web/sms/general/v2/send' \
|
||||
curl 'http://passport.bilibili.com/web/sms/general/v2/send' \
|
||||
--data-urlencode 'tel=13888888888'\
|
||||
--data-urlencode 'cid=1'\
|
||||
--data-urlencode 'type=21'\
|
||||
@ -140,11 +140,11 @@ curl --request POST 'http://passport.bilibili.com/web/sms/general/v2/send' \
|
||||
}
|
||||
```
|
||||
|
||||
## 验证短信登录操作(web端)
|
||||
## 使用短信验证码登录(web端)
|
||||
|
||||
> http://passport.bilibili.com/web/login/rapid
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
验证登录成功后会进行设置以下cookie项:
|
||||
|
||||
@ -182,7 +182,7 @@ curl --request POST 'http://passport.bilibili.com/web/sms/general/v2/send' \
|
||||
使用手机号`13888888888`,短信验证码为`123456`,进行验证登录操作
|
||||
|
||||
```shell
|
||||
curl --request POST 'https://passport.bilibili.com/web/login/rapid'
|
||||
curl 'https://passport.bilibili.com/web/login/rapid'
|
||||
--data-urlencode 'cid=1'\
|
||||
--data-urlencode 'tel=13888888888'\
|
||||
--data-urlencode 'smsCode=123456'
|
@ -10,7 +10,7 @@ web端密码登录流程:
|
||||
|
||||
> http://passport.bilibili.com/login?act=getkey
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -38,7 +38,7 @@ curl 'http://passport.bilibili.com/login?act=getkey'
|
||||
|
||||
> http://passport.bilibili.com/api/oauth2/getKey
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -59,7 +59,7 @@ curl 'http://passport.bilibili.com/login?act=getkey'
|
||||
**示例:**
|
||||
|
||||
```shell
|
||||
curl --request POST 'http://passport.bilibili.com/api/oauth2/getKey'\
|
||||
curl 'http://passport.bilibili.com/api/oauth2/getKey'\
|
||||
--data-urlencode 'appkey=1d8b6e7d45233436'\
|
||||
--data-urlencode 'sign=17004c193f688f0b5665c1068e733aff'
|
||||
```
|
||||
@ -75,7 +75,7 @@ curl --request POST 'http://passport.bilibili.com/api/oauth2/getKey'\
|
||||
|
||||
**注:RSA公钥一般为固定值**
|
||||
|
||||
```plaintext
|
||||
```
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjb4V7EidX/ym28t2ybo0U6t0n
|
||||
6p4ej8VjqKHg100va6jkNbNTrLQqMCQCAYtXMXXp2Fwkk6WR+12N9zknLjf+C9sx
|
||||
@ -86,19 +86,19 @@ Xl69GV6klzgxW6d2xQIDAQAB
|
||||
|
||||
例如登录密码为:
|
||||
|
||||
```plaintext
|
||||
```
|
||||
BiShi22332323
|
||||
```
|
||||
|
||||
获取到的盐值为:
|
||||
|
||||
```plaintext
|
||||
```
|
||||
8e0db05c46f4052c
|
||||
```
|
||||
|
||||
那么按照`盐值`+`密码字串`连接二者得到:
|
||||
|
||||
```plaintext
|
||||
```
|
||||
8e0db05c46f4052cBiShi22332323
|
||||
```
|
||||
|
||||
@ -106,15 +106,15 @@ BiShi22332323
|
||||
|
||||
因为公钥的**无法解密性**和盐值的**超时机制**,故无法本地验证加密结果
|
||||
|
||||
```plaintext
|
||||
```
|
||||
YgpjxAQ22pKa9socHIKPCZX0a/NS6Ng9Zzy+rp16b0LJGT6RHw2ERs3+ijCpG96PKTY1Baavwf0xgotmNvpl25l1KO5y4AjcqeWTzNTSVn6ejonBXGmBMybHHYawJ0aMPn1eDGpKrbI91mrF+h2x+fsnnpuZ1gheiYGzFmtshUc=
|
||||
```
|
||||
|
||||
## 验证密码登录操作(web端)
|
||||
## 使用账号密码登录(web端)
|
||||
|
||||
> http://passport.bilibili.com/web/login/v2
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
验证登录成功后会进行设置以下cookie项:
|
||||
|
||||
@ -164,7 +164,7 @@ YgpjxAQ22pKa9socHIKPCZX0a/NS6Ng9Zzy+rp16b0LJGT6RHw2ERs3+ijCpG96PKTY1Baavwf0xgotm
|
||||
例如用户账号为`12345678900`,加密后的密码为`xxx`,登录秘钥为`aabbccdd`,极验challenge为`2333`,极验结果为`666666`,进行验证登录操作
|
||||
|
||||
```shell
|
||||
curl --request POST 'https://passport.bilibili.com/web/login/v2'\
|
||||
curl 'https://passport.bilibili.com/web/login/v2'\
|
||||
--data-urlencode 'captchaType=6'\
|
||||
--data-urlencode 'username=12345678900'\
|
||||
--data-urlencode 'password=xxx'\
|
@ -1,7 +1,15 @@
|
||||
# 验证码登录
|
||||
# 登录操作
|
||||
|
||||
人机验证方式登录包含**账号密码登录**与手**机短信验证码登录**
|
||||
|
||||
**注:扫码登录**不需要进行**人机验证**,故**不使用**以下接口
|
||||
|
||||
## 扫码登录
|
||||
|
||||
- [扫码登录](QR.md)
|
||||
|
||||
## 验证登录
|
||||
|
||||
人机验证流程:
|
||||
|
||||
1. 请求验证码参数,得到登录密钥`key`与极验ID`gt`和极验KEY`challenge`
|
||||
@ -9,11 +17,11 @@
|
||||
3. 返回验证结果`validate`与`seccode`,进行短信或密码登录
|
||||
|
||||
|
||||
## 申请验证码参数
|
||||
### 申请验证码参数
|
||||
|
||||
> http://passport.bilibili.com/web/captcha/combine?plat=6
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -61,7 +69,7 @@ curl 'https://passport.bilibili.com/web/captcha/combine?plat=6'
|
||||
```
|
||||
|
||||
|
||||
## 进行验证
|
||||
### 进行验证
|
||||
|
||||
本文档为Bilibili文档,验证码为geetest极验提供,故不提供api
|
||||
|
||||
@ -74,7 +82,7 @@ curl 'https://passport.bilibili.com/web/captcha/combine?plat=6'
|
||||
4. 使用最开始获得到的`key`、`challenge`和刚获得到的`validate`、`seccode`继续之后的登录操作
|
||||
|
||||
|
||||
## 继续登录
|
||||
### 继续登录
|
||||
|
||||
- [短信登录](SMS.md)
|
||||
- [密码登录](password.md)
|
@ -8,7 +8,7 @@
|
||||
>
|
||||
> http://api.bilibili.com/x/web-interface/nav (原始数据)
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -179,7 +179,7 @@ http://api.bilibili.com/x/web-interface/nav
|
||||
|
||||
> http://account.bilibili.com/home/userInfo
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要验证DedeUserID存在且不为0
|
||||
|
||||
@ -257,7 +257,7 @@ http://account.bilibili.com/home/userInfo
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/nav/stat
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/member/web/account
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -60,7 +60,7 @@ http://api.bilibili.com/x/member/web/account
|
||||
|
||||
> http://api.bilibili.com/x/member/web/exp/reward
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -114,7 +114,7 @@ http://api.bilibili.com/x/member/web/exp/reward
|
||||
|
||||
> http://api.bilibili.com/x/vip/web/user/info
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -164,7 +164,7 @@ http://api.bilibili.com/x/vip/web/user/info
|
||||
|
||||
> http://passport.bilibili.com/web/site/user/info
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要验证`DedeUserID`存在且不为0
|
||||
|
||||
@ -260,7 +260,7 @@ http://passport.bilibili.com/web/site/user/info
|
||||
|
||||
> http://api.bilibili.com/x/member/realname/status
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -302,7 +302,7 @@ http://api.bilibili.com/x/member/realname/status
|
||||
|
||||
> http://api.bilibili.com/x/member/realname/apply/status
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -348,7 +348,7 @@ http://api.bilibili.com/x/member/realname/apply/status
|
||||
|
||||
> http://api.bilibili.com/x/member/web/coin/log
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
仅能查询最近一周的情况
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/msgfeed/unread
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.vc.bilibili.com/session_svr/v1/session_svr/single_unread
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://www.bilibili.com/audio/music-service-c/web/collections/songs-coll
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -44,7 +44,7 @@ http://www.bilibili.com/audio/music-service-c/web/collections/songs-coll?sid=135
|
||||
|
||||
> http://www.bilibili.com/audio/music-service-c/web/coin/audio
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://www.bilibili.com/audio/music-service-c/web/song/info
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -138,7 +138,7 @@ http://www.bilibili.com/audio/music-service-c/web/song/info?sid=13598
|
||||
|
||||
> http://www.bilibili.com/audio/music-service-c/web/tag/song
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -230,7 +230,7 @@ http://www.bilibili.com/audio/music-service-c/web/tag/song?sid=15664
|
||||
|
||||
> http://www.bilibili.com/audio/music-service-c/web/member/song
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -360,7 +360,7 @@ http://www.bilibili.com/audio/music-service-c/web/member/song?sid=815861
|
||||
|
||||
> http://www.bilibili.com/audio/music-service-c/web/song/lyric
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
同「查询歌曲基本信息」中的lrc歌词
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> https://www.bilibili.com/audio/music-service-c/web/collections/list
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)及验证DedeUserID存在且不为0
|
||||
|
||||
@ -162,7 +162,7 @@
|
||||
|
||||
> https://www.bilibili.com/audio/music-service-c/web/collections/info
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)及验证DedeUserID存在且不为0
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
>http://www.bilibili.com/audio/music-service-c/web/stat/song
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
唯缺投币数2333333
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# API认证与鉴权
|
||||
|
||||
## cookie方式
|
||||
## Cookie方式
|
||||
|
||||
cookie中的值在访问登录接口成功登录时,用`set-cookie`写入
|
||||
|
||||
@ -15,7 +15,7 @@ Token有效期为1月,更改密码或过期失效
|
||||
| SESSDATA | 登录Token | 用于用户识别与鉴权<br />作用同`access_key` |
|
||||
| bili_jct | CSRF Token | 用于操作性接口 |
|
||||
|
||||
## app方式
|
||||
## APP方式
|
||||
|
||||
| 参数 | 含义 | 备注 |
|
||||
| ------------- | ---------------- | -------------- |
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/zone
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/report/click/now
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/online
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**json回复:**
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/dynamic/region
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
>http://api.bilibili.com/x/web-interface/ranking/region
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
获取相应时间段内播放量增速为前11的视频
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/search/type
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
根据关键词进行搜索,返回结果每页20项
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# 检查昵称是否可注册
|
||||
也可用于判断指定昵称的用户是否存在
|
||||
|
||||
### 请求地址
|
||||
###
|
||||
> http://passport.bilibili.com/web/generic/check/nickname
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -35,9 +35,12 @@
|
||||
|
||||
**示例:**
|
||||
|
||||
查询昵称 `xijinping` 是否被使用
|
||||
查询昵称 `xijinping` 是否被使用:
|
||||
|
||||
http://passport.bilibili.com/web/generic/check/nickname?nickName=xijinping
|
||||
```shell
|
||||
curl -G 'http://passport.bilibili.com/web/generic/check/nickname'\
|
||||
--data-urlencode 'nickName=xijinping'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -46,9 +49,12 @@ http://passport.bilibili.com/web/generic/check/nickname?nickName=xijinping
|
||||
}
|
||||
```
|
||||
|
||||
查询昵称 `//` 是否被使用
|
||||
查询昵称 `//` 是否被使用:
|
||||
|
||||
http://passport.bilibili.com/web/generic/check/nickname?nickName=%2F%2F
|
||||
```shell
|
||||
curl -G 'http://passport.bilibili.com/web/generic/check/nickname'\
|
||||
--data-urlencode 'nickName=//'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -57,9 +63,12 @@ http://passport.bilibili.com/web/generic/check/nickname?nickName=%2F%2F
|
||||
}
|
||||
```
|
||||
|
||||
查询昵称 `test0000000000000 ` 是否被使用
|
||||
查询昵称 `test0000000000000 ` 是否被使用:
|
||||
|
||||
http://passport.bilibili.com/web/generic/check/nickname?nickName=test0000000000000
|
||||
```shell
|
||||
curl -G 'http://passport.bilibili.com/web/generic/check/nickname'\
|
||||
--data-urlencode 'nickName=test0000000000000 '
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -68,9 +77,12 @@ http://passport.bilibili.com/web/generic/check/nickname?nickName=%2F%2F
|
||||
}
|
||||
```
|
||||
|
||||
查询昵称 `0` 是否被使用
|
||||
查询昵称 `0` 是否被使用:
|
||||
|
||||
http://passport.bilibili.com/web/generic/check/nickname?nickName=0
|
||||
```shell
|
||||
curl -G 'http://passport.bilibili.com/web/generic/check/nickname'\
|
||||
--data-urlencode 'nickName=0'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -79,9 +91,12 @@ http://passport.bilibili.com/web/generic/check/nickname?nickName=%2F%2F
|
||||
}
|
||||
```
|
||||
|
||||
查询昵称 `test` 是否被使用
|
||||
查询昵称 `test` 是否被使用:
|
||||
|
||||
http://passport.bilibili.com/web/generic/check/nickname?nickName=test
|
||||
```shell
|
||||
curl -G 'http://passport.bilibili.com/web/generic/check/nickname'\
|
||||
--data-urlencode 'nickName=test'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
|
29
user/info.md
29
user/info.md
@ -5,7 +5,7 @@
|
||||
## 用户详细信息1 (用于空间)
|
||||
> http://api.bilibili.com/x/space/acc/info
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -99,7 +99,12 @@
|
||||
|
||||
查询用户`UID=2`的详细信息
|
||||
|
||||
http://api.bilibili.com/x/space/acc/info?mid=2
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/space/acc/info'\
|
||||
--data-urlencode 'mid=2'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
@ -202,7 +207,7 @@ http://i2.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/card
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -325,7 +330,13 @@ http://i2.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png
|
||||
|
||||
**示列:**
|
||||
|
||||
http://api.bilibili.com/x/web-interface/card?mid=2&photo=true
|
||||
```shell
|
||||
curl -G 'api.bilibili.com/x/web-interface/card'\
|
||||
--data-urlencode 'mid=2'\
|
||||
--data-urlencode 'photo=true'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
@ -402,13 +413,11 @@ http://api.bilibili.com/x/web-interface/card?mid=2&photo=true
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 本用户详细信息
|
||||
|
||||
> http://api.bilibili.com/x/space/myinfo
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -509,7 +518,11 @@ http://api.bilibili.com/x/web-interface/card?mid=2&photo=true
|
||||
|
||||
**示例:**
|
||||
|
||||
http://api.bilibili.com/x/space/myinfo
|
||||
```shell
|
||||
curl -G 'api.bilibili.com/x/space/myinfo'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
|
202
user/relation.md
202
user/relation.md
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/relation/followers
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
登录(SESSDATA)可看自己全部
|
||||
|
||||
@ -90,7 +90,13 @@
|
||||
|
||||
以每页2项的方式获取`UID=293793435`的用户的第1页的粉丝明细
|
||||
|
||||
http://api.bilibili.com/x/relation/followers?vmid=293793435&ps=2&pn=1
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/relation/followers'\
|
||||
--data-urlencode 'vmid=293793435'\
|
||||
--data-urlencode 'ps=2'\
|
||||
--data-urlencode 'pn=1'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -155,15 +161,13 @@ http://api.bilibili.com/x/relation/followers?vmid=293793435&ps=2&pn=1
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 查询用户关注明细
|
||||
|
||||
<img src="/imgs/relation.svg" width="100" height="100" />
|
||||
|
||||
> http://api.bilibili.com/x/relation/followings
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
登录(SESSDATA)可看自己全部
|
||||
|
||||
@ -255,7 +259,13 @@ data 对象:
|
||||
|
||||
以每页2项的方式获取`UID=293793435`的用户的第1页的关注明细
|
||||
|
||||
http://api.bilibili.com/x/relation/followings?vmid=293793435&ps=2&pn=1
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/relation/ollowings'\
|
||||
--data-urlencode 'vmid=293793435'\
|
||||
--data-urlencode 'ps=2'\
|
||||
--data-urlencode 'pn=1'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -320,26 +330,24 @@ http://api.bilibili.com/x/relation/followings?vmid=293793435&ps=2&pn=1
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 操作用户关系(关注/取关 等)
|
||||
|
||||
<img src="/imgs/follow.svg" width="200" height="100" />
|
||||
|
||||
> http://api.bilibili.com/x/relation/modify
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------ | ---- | ------------------------ | ------ | ------------------ |
|
||||
| fid | num | 目标用户UID | 必要 | |
|
||||
| act | num | 操作代码 | 必要 | **操作代码见下表** |
|
||||
| re_src | num | 必须为11 | 必要 | |
|
||||
| csrf | str | CSRF Token(位于cookie) | 必要 | |
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------ | ---- | ------------------------ | ------ | ------------------------------------- |
|
||||
| fid | num | 目标用户UID | 必要 | |
|
||||
| act | num | 操作代码 | 必要 | **操作代码见下表** |
|
||||
| re_src | num | 关注来源代码 | 必要 | 空间:11<br />视频:14<br />文章:115 |
|
||||
| csrf | str | CSRF Token(位于cookie) | 必要 | |
|
||||
|
||||
操作代码`act`:
|
||||
|
||||
@ -367,7 +375,14 @@ http://api.bilibili.com/x/relation/followings?vmid=293793435&ps=2&pn=1
|
||||
|
||||
关注`UID=14082`的用户
|
||||
|
||||
curl -b SESSDATA=xxx -d "fid=14082&act=1&re_src=11&csrf=xxx" "http://api.bilibili.com/x/relation/modify"
|
||||
```shell
|
||||
curl 'http://http://api.bilibili.com/x/relation/modify'\
|
||||
--data-urlencode 'fid=14082'\
|
||||
--data-urlencode 'act=1'\
|
||||
--data-urlencode 're_src=11'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -377,13 +392,11 @@ curl -b SESSDATA=xxx -d "fid=14082&act=1&re_src=11&csrf=xxx" "http://api.bilibil
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 查询用户与自己关系1 (仅查关注)
|
||||
|
||||
> http://api.bilibili.com/x/relation
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -426,7 +439,11 @@ curl -b SESSDATA=xxx -d "fid=14082&act=1&re_src=11&csrf=xxx" "http://api.bilibil
|
||||
|
||||
可得对于`UID=258150656`的用户,在`2018/10/28 0:51:41`时关注,且设为特别关注,并位于ID为`-10`分组中
|
||||
|
||||
http://api.bilibili.com/x/relation?fid=258150656
|
||||
```shell
|
||||
curl -G 'http://http://api.bilibili.com/x/relation'\
|
||||
--data-urlencode 'fid=258150656'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -443,13 +460,11 @@ http://api.bilibili.com/x/relation?fid=258150656
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 查询用户与自己关系2(互相)
|
||||
|
||||
> http://api.bilibili.com/x/space/acc/relation
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -509,7 +524,11 @@ http://api.bilibili.com/x/relation?fid=258150656
|
||||
|
||||
可得对于`UID=15858903`的用户,在`2019/1/24 14:24:19`时关注了对方,且互相关注,自己将对方特别关注,并同时位于ID为`-10`和`194110`的分组中,对方也将自己设为特别关注,并同时位于ID为`-10`和`56502`的分组中(虽然我看不到)
|
||||
|
||||
http://api.bilibili.com/x/space/acc/relation?mid=15858903
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/space/acc/relation'\
|
||||
--data-urlencode 'mid=15858903'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -537,15 +556,13 @@ http://api.bilibili.com/x/space/acc/relation?mid=15858903
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 关注分组相关
|
||||
|
||||
### 查询关注分组列表
|
||||
|
||||
> http://api.bilibili.com/x/relation/tags
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -581,7 +598,10 @@ http://api.bilibili.com/x/space/acc/relation?mid=15858903
|
||||
|
||||
查询所有的分组的名字以及ID
|
||||
|
||||
http://api.bilibili.com/x/relation/tags
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/relation/tags'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -606,13 +626,11 @@ http://api.bilibili.com/x/relation/tags
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 查询关注分组明细
|
||||
|
||||
> http://api.bilibili.com/x/relation/tag
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -684,7 +702,13 @@ http://api.bilibili.com/x/relation/tags
|
||||
|
||||
以每页2项的方式获取了ID为`207542`分组的第1页的粉丝明细
|
||||
|
||||
http://api.bilibili.com/x/relation/tag?tagid=207542&ps=2&pn=1
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/relation/tag'\
|
||||
--data-urlencode 'tagid=207542'\
|
||||
--data-urlencode 'ps=2'\
|
||||
--data-urlencode 'pn=1'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -737,13 +761,11 @@ http://api.bilibili.com/x/relation/tag?tagid=207542&ps=2&pn=1
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 查询目标用户所在的分组
|
||||
|
||||
> http://api.bilibili.com/x/relation/tag/user
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -776,7 +798,11 @@ http://api.bilibili.com/x/relation/tag?tagid=207542&ps=2&pn=1
|
||||
|
||||
查询用户`UID=319214221`存在的所有分组ID和名称
|
||||
|
||||
http://api.bilibili.com/x/relation/tag/user?fid=319214221
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/relation/tag/user'\
|
||||
--data-urlencode 'fid=319214221'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -790,12 +816,12 @@ http://api.bilibili.com/x/relation/tag/user?fid=319214221
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 查询所有特别关注的UID
|
||||
|
||||
> http://api.bilibili.com/x/relation/tag/special
|
||||
|
||||
*请求方式:GET*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
**json回复:**
|
||||
@ -819,7 +845,10 @@ http://api.bilibili.com/x/relation/tag/user?fid=319214221
|
||||
|
||||
**示例:**
|
||||
|
||||
http://api.bilibili.com/x/relation/tag/special
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/relation/tag/special'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -849,15 +878,13 @@ http://api.bilibili.com/x/relation/tag/special
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 创建关注分组
|
||||
### 创建分组
|
||||
|
||||
<img src="/imgs/add.svg" width="100" height="100" />
|
||||
|
||||
> http://api.bilibili.com/x/relation/tag/create
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -887,9 +914,14 @@ http://api.bilibili.com/x/relation/tag/special
|
||||
|
||||
**示例:**
|
||||
|
||||
创建了名为`vUP`的分组,得到ID为`216677`
|
||||
创建了名为`测试`的分组,得到ID为`216677`
|
||||
|
||||
curl -b SESSDATA=xxx -d "tag=vUP&csrf=xxx" "http://api.bilibili.com/x/relation/tag/create"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/relation/tag/create'\
|
||||
--data-urlencode 'tag=测试'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -902,13 +934,11 @@ curl -b SESSDATA=xxx -d "tag=vUP&csrf=xxx" "http://api.bilibili.com/x/relation/t
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 重命名关注分组
|
||||
### 重命名分组
|
||||
|
||||
> http://api.bilibili.com/x/relation/tag/update
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -934,7 +964,13 @@ curl -b SESSDATA=xxx -d "tag=vUP&csrf=xxx" "http://api.bilibili.com/x/relation/t
|
||||
|
||||
把ID为`194112`的分组更名为`膜法师`
|
||||
|
||||
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"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/relation/tag/update'\
|
||||
--data-urlencode 'tagid=194112'\
|
||||
--data-urlencode 'name=膜法师'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -944,15 +980,13 @@ curl -b SESSDATA=xxx -d "tagid=194112&name=%e8%86%9c%e6%b3%95%e5%b8%88&csrf=xxx"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 删除关注分组
|
||||
### 删除分组
|
||||
|
||||
<img src="/imgs/delete.svg" width="100" height="100" />
|
||||
|
||||
> http://api.bilibili.com/x/relation/tag/del
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -977,7 +1011,12 @@ curl -b SESSDATA=xxx -d "tagid=194112&name=%e8%86%9c%e6%b3%95%e5%b8%88&csrf=xxx"
|
||||
|
||||
删除分组ID为`216699`的分组
|
||||
|
||||
curl -b SESSDATA=xxx -d "tagid=216699&csrf=xxx" "http://api.bilibili.com/x/relation/tag/del"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/relation/tag/del'\
|
||||
--data-urlencode 'tagid=216699'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -987,15 +1026,13 @@ curl -b SESSDATA=xxx -d "tagid=216699&csrf=xxx" "http://api.bilibili.com/x/relat
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 修改用户分组关系(添加/删除)
|
||||
### 修改分组成员(添加/删除)
|
||||
|
||||
<img src="/imgs/add.svg" width="100" height="100" />
|
||||
|
||||
> http://api.bilibili.com/x/relation/tags/addUsers
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -1021,7 +1058,13 @@ curl -b SESSDATA=xxx -d "tagid=216699&csrf=xxx" "http://api.bilibili.com/x/relat
|
||||
|
||||
把关注用户`UID=205631797`同时添加分组关系到ID为`-10`和`207542`的分组中
|
||||
|
||||
curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" "http://api.bilibili.com/x/relation/tags/addUsers"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/relation/tags/addUsers'\
|
||||
--data-urlencode 'fids=205631797'\
|
||||
--data-urlencode 'tagids=-10,207542'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -1031,13 +1074,11 @@ curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" "http://ap
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 批量复制关注用户到分组
|
||||
### 复制关注到分组
|
||||
|
||||
> http://api.bilibili.com/x/relation/tags/copyUsers
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -1045,8 +1086,8 @@ curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" "http://ap
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------ | ---- | ------------------------ | ------ | -------------------------- |
|
||||
| fids | nums | 目标用户UID | 必要 | 每个ID之间用","(%2C)间隔 |
|
||||
| tagids | nums | 分组ID | 必要 | 每个ID之间用","(%2C)间隔 |
|
||||
| fids | nums | 待复制的用户UID | 必要 | 每个ID之间用","(%2C)间隔 |
|
||||
| tagids | nums | 目标分组ID | 必要 | 每个ID之间用","(%2C)间隔 |
|
||||
| csrf | str | CSRF Token(位于cookie) | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
@ -1063,7 +1104,13 @@ curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" "http://ap
|
||||
|
||||
把关注用户`UID=4856007`和`UID=326499679`同时复制到ID为`231305`的分组中
|
||||
|
||||
curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" "http://api.bilibili.com/x/relation/tags/copyUsers"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/relation/tags/copyUsers'\
|
||||
--data-urlencode 'fids=4856007,326499679'\
|
||||
--data-urlencode 'tagids=231305'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -1073,13 +1120,11 @@ curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" "http:
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 批量移动关注用户到分组
|
||||
### 移动关注到分组
|
||||
|
||||
> http://api.bilibili.com/x/relation/tags/moveUsers
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -1089,7 +1134,7 @@ curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" "http:
|
||||
| ------------ | ---- | ------------------------ | ------ | -------------------------- |
|
||||
| beforeTagids | nums | 原分组ID | 必要 | 每个ID之间用","(%2C)间隔 |
|
||||
| afterTagids | nums | 新分组ID | 必要 | 每个ID之间用","(%2C)间隔 |
|
||||
| fids | nums | 目标用户UID | 必要 | 每个ID之间用","(%2C)间隔 |
|
||||
| fids | nums | 待移动的用户UID | 必要 | 每个ID之间用","(%2C)间隔 |
|
||||
| csrf | str | CSRF Token(位于cookie) | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
@ -1104,11 +1149,16 @@ curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" "http:
|
||||
|
||||
**示例:**
|
||||
|
||||
把关注用户`UID=3211734
|
||||
69`和`UID=327086920`同时从ID为`207542`的分组移动到ID为`231305`的分组中
|
||||
把关注用户`UID=321173469`和`UID=327086920`同时从ID为`207542`的分组移动到ID为`231305`的分组中
|
||||
|
||||
curl -b SESSDATA=xxx -d "beforeTagids=207542&afterTagids=231305&fids=3211734
|
||||
69%2C327086920&csrf=xxx" "http://api.bilibili.com/x/relation/tags/moveUsers"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/relation/tags/moveUsers'\
|
||||
--data-urlencode 'beforeTagids=207542'\
|
||||
--data-urlencode 'afterTagids=23130'\
|
||||
--data-urlencode 'fids=321173469,327086920'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
>http://api.bilibili.com/x/space/top/arc
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
粉丝在其主页上可见
|
||||
|
||||
@ -183,7 +183,7 @@ http://api.bilibili.com/x/space/top/arc?vmid=23215368
|
||||
|
||||
> http://api.bilibili.com/x/space/masterpiece
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
新访客在其主页上可见
|
||||
|
||||
@ -410,7 +410,7 @@ http://api.bilibili.com/x/space/masterpiece?vmid=23215368
|
||||
|
||||
> http://api.bilibili.com/x/space/arc/search
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -596,7 +596,7 @@ http://api.bilibili.com/x/space/arc/search?mid=53456&ps=2&pn=1
|
||||
|
||||
> http://space.bilibili.com/ajax/Bangumi/getList
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
带有转义,且只能获取最多15条
|
||||
|
||||
@ -701,7 +701,7 @@ http://space.bilibili.com/ajax/Bangumi/getList?mid=14082
|
||||
|
||||
> http://api.bilibili.com/x/space/bangumi/follow/list
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
如设置隐私查看自己的需要登录(SESSDATA)
|
||||
|
||||
@ -949,7 +949,7 @@ http://api.bilibili.com/x/space/bangumi/follow/list?vmid=14082&pn=1&ps=2&type=1
|
||||
|
||||
> http://space.bilibili.com/ajax/tags/getSubList
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
带有转义
|
||||
|
||||
@ -1039,7 +1039,7 @@ http://space.bilibili.com/ajax/tags/getSubList?mid=2
|
||||
|
||||
> http://api.bilibili.com/x/space/album/index
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
所有类型的相簿
|
||||
|
||||
@ -1161,7 +1161,7 @@ http://api.bilibili.com/x/space/album/index?mid=53456&ps=2
|
||||
|
||||
> http://api.vc.bilibili.com/link_draw/v1/doc/doc_list
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -1298,7 +1298,7 @@ http://api.vc.bilibili.com/link_draw/v1/doc/doc_list?uid=2&page_num=1&page_size=
|
||||
|
||||
> http://api.bilibili.com/x/space/channel/list
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -1416,7 +1416,7 @@ http://api.bilibili.com/x/space/channel/list?mid=53456
|
||||
|
||||
> http://api.bilibili.com/x/space/channel/video
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -1626,7 +1626,7 @@ http://api.bilibili.com/x/space/channel/video?mid=53456&cid=170&ps=2&pn=1
|
||||
|
||||
> http://api.bilibili.com/x/space/notice
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -1666,7 +1666,7 @@ http://api.bilibili.com/x/space/notice?mid=53456
|
||||
|
||||
> http://api.bilibili.com/x/space/acc/tags
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
上限5条,且内容由用户自定义
|
||||
|
||||
@ -1735,7 +1735,7 @@ http://api.bilibili.com/x/space/acc/tags?mid=53456
|
||||
|
||||
> http://api.bilibili.com/x/space/lastplaygame
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -1817,7 +1817,7 @@ http://api.bilibili.com/x/space/acc/tags?mid=53456
|
||||
|
||||
> http://api.bilibili.com/x/v3/fav/folder/created/list-all
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
查看私有收藏夹时需要登录(SESSDATA)
|
||||
|
||||
@ -1935,7 +1935,7 @@ http://api.bilibili.com/x/v3/fav/folder/created/list-all?up_mid=7792521
|
||||
|
||||
> http://api.bilibili.com/x/v3/fav/folder/collected/list
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -2070,7 +2070,7 @@ http://api.bilibili.com/x/v3/fav/folder/created/list-all?up_mid=7792521
|
||||
|
||||
> http://api.bilibili.com/x/member/web/sign/update
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
签名最多支持70个字
|
||||
|
||||
@ -2115,7 +2115,7 @@ curl -b "SESSDATA=xxx" -d "user_sign=%E9%AB%98%E4%B8%AD%E6%8A%80%E6%9C%AF%E5%AE%
|
||||
|
||||
> http://api.bilibili.com/x/space/notice/set
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -2156,7 +2156,7 @@ curl -b "sessdata=xxx" -d "csrf=xxx¬ice=%E9%B8%BD%E5%AD%90" "http://api.bilib
|
||||
|
||||
> http://space.bilibili.com/ajax/settings/setPrivacy
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -2203,7 +2203,7 @@ curl --referer "http://.bilibili.com" -b "SESSDATA=xxx;DedeUserID=1;DedeUserID__
|
||||
|
||||
> http://space.bilibili.com/ajax/settings/setIndexOrder
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -2273,7 +2273,7 @@ curl --referer "http://.bilibili.com" -b "SESSDATA=xxx;DedeUserID=1;DedeUserID__
|
||||
|
||||
> http://api.bilibili.com/x/space/acc/tags/set
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -2312,11 +2312,11 @@ curl -b "SESSDATA=xxx;DedeUserID=1" -d "csrf=xxx&tags=minecraft%2C%E6%8A%80%E6%9
|
||||
|
||||
|
||||
|
||||
### 修改(添加)置顶视频
|
||||
### 添加置顶视频
|
||||
|
||||
> http://api.bilibili.com/x/space/top/arc/set
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -2361,7 +2361,7 @@ curl -b "SESSDATA=xxx" -b "aid=98948772&csrf=xxx" "http://api.bilibili.com/x/spa
|
||||
|
||||
> http://api.bilibili.com/x/space/top/arc/cancel
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -2399,7 +2399,7 @@ curl -b "SESSDATA=xxx" -d "csrf=xxx" "http://api.bilibili.com/x/space/top/arc/ca
|
||||
|
||||
> http://api.bilibili.com/x/space/masterpiece/add
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -2446,7 +2446,7 @@ curl -b "SESSDATA=xxx" -d "csrf=xxx&aid=94916552" "http://api.bilibili.com/x/spa
|
||||
|
||||
> http://api.bilibili.com/x/space/masterpiece/cancel
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
## 关系状态数
|
||||
> http://api.bilibili.com/x/relation/stat
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -59,7 +59,7 @@ http://api.bilibili.com/x/relation/stat?vmid=332704117
|
||||
|
||||
> http://api.bilibili.com/x/space/upstat
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -126,7 +126,7 @@ http://api.bilibili.com/x/space/upstat?mid=456664753
|
||||
|
||||
> http://api.bilibili.com/x/space/navnum
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -213,7 +213,7 @@ http://api.bilibili.com/x/space/navnum?mid=239202390
|
||||
|
||||
> http://api.vc.bilibili.com/link_draw/v1/doc/upload_count
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/view
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -113,19 +113,19 @@
|
||||
| --------- | ---- | --------------- | ------------------------------------ |
|
||||
| cid | num | 当前分P CID | |
|
||||
| page | num | 当前分P | |
|
||||
| from | str | 视频来源 | vupload:用户上传<br />hunan:芒果TV |
|
||||
| from | str | 视频来源 | vupload:普通上传<br />hunan:芒果TV |
|
||||
| part | str | 当前分P标题 | |
|
||||
| duration | num | 当前分P持续时间 | 单位为秒 |
|
||||
| vid | str | 空 | 作用尚不明确 |
|
||||
| weblink | str | 空 | 作用尚不明确 |
|
||||
| dimension | obj | 当前分P分辨率 | |
|
||||
| dimension | obj | 当前分P分辨率 | 有部分视频无法获取分辨率 |
|
||||
|
||||
`pages`数组中的对象中的`dimension`对象(同`data`中的`dimension`对象):
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------ | ---- | ------------ | ------------ |
|
||||
| width | num | 当前分P 宽度 | 可能为0 |
|
||||
| height | num | 当前分P 高度 | 可能为0 |
|
||||
| width | num | 当前分P 宽度 | |
|
||||
| height | num | 当前分P 高度 | |
|
||||
| rotate | num | 0 | 作用尚不明确 |
|
||||
|
||||
`subtitle`对象:
|
||||
@ -208,9 +208,19 @@
|
||||
|
||||
**示例:**
|
||||
|
||||
http://api.bilibili.com/x/web-interface/view?aid=85440373
|
||||
avID方式:
|
||||
|
||||
同http://api.bilibili.com/x/web-interface/view?bvid=BV117411r7R1
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/web-interface/view'\
|
||||
--data-urlencode 'aid=85440373'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/web-interface/view'\
|
||||
--data-urlencode 'bvid=BV117411r7R1'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -353,7 +363,7 @@ http://i0.hdslb.com/bfs/face/5387950a59be8038daaae3f66dfb5a85e20d5737.jpg
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/archive/desc
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -377,9 +387,19 @@ http://i0.hdslb.com/bfs/face/5387950a59be8038daaae3f66dfb5a85e20d5737.jpg
|
||||
|
||||
查看视频~~(教主的咕鸽)~~`av39330059`/`BV1Bt411z799`的简介
|
||||
|
||||
http://api.bilibili.com/x/web-interface/archive/desc?aid=39330059
|
||||
avID方式:
|
||||
|
||||
同http://api.bilibili.com/x/web-interface/archive/desc?bvid=BV1Bt411z799
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/archive/desc'\
|
||||
--data-urlencode 'aid=39330059'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/archive/desc'\
|
||||
--data-urlencode 'bvid=BV1Bt411z799'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -396,7 +416,7 @@ http://api.bilibili.com/x/web-interface/archive/desc?aid=39330059
|
||||
|
||||
> http://api.bilibili.com/x/player/pagelist
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -430,28 +450,38 @@ http://api.bilibili.com/x/web-interface/archive/desc?aid=39330059
|
||||
| --------- | ---- | --------------- | ------------------------------------ |
|
||||
| cid | num | 当前分P CID | |
|
||||
| page | num | 当前分P | |
|
||||
| from | str | 视频来源 | vupload:用户上传<br />hunan:芒果TV |
|
||||
| from | str | 视频来源 | vupload:普通上传<br />hunan:芒果TV |
|
||||
| part | str | 当前分P标题 | |
|
||||
| duration | num | 当前分P持续时间 | 单位为秒 |
|
||||
| vid | str | 空 | 作用尚不明确 |
|
||||
| weblink | str | 空 | 作用尚不明确 |
|
||||
| dimension | obj | 当前分P分辨率 | |
|
||||
| dimension | obj | 当前分P分辨率 | 有部分视频无法获取分辨率 |
|
||||
|
||||
数组`data`中的对象中的`dimension`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------ | ---- | ------------ | ------------ |
|
||||
| width | num | 当前分P 宽度 | 可能为0 |
|
||||
| height | num | 当前分P 高度 | 可能为0 |
|
||||
| width | num | 当前分P 宽度 | |
|
||||
| height | num | 当前分P 高度 | |
|
||||
| rotate | num | 0 | 作用尚不明确 |
|
||||
|
||||
**示例:**
|
||||
|
||||
查询视频`av13502509`/`BV1ex411J7GE`的分P列表
|
||||
|
||||
http://api.bilibili.com/x/player/pagelist?aid=13502509
|
||||
avID方式:
|
||||
|
||||
同http://api.bilibili.com/x/player/pagelist?bvid=BV1ex411J7GE
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/player/pagelist'\
|
||||
--data-urlencode 'aid=13502509'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/player/pagelist'\
|
||||
--data-urlencode 'bvid=BV1ex411J7GE'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -1,16 +1,18 @@
|
||||
# 视频点赞&投币&收藏
|
||||
|
||||
**本页所有操作均需登录(SESSDATA)**
|
||||
**本页所有操作均需登录(Cookie或APP)**
|
||||
|
||||
## 操作
|
||||
|
||||
### 点赞视频
|
||||
### 点赞视频(web端)
|
||||
|
||||
<img src="/imgs/like.svg" width="100" height="100"/>
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/archive/like
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
认证&鉴权方式:仅可Cookie
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -33,11 +35,27 @@
|
||||
|
||||
**示例:**
|
||||
|
||||
为视频av79677524/BV1uJ411r7hL点赞
|
||||
为视频`av79677524`/`BV1uJ411r7hL`点赞
|
||||
|
||||
curl -b "SESSDATA=xxx" -d "aid=79677524&like=1&csrf=xxx" "http://api.bilibili.com/x/web-interface/archive/like"
|
||||
avID方式:
|
||||
|
||||
同curl -b "SESSDATA=xxx" -d "aid=BV1uJ411r7hL&like=1&csrf=xxx" "http://api.bilibili.com/x/web-interface/archive/like"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/web-interface/archive/like'\
|
||||
--data-urlencode 'aid=79677524'\
|
||||
--data-urlencode 'like=1'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/web-interface/archive/like'\
|
||||
--data-urlencode 'bvid=BV1uJ411r7hL'\
|
||||
--data-urlencode 'like=1'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -47,15 +65,15 @@ curl -b "SESSDATA=xxx" -d "aid=79677524&like=1&csrf=xxx" "http://api.bilibili.co
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 投币视频
|
||||
### 投币视频(web端)
|
||||
|
||||
<img src="/imgs/coin.svg" width="100" height="100"/>
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/coin/add
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
认证&鉴权方式:仅可Cookie
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -86,11 +104,29 @@ data 对象:
|
||||
|
||||
**示例:**
|
||||
|
||||
|
||||
|
||||
为视频`av90671873`/`BV1N7411A7wC`投币2枚
|
||||
|
||||
curl -b "SESSDATA=xxx" -d "aid=90671873&select_like=1&multiply=2&csrf=xxx" "http://api.bilibili.com/x/web-interface/coin/add"
|
||||
avID方式:
|
||||
|
||||
同curl -b "SESSDATA=xxx" -d "bvid=BV1N7411A7wC&select_like=1&multiply=2&csrf=xxx" "http://api.bilibili.com/x/web-interface/coin/add"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/web-interface/coin/add'\
|
||||
--data-urlencode 'aid=90671873'\
|
||||
--data-urlencode 'select_like=1'\
|
||||
--data-urlencode 'multiply=2'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/web-interface/coin/add'\
|
||||
--data-urlencode 'bvid=BV1N7411A7wC'\
|
||||
--data-urlencode 'select_like=1'\
|
||||
--data-urlencode 'multiply=2'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -103,27 +139,25 @@ curl -b "SESSDATA=xxx" -d "aid=90671873&select_like=1&multiply=2&csrf=xxx" "http
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 收藏视频(暂不支持bvID)
|
||||
|
||||
<img src="/imgs/fav.svg" width="100" height="100"/>
|
||||
|
||||
> http://api.bilibili.com/medialist/gateway/coll/resource/deal
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要验证`referer`为 `http://www.bilibili.com`或`https://www.bilibili.com`域名下
|
||||
需要验证`referer`为 `.bilibili.com`域名下
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------------- | ---- | ------------------------ | ------ | ----------------------- |
|
||||
| rid | num | 视频avID | 必要 | |
|
||||
| type | num | 必须为2 | 必要 | |
|
||||
| add_media_ids | nums | 需要加入的收藏夹ID | 非必要 | 同时添加多个,用`,`分隔 |
|
||||
| del_media_ids | nums | 需要取消的收藏夹ID | 非必要 | 同时取消多个,用`,`分隔 |
|
||||
| csrf | str | CSRF Token(位于cookie) | 必要 | |
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------------- | ---- | ------------------------ | ------ | ------------------------------ |
|
||||
| rid | num | 视频avID | 必要 | |
|
||||
| type | num | 必须为2 | 必要 | |
|
||||
| add_media_ids | nums | 需要加入的收藏夹ID | 非必要 | 同时添加多个,用`,`(%2C)分隔 |
|
||||
| del_media_ids | nums | 需要取消的收藏夹ID | 非必要 | 同时取消多个,用`,`(%2C)分隔 |
|
||||
| csrf | str | CSRF Token(位于cookie) | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
@ -145,7 +179,16 @@ curl -b "SESSDATA=xxx" -d "aid=90671873&select_like=1&multiply=2&csrf=xxx" "http
|
||||
|
||||
将视频`av49166435`添加到收藏夹`49166435`中
|
||||
|
||||
curl --referer "http://www.bilibili.com" -b "SESSDATA=xxx" -d "rid=90671873&type=2&add_media_ids=49166435&del_media_ids=&csrf=xxx" "http://api.bilibili.com/medialist/gateway/coll/resource/deal"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/medialist/gateway/coll/resource/deal'\
|
||||
--data-urlencode 'rid=90671873'\
|
||||
--data-urlencode 'type=2'\
|
||||
--data-urlencode 'add_media_ids=49166435'\
|
||||
--data-urlencode 'del_media_ids='\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
-e 'https://www.bilibili.com'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -157,15 +200,13 @@ curl --referer "http://www.bilibili.com" -b "SESSDATA=xxx" -d "rid=90671873&type
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 一键三连视频
|
||||
### 一键三连视频(web端)
|
||||
|
||||
<img src="/imgs/like.svg" align="left" width="50" height="50"/><img src="/imgs/coin.svg" align="left" width="50" height="50"/><img src="/imgs/fav.svg" width="50" height="50"/>
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/archive/like/triple
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
同时点赞投币收藏视频,收藏于默认收藏夹中
|
||||
|
||||
@ -190,20 +231,34 @@ curl --referer "http://www.bilibili.com" -b "SESSDATA=xxx" -d "rid=90671873&type
|
||||
|
||||
`data`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| -------- | ---- | ------------ | ------- |
|
||||
| like | bool | 是否点赞成功 | |
|
||||
| coin | bool | 是否投币成功 | |
|
||||
| fav | bool | 是否收藏成功 | |
|
||||
| multiply | num | 投币枚数 | 默认为2 |
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| -------- | ---- | ------------ | --------------------------- |
|
||||
| like | bool | 是否点赞成功 | true:成功<br />false:失败 |
|
||||
| coin | bool | 是否投币成功 | true:成功<br />false:失败 |
|
||||
| fav | bool | 是否收藏成功 | true:成功<br />false:失败 |
|
||||
| multiply | num | 投币枚数 | 默认为2 |
|
||||
|
||||
**示例:**
|
||||
|
||||
将视频`av91003840`/`BV1Wj411f79U`一键三连
|
||||
|
||||
curl -b "SESSDATA=xxx" -d "aid=91003840&csrf=xxx" "http://api.bilibili.com/x/web-interface/archive/like/triple"
|
||||
avID方式:
|
||||
|
||||
同curl -b "SESSDATA=xxx" -d "bvid=BV1Wj411f79U&csrf=xxx" "http://api.bilibili.com/x/web-interface/archive/like/triple"
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/web-interface/archive/like/triple'\
|
||||
--data-urlencode 'aid=91003840'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl 'http://api.bilibili.com/x/web-interface/archive/like/triple'\
|
||||
--data-urlencode 'bvid=BV1Wj411f79U'\
|
||||
--data-urlencode 'csrf=xxx'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -219,71 +274,15 @@ curl -b "SESSDATA=xxx" -d "aid=91003840&csrf=xxx" "http://api.bilibili.com/x/web
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 判断状态
|
||||
|
||||
### 视频是否被收藏
|
||||
|
||||
<img src="/imgs/fav.svg" width="100" height="100"/>
|
||||
|
||||
> http://api.bilibili.com/x/v2/fav/video/favoured
|
||||
|
||||
*方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------ | -------- | ------------------ | ------ | ---- |
|
||||
| aid | num或str | 视频avID或视频bvID | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />-400:请求错误<br />-101:账号未登录 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | 作用尚不明确 |
|
||||
| data | obj | 信息本体 | |
|
||||
|
||||
data 对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| -------- | ---- | -------- | ------------------------------- |
|
||||
| count | num | 1 | 作用尚不明确 |
|
||||
| favoured | bool | 是否收藏 | true:已收藏<br />false:未收藏 |
|
||||
|
||||
**示例:**
|
||||
|
||||
视频`av46281123`/`BV1Bb411H7Dv`的状态为已收藏
|
||||
|
||||
http://api.bilibili.com/x/v2/fav/video/favoured?aid=46281123
|
||||
|
||||
同http://api.bilibili.com/x/v2/fav/video/favoured?aid=BV1Bb411H7Dv
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
"ttl": 1,
|
||||
"data": {
|
||||
"count": 1,
|
||||
"favoured": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 视频是否被点赞
|
||||
|
||||
<img src="/imgs/like.svg" width="100" height="100"/>
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/archive/has/like
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -307,9 +306,21 @@ http://api.bilibili.com/x/v2/fav/video/favoured?aid=46281123
|
||||
|
||||
视频`av39330059`/`BV1Bt411z799`的状态为已点赞
|
||||
|
||||
http://api.bilibili.com/x/web-interface/archive/has/like?aid=39330059
|
||||
avID方式:
|
||||
|
||||
同http://api.bilibili.com/x/web-interface/archive/has/like?bvid=BV1Bt411z799
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/web-interface/archive/has/like'\
|
||||
--data-urlencode 'aid=39330059'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'api.bilibili.com/x/web-interface/archive/has/like'\
|
||||
--data-urlencode 'bvid=BV1Bt411z799'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -320,15 +331,13 @@ http://api.bilibili.com/x/web-interface/archive/has/like?aid=39330059
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 视频是否被投币
|
||||
|
||||
<img src="/imgs/coin.svg" width="100" height="100"/>
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/archive/coins
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -358,9 +367,21 @@ http://api.bilibili.com/x/web-interface/archive/has/like?aid=39330059
|
||||
|
||||
视频`av37896701`/`BV18t411q7zz`的投币数为2枚
|
||||
|
||||
http://api.bilibili.com/x/web-interface/archive/coins?aid=37896701
|
||||
avID方式:
|
||||
|
||||
同http://api.bilibili.com/x/web-interface/archive/coins?bvid=BV18t411q7zz
|
||||
```shell
|
||||
curl -G 'api.bilibili.com/x/web-interface/archive/coins'\
|
||||
--data-urlencode 'aid=37896701'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'api.bilibili.com/x/web-interface/archive/coins'\
|
||||
--data-urlencode 'bvid=BV18t411q7zz'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -373,5 +394,67 @@ http://api.bilibili.com/x/web-interface/archive/coins?aid=37896701
|
||||
}
|
||||
```
|
||||
|
||||
### 视频是否被收藏
|
||||
|
||||
<img src="/imgs/fav.svg" width="100" height="100"/>
|
||||
|
||||
> http://api.bilibili.com/x/v2/fav/video/favoured
|
||||
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------ | -------- | ------------------ | ------ | ---- |
|
||||
| aid | num或str | 视频avID或视频bvID | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功<br />-400:请求错误<br />-101:账号未登录 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | 作用尚不明确 |
|
||||
| data | obj | 信息本体 | |
|
||||
|
||||
data 对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| -------- | ---- | -------- | ------------------------------- |
|
||||
| count | num | 1 | 作用尚不明确 |
|
||||
| favoured | bool | 是否收藏 | true:已收藏<br />false:未收藏 |
|
||||
|
||||
**示例:**
|
||||
|
||||
视频`av46281123`/`BV1Bb411H7Dv`的状态为已收藏
|
||||
|
||||
avID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/v2/fav/video/favoured'\
|
||||
--data-urlencode 'aid=46281123'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/v2/fav/video/favoured'\
|
||||
--data-urlencode 'aid=BV1Bb411H7Dv'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
"ttl": 1,
|
||||
"data": {
|
||||
"count": 1,
|
||||
"favoured": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
> http://api.bilibili.com/pbp/data
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/archive/related
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
最多获取40条推荐视频
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
# 视频观看数据上报
|
||||
|
||||
**本页所有操作均需登录(SESSDATA)**
|
||||
**本页所有操作均需登录(Cookie或APP)**
|
||||
|
||||
## 上报观看进度(暂不支持bvID)
|
||||
## 上报观看进度(APP端)(暂不支持bvID)
|
||||
|
||||
> http://api.bilibili.com/x/v2/history/report
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -47,7 +47,7 @@ curl -b "SESSDATA=xxx" -d "aid=13662970&cid=126654047&progress=1248&csrf=xxx" "h
|
||||
|
||||
> http://api.bilibili.com/x/click-interface/web/heartbeat
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
默认间隔15秒一次
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
## 获取视频快照1(用于进度条预览)
|
||||
> http://api.bilibili.com/x/player/videoshot
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -89,7 +89,7 @@ http://api.bilibili.com/x/player/videoshot?aid=26273789&index=1
|
||||
|
||||
> http://api.bilibili.com/pvideo
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
内容与「获取视频快照1」加参数「index」=1相同,但url带有转义,仅限第1P
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
# 视频状态数
|
||||
|
||||
## 视频状态数1(备用 不封python 暂不支持bvID)
|
||||
## 视频状态数1(仅avID)
|
||||
> http://api.bilibili.com/archive_stat/stat
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -44,7 +44,12 @@
|
||||
|
||||
查询视频`av91572143`的状态数
|
||||
|
||||
http://api.bilibili.com/archive_stat/stat?aid=91572143
|
||||
avID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/archive_stat/stat'\
|
||||
--data-urlencode 'aid=91572143'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -71,17 +76,13 @@ http://api.bilibili.com/archive_stat/stat?aid=91572143
|
||||
|
||||
|
||||
|
||||
## 视频状态数2(常用 封杀python)
|
||||
## 视频状态数2(禁python)
|
||||
|
||||
> http://api.bilibili.com/x/web-interface/archive/stat
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**此API克python,UA中只要存在\*python\*字眼就无法获取正确内容,如用py请改UA**
|
||||
|
||||
**此API克python,UA中只要存在\*python\*字眼就无法获取正确内容,如用py请改UA**
|
||||
|
||||
**此API克python,UA中只要存在\*python\*字眼就无法获取正确内容,如用py请改UA**
|
||||
此接口请求头中UA值存在`python`字串,会返回-412错误
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -94,12 +95,12 @@ http://api.bilibili.com/archive_stat/stat?aid=91572143
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ----------------------------------------------- |
|
||||
| code | num | 返回值 | 0:成功 <br />-400:请求错误<br />40003:无视频 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | 作用尚不明确 |
|
||||
| data | obj | 信息本体 | |
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
||||
| code | num | 返回值 | 0:成功 <br />-400:请求错误<br />-412:请求被拦截<br />40003:无视频 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| ttl | num | 1 | 作用尚不明确 |
|
||||
| data | obj | 信息本体 | |
|
||||
|
||||
`data`对象:
|
||||
|
||||
@ -126,9 +127,19 @@ http://api.bilibili.com/archive_stat/stat?aid=91572143
|
||||
|
||||
查询视频`av2271112`/`BV1es411D7sW`的状态数
|
||||
|
||||
http://api.bilibili.com/x/web-interface/archive/stat?aid=2271112
|
||||
avID方式:
|
||||
|
||||
同http://api.bilibili.com/x/web-interface/archive/stat?bvid=BV1es411D7sW
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/web-interface/archive/stat'\
|
||||
--data-urlencode 'aid=2271112'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/web-interface/archive/stat'\
|
||||
--data-urlencode 'bvid=BV1es411D7sW'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -155,5 +166,20 @@ http://api.bilibili.com/x/web-interface/archive/stat?aid=2271112
|
||||
}
|
||||
```
|
||||
|
||||
当UA为`2333python2333`时,则无法访问此接口:
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/web-interface/archive/stat'\
|
||||
--data-urlencode 'aid=2271112'\
|
||||
-A '2333python2333'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"code":-412,
|
||||
"message":"请求被拦截",
|
||||
"ttl":1,
|
||||
"data":null
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
> http://https://api.bilibili.com/x/tag/archive/tags
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
**url参数:**
|
||||
|
||||
@ -189,7 +189,7 @@ http://api.bilibili.com/x/tag/archive/tags?aid=89772773
|
||||
|
||||
> http://api.bilibili.com/x/tag/archive/like2
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
@ -233,7 +233,7 @@ curl -b "SESSDATA=xxx" -d "csrf=xxx&aid=89772773&tag_id=12620189" "http://api.bi
|
||||
|
||||
> http://api.bilibili.com/x/tag/archive/hate2
|
||||
|
||||
*方式:POST*
|
||||
*请求方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
> http://api.bilibili.com/x/player/playurl
|
||||
|
||||
*方式:GET*
|
||||
*请求方式:GET*
|
||||
|
||||
获取会员专属视频及720P以上清晰度视频时需要登录(SESSDATA)
|
||||
|
||||
@ -114,13 +114,29 @@
|
||||
|
||||
**示例:**
|
||||
|
||||
**视频无分段时**
|
||||
**视频无分段时:**
|
||||
|
||||
获取视频`av99999999`/`BV1y7411Q7Eq`中的1P(CID=`171776208`)的视频流url,清晰度为1080P+
|
||||
|
||||
http://api.bilibili.com/x/player/playurl?avid=99999999&cid=171776208&qn=112
|
||||
avID方式:
|
||||
|
||||
同http://api.bilibili.com/x/player/playurl?bvid=BV1y7411Q7Eq&cid=171776208&qn=112
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/player/playurl'\
|
||||
--data-urlencode 'avid=99999999'\
|
||||
--data-urlencode 'cid=171776208'\
|
||||
--data-urlencode 'qn=112'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
bvID方式:
|
||||
|
||||
```shell
|
||||
curl -G 'http://api.bilibili.com/x/player/playurl'\
|
||||
--data-urlencode 'bvid=BV1y7411Q7Eq'\
|
||||
--data-urlencode 'cid=171776208'\
|
||||
--data-urlencode 'qn=112'\
|
||||
-b 'SESSDATA=xxx'
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
@ -169,13 +185,7 @@
|
||||
}
|
||||
```
|
||||
|
||||
**视频有分段时**
|
||||
|
||||
获取视频`av138284`/`BV1Tx411w7PX`中的2P(CID=`872498`)的视频流url,清晰度为1080P
|
||||
|
||||
http://api.bilibili.com/x/player/playurl?avid=138284&cid=872498&qn=80
|
||||
|
||||
同http://api.bilibili.com/x/player/playurl?bvid=BV1Tx411w7PX&cid=872498&qn=80
|
||||
**视频有分段时:**
|
||||
|
||||
```json
|
||||
{
|
||||
@ -265,6 +275,10 @@
|
||||
|
||||
**以上述视频url为例:**
|
||||
|
||||
wget --referer "http://www.bilibili.com" "http://upos-sz-mirrorhw.bilivideo.com/upgcxcode/08/62/171776208/171776208-1-112.flv?e=ig8euxZM2rNcNbhMnwhVhwdlhzK3hzdVhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1589565412&gen=playurl&os=hwbv&oi=606631998&trid=e0fa5f9a7610440a871279a28fae85aau&platform=pc&upsig=5f469cb4c190ed54b89bd40cc37eddff&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,platform&mid=293793435&logo=80000000" -O video.flv
|
||||
```shell
|
||||
wget 'http://upos-sz-mirrorhw.bilivideo.com/upgcxcode/08/62/171776208/171776208-1-112.flv?e=ig8euxZM2rNcNbhMnwhVhwdlhzK3hzdVhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1589565412&gen=playurl&os=hwbv&oi=606631998&trid=e0fa5f9a7610440a871279a28fae85aau&platform=pc&upsig=5f469cb4c190ed54b89bd40cc37eddff&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,platform&mid=293793435&logo=80000000'\
|
||||
-e 'https://www.bilibili.com'\
|
||||
-O 'Download_video.flv'
|
||||
```
|
||||
|
||||
回复正文将返回一个flv文件的数据
|
||||
响应正文将返回一个flv文件
|
Loading…
Reference in New Issue
Block a user