bilibili-live-danmaku-api

1.1.0 • Public • Published

bilibili live danmaku api npm

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

Readme

Keywords

Package Sidebar

Install

npm i bilibili-live-danmaku-api

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

3.82 kB

Total Files

6

Last publish

Collaborators

  • simon3000