A modern library for receiving danmu from bilibili livestream
Project description
bili-danmu
A modern library for receiving danmu from bilibili livestream, with full asynchronous support.
NOTICE: It's a simple implement, so IT DOES NOT INCLUDE PARSEING DANMU FEATURES. You need to parse the danmu dict mannually.
Installation
Just execute pip install bili-danmu
Example
import asyncio
from danmu import DanmuClient
loop = asyncio.new_event_loop()
dmc = DanmuClient(25512465)
@dmc.on_danmu
async def on_danmu(room_id: int, danmu: dict):
print(danmu)
dmc.run(loop)
loop.run_forever()
Special Thanks
This project refers to some other projects. Sincerely appreciate their developers.
-
Code4Epoch/Bolaris Give me the infomation of v3 protocol
-
qydysky/bili_danmu A full list of CMD in danmu pack's body
-
littlecodersh/danmu A very old danmu library. Inspire me to use callback design
-
yjqiang/danmu Main reference
-
yangjunlong/barrager.js A protocol document and code implement
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for bili_danmu-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0a7abb452ad1bef6b18260633c62b65f83ab6f8e5470c6f62a2ea5683583a21 |
|
MD5 | c31b9fbfcc7d8a20341a6e323699502b |
|
BLAKE2b-256 | 6e1993c7b4d6197a3c56f857772bc3323d3958325a12eb0c9a459f30a21ad5b0 |