sibogentleman / vtbs.moe

Virtual YouTubers in bilibili

Home Page:https://vtbs.moe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vtbs.moe

VTBs on bilibili - B站虚拟主播统计网站


你好呀→_→

欢迎来到 https://vtbs.moe 的 Github 项目主页

前后端包括数据库都在这个 repository

介绍

这是我自娱自乐做出来的 Bilibili 虚拟主播状态记录页面 vtbs.moe

demo

网站用到的部分开源软件:

Open API

vtbs.moe does provide some public APIs. Please do not abuse.

V1 (JSON)

​ 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:

  • => 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
    }
  • => 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
      • 总督
      • 提督
      • 舰长
  • => 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: 舰长

  • => Number, Number

    Timestamp, when guards list updated.

    Example: https://api.vtbs.moe/v1/guard/time

    1560050332931

V2 (JSON)

​ Simple JSON API with Bulk Historical Data.

vdSocket

​ Live danmaku integrated WebSocket.

​ Use Socket.io connect to https://api.vtbs.moe/vds

​ Document: https://github.com/dd-center/vtuber-danmaku#socketio

  • Subscribe (join)

    socket.emit('join', roomid)
    // or join all:
    socket.emit('join', 'all')
  • Unsubscribe (leave)

    socket.emit('leave', roomid)
    /// or leave all:
    socket.emit('leave', 'all')
  • Danmaku

    socket.on('danmaku')
    // {message: "233", roomid: 12235923, mid: 3499295}

endpoint

​ Endpoint, used for shields.io endpoint

vtbs.moe api (Socket.IO)

Advanced interface, please reference the source code available on GitHub.

DD@Home

Websocket connection to https://cluster.vtbs.moe

Pull task:

Send String: DDhttp for more http task.

Task distribution:

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"
  }
}

Complete Task:

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.

DD Center org, Some internal relationship.

详情: https://dd-center.github.io

dependency

开发

安装依赖:

npm install

前端

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Customize configuration

See Configuration Reference.

后端API

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 →_→

About

Virtual YouTubers in bilibili

https://vtbs.moe

License:MIT License


Languages

Language:Vue 58.0%Language:JavaScript 41.5%Language:HTML 0.4%