Coder Social home page Coder Social logo

danmu's Introduction

danmu-abc

获取哔哩哔哩直播斗鱼直播虎牙直播以及 个人项目 YjMonitor 自定义的弹幕推送,详细可见 examples 部分。可选用 websocket 协议与 tcp 协议,其中 websocket 协议使用了 aiohttp 的 api。

接口:

  1. run_forever 是程序核心,使用一个 while 循环实现掉线的自动重连(掉线后,close 掉现在的连接,重开一个新的)。每次的连接分三步,建立并 OAUTH(即 _one_hello)心跳接受部分启动并永久执行直到异常或主动关闭、异常或主动关闭后的清理工作。清理完后,重新开启新的连接。
  2. close_and_clean 用于永久地关闭连接。
  3. pause 用于暂停连接,暂停后,连接是断开的。直到 resume 唤醒。

版权问题:

  1. 本代码 fork 自 blivedm,由于与原作者一些观点不同,并未走向一致,后由于一些原因,在于原作者协商后切断 fork 关系。LICENSE 也进行相应变动。

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.