Skip to main content

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 也进行相应变动。

Metadata

Release files for danmu-abc 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for danmu-abc 0.1.5
File Size Uploaded
danmu_abc-0.1.5.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for danmu-abc 0.1.5
File Interpreter ABI Platform
danmu_abc-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / danmu_abc-0.1.5.tar.gz

Download URL danmu_abc-0.1.5.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
57e489d7b55f238e2c0b2ddf4167ea2d6a20072402901469bcf0feaa5cf7f14a
BLAKE2b-256 checksum
How to use checksums
b202a4ac238154f0dd17f7fa0266b8781f4db1dcf938b9a10e83c6aa6d30ee3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

Release files / danmu_abc-0.1.5-py3-none-any.whl

Download URL danmu_abc-0.1.5-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
359c5eda0c92bfc437342be84a19d3129994c409fcd36978b0d032cb92e943ae
BLAKE2b-256 checksum
How to use checksums
17ed154b9c82b9fde89771b036a75e24d57874bfec4a0ec2cf0b3a0825ae19c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page