你好呀→_→
欢迎来到 https://vtbs.moe 的 Github 项目主页
前后端包括数据库都在这个 repository
这是我自娱自乐做出来的 Bilibili 虚拟主播状态记录页面 vtbs.moe
网站用到的部分开源软件:
- 前端
- 后端
vtbs.moe does provide some public APIs. Please do not abuse.
Simple JSON API.
-
=> Array,
[...{mid, note}]
Return list of vtbs, without any further information.
Example: https://api.vtbs.moe/v1/vtbs
[{ "mid": 1576121, "note": ["Paryi", "p妈"] }, { "mid": 372984197, "note": ["Shiori", "大姐"] }, { "mid": 349991143, "note": ["Kagura Mea", "咩咩", "田中庄司", "屑女仆", "tekoki", "手冲", "口区"] }, { "mid": 8119834, "note": ["Hana"] }, ... ]
Keys:
-
mid: Number
The numbered user ID, appeared after https://space.bilibili.com/.
-
note: Array
Just some Note...
-
-
=> Array,
[...{mid, uname, …}]
Return records of all vtbs.
Example: https://api.vtbs.moe/v1/info
[{ "mid": 1576121, "uname": "帕里_Paryi", "video": 55, "roomid": 4895312, "sign": "我是paryipro的画师paryi~中国朋友们好~请大家关注我~paryi审核群:439902287", "notice": "", "face": "http://i2.hdslb.com/bfs/face/0f1f65edca3d354a974edb7a6bec01646bcfa4db.jpg", "rise": 1302, "topPhoto": "http://i0.hdslb.com/bfs/space/81a39f45e49364646274f6e6d4f406d18fdb6afd.png", "archiveView": 2691646, "follower": 94667, "liveStatus": 0, "recordNum": 958, "guardNum": 22, "liveNum": 1100, "lastLive": { "online": 121883, "time": 1560088457424 }, "averageLive": 42276996.14747928, "weekLive": 45900000, "guardChange": 270, "guardType": [0, 0, 22], "areaRank": 1000, "online": 0, "title": "b限定】明日方舟", "time": 1560102857468 } ... ]
-
=> Object,
{mid, uname, …}
Return record of certain vtb based on given mid.
Example: https://api.vtbs.moe/v1/detail/349991143
{ "mid": 349991143, "uname": "神楽めあOfficial", "video": 188, "roomid": 12235923, "sign": "这里是神楽めあ(KaguraMea)!来自日本的清楚系虚拟YouTuber~weibo:@kaguramea ", "notice": "", "face": "http://i2.hdslb.com/bfs/face/49e143e1cae7f9e51b36c6c670976a95cc41ce12.jpg", "rise": 998, "topPhoto": "http://i0.hdslb.com/bfs/space/cde2a0fe3273ae4466d135541d965e21c58a7454.png", "archiveView": 21543188, "follower": 366159, "liveStatus": 0, "recordNum": 1268, "guardNum": 970, "liveNum": 559, "lastLive": { "online": 354234, "time": 1558976168120 }, "averageLive": 21271218.38426421, "weekLive": 0, "guardChange": 953, "guardType": [1, 15, 960], "areaRank": 2, "online": 0, "title": "【B限】MeAqua 協力お料理!!!!", "time": 1560103157470 }
-
All Guards https://api.vtbs.moe/v1/guard/all
=> Object,
{...[mid]: {uname, face, …}}
Return all the Guards.
Example: https://api.vtbs.moe/v1/guard/all
{ "119": { "uname": "狂气的芙兰", "face": "https://i0.hdslb.com/bfs/face/12020cb3bfc0dc7f2a2c47007b204b9559d492f0.jpg", "mid": 119, "dd": [ [], [], [349991143] ] }, "436": { "uname": "海星参上", "face": "https://i0.hdslb.com/bfs/face/a72b138ecd138f230ebe546bcc129ddac5f49c05.gif", "mid": 436, "dd": [ [], [], [349991143, 380829248, 375504219] ] }, ... }
Keys:
- dd: Array
- 总督
- 提督
- 舰长
- dd: Array
-
Some Guards https://api.vtbs.moe/v1/guard/some
=> Object,
{...[mid]: {uname, face, …}}
Return some of the Guards, who is at least「提督」or DD.
Example: https://api.vtbs.moe/v1/guard/some
Same as the one above.
-
=> Array,
[{mid, uname, ...}]
Return the Guards of certain vtb based on given mid.
Example: https://api.vtbs.moe/v1/guard/1576121
[{ "mid": 110129, "uname": "朔海鸣音", "face": "https://i0.hdslb.com/bfs/face/862b9d84e0210c2c0c5b155bd95fb69d4c5c9cfa.jpg", "level": 2 }, { "mid": 110232, "uname": "星野悠馬", "face": "https://i1.hdslb.com/bfs/face/5254186bdee6000da9ccae8c23f699abdb11ebcb.jpg", "level": 2 }, ... ]
Keys:
-
level: Number
0
: 总督1
: 提督2
: 舰长
-
-
Guards update time https://api.vtbs.moe/v1/guard/time
=> Number,
Number
Timestamp, when guards list updated.
Example: https://api.vtbs.moe/v1/guard/time
1560050332931
Simple JSON API with Bulk Historical Data.
-
=> Array,
[...{archiveView, follower, time}]
History of video views and follower counts.
Example: https://api.vtbs.moe/v2/bulkActive/349991143
[{ "archiveView": 16222668, "follower": 298364, "time": 1555247781729 }, { "archiveView": 16222668, "follower": 298942, "time": 1555276084544 }, ... ]
Keys:
-
archiveView: Number
Video views
-
follower: Number
Followers
-
time: Number
Timestamp
-
-
Some active https://api.vtbs.moe/v2/bulkActiveSome/:mid
=> Array,
[...{archiveView, follower, time}]
History of video views and follower count;
Same as above, but limited to recent
512
entries.
Live danmaku integrated WebSocket.
Use Socket.io connect to https://api.vtbs.moe/vds
Document: https://github.com/dd-center/vtuber-danmaku#socketio
-
socket.emit('join', roomid) // or join all: socket.emit('join', 'all')
-
socket.emit('leave', roomid) /// or leave all: socket.emit('leave', 'all')
-
socket.on('danmaku') // {message: "233", roomid: 12235923, mid: 3499295}
Endpoint, used for shields.io
endpoint
- Number of vtubers https://api.vtbs.moe/endpoint/vtbs
- Number of guards https://api.vtbs.moe/endpoint/guardNum
- Streaming now https://api.vtbs.moe/endpoint/live
- Total online https://api.vtbs.moe/endpoint/onlineSum
Advanced interface, please reference the source code available on GitHub.
Websocket connection to https://cluster.vtbs.moe
Send String: DDhttp
for more http task.
Recive: (json, http task)
{
"key": "SomeRandomString", // exmaple: "0.28634934784"
"data": {
"type": "http",
"url": "some bilibili url" // example: "https://api.bilibili.com/x/space/acc/info?mid=349991143"
}
}
Send: (json)
{
"key": "SomeRandomString",
"data": "hereIsResult" // example: "{"code":0,"message":"0","ttl":1,"data":{"mid":349991143,"name":"神楽Mea_Official","sex":"女","face":"http://i1.hdslb.com/bfs/face/4b951570bf09e0ca7fad2a0ae2b1cad3a7a9006b.jpg","sign":"你的人生前路未免太过灰暗了吧?","rank":10000,"level":6,"jointime":0,"moral":0,"silence":0,"birthday":"08-02","coins":0,"fans_badge":true,"official":{"role":1,"title":"bilibili 知名UP主","desc":""},"vip":{"type":2,"status":1,"theme_type":0},"is_followed":false,"top_photo":"http://i0.hdslb.com/bfs/space/cde2a0fe3273ae4466d135541d965e21c58a7454.png","theme":{},"sys_notice":{}}}"
}
Make sure the key is same for each task.
详情: https://dd-center.github.io
安装依赖:
npm install
npm run serve
npm run build
node index
- Socket 服务端口:
8001
- Vtuber/Vup 列表 见 api/vtbs.js
-
检查
vtbs.js
列表有没有重复的指令:npm run repeat
-
把数据库导出为 json 文件:
node script/db2json
想要加什么大功能可以先发 issue 讨论讨论,其他的比如vtb列表补全,修BUG什么的可以直接 Pull request
有什么问题可以开 issue
聊天也可以开 issue →_→