bilibili-live-danmaku-api
v1.1.0
Published
Send Danmaku to Bilibili Live Room
Downloads
25
Readme
bilibili live danmaku api
Install
npm install bilibili-live-danmaku-api -S
Usage
As a package
You need some cookies of the logined user.
const send = require('bilibili-live-danmaku-api')
const msg = /* Message */
const roomid = /* Roomid */
const SESSDATA = /* Cookie: SESSDATA */
const csrf = /* Cookie: bili_jct */
// const extra = {} /* (optional) Extra data append to POST body */
send({
msg,
roomid,
SESSDATA,
csrf
// extra
})
Return: Promise<undefined>
Error handling
If the process is not successful, send() will reject.
Fork/stdio (use with other program)
Please use submodule
or other ways to clone the repo, install Node.js environment.
Install npm packge got
npm install got -g
And fork file stdio.js
with node, use stdin to send danmakus.
stdin format for each line: SESSDATA bili_jct roomid message
, a space in between.
If the process is not successful, error message will be printed to stderr.
License
MIT