Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/THMonster/danmaku
A python module for fetching danmaku.
https://github.com/THMonster/danmaku
bilibili danmaku douyu huya
Last synced: 14 days ago
JSON representation
A python module for fetching danmaku.
- Host: GitHub
- URL: https://github.com/THMonster/danmaku
- Owner: THMonster
- License: gpl-2.0
- Archived: true
- Created: 2020-01-02T04:32:14.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-11T01:16:55.000Z (over 3 years ago)
- Last Synced: 2024-07-05T01:59:34.693Z (4 months ago)
- Topics: bilibili, danmaku, douyu, huya
- Language: Python
- Homepage:
- Size: 99.6 KB
- Stars: 93
- Watchers: 6
- Forks: 25
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# danmaku
一个基于aiohttp的直播网站弹幕库(WIP)目前支持斗鱼、虎牙、B站
感谢[danmu](https://github.com/littlecodersh/danmu)
## 用法
```python3
import asyncio
import danmakuasync def printer(q):
while True:
m = await q.get()
print(m)async def main():
q = asyncio.Queue()
dmc = danmaku.DanmakuClient('https://douyu.com/9999', q)
asyncio.create_task(printer(q))
await dmc.start()asyncio.run(main())
```