GithubHelp home page GithubHelp logo

4t145 / bilive-danmaku Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 3.0 113 KB

b站直播api,将bilibili直播间的wss连接转化成事件(弹幕,礼物,sc之类),多runtime

License: Apache License 2.0

Rust 99.31% PowerShell 0.35% Shell 0.35%
bilibili bilibili-api bilibili-live rudanmaku rust tokio typescript wasm

bilive-danmaku's Introduction

bilive-danmaku's People

Contributors

4t145 avatar are-sky avatar shiqimei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bilive-danmaku's Issues

WS连接时报错

运行example/using-tokio
输入房间号之后打印错误日志后退出

git rev="dcca737d"
cargo 1.75.0-nightly (6fa6fdc76 2023-10-10)

     Running `target\debug\examples\using-tokio.exe`
请输入房间号:
106
[2023-10-27T02:06:39Z WARN  bilive_danmaku::connector] connect error: WsError(Protocol(InvalidHeader("sec-websocket-key")))
[2023-10-27T02:06:39Z WARN  bilive_danmaku::connector] connect error: WsError(Protocol(InvalidHeader("sec-websocket-key")))
[2023-10-27T02:06:39Z WARN  bilive_danmaku::connector] connect error: WsError(Protocol(InvalidHeader("sec-websocket-key")))
[2023-10-27T02:06:39Z WARN  bilive_danmaku::connector] connect error: WsError(Protocol(InvalidHeader("sec-websocket-key")))
[2023-10-27T02:06:39Z ERROR bilive_danmaku::connector] connect error: all host failed
thread 'main' panicked at examples\using-tokio\main.rs:27:48:
called `Result::unwrap()` on an `Err` value: HandshakeError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\examples\using-tokio.exe` (exit code: 101)

Json数据部分不可见

在按样例中运行后,DanmukuEvent的Json数据中user字段为
"user":{"uid":0,"uname":"故***","face":null}
这是否正常?
以下是完整的控制台打印:
{ "cmd": "DanmakuEvent", "data": { "flag": 0, "message": { "tag": "Plain", "data": { "message": "要破产啦(" } }, "user": { "uid": 0, "uname": "弦***", "face": null }, "fans_medal": { "anchor_roomid": 22389206, "guard_level": 0, "medal_level": 3, "medal_name": "自麂人" } }, "timestamp": 1689085901635 }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.