项目作者: IsoaSFlus

项目描述 :
A python module for fetching danmaku.
高级语言: Python
项目地址: git://github.com/IsoaSFlus/danmaku.git
创建时间: 2020-01-02T04:32:14Z
项目社区:https://github.com/IsoaSFlus/danmaku

开源协议:GNU General Public License v2.0

下载


danmaku

一个基于aiohttp的直播网站弹幕库(WIP)

目前支持斗鱼、虎牙、B站

感谢danmu

用法

  1. import asyncio
  2. import danmaku
  3. async def printer(q):
  4. while True:
  5. m = await q.get()
  6. print(m)
  7. async def main():
  8. q = asyncio.Queue()
  9. dmc = danmaku.DanmakuClient('https://douyu.com/9999', q)
  10. asyncio.create_task(printer(q))
  11. await dmc.start()
  12. asyncio.run(main())