Skip to main content

BiliChat Request

一个用于获取哔哩哔哩内容的 API 服务,支持视频、动态、专栏等内容的截图渲染,以及账户管理、订阅监控等功能。

Python 3.10+ Docker

✨ 主要功能

  • 🖼️ 内容截图: 视频、动态、专栏内容的自动截图生成
  • 👤 账户管理: 支持多账户管理,自动cookie同步
  • 📡 订阅监控: 直播状态监控、用户动态获取
  • 🔗 链接处理: B23短链接生成和解析
  • 🛠️ RESTful API: 完整的API接口,易于集成
  • 🐳 Docker支持: 一键部署,开箱即用

🚀 快速开始

使用 Docker 运行(推荐)

# 使用 Docker Compose
docker-compose up -d

# 或使用 Docker 命令
docker run -d \
  --name bilichat-request \
  -p 40432:40432 \
  -v $(pwd)/config.yaml:/app/config.yaml \
  -v $(pwd)/data:/app/data \
  well404/bilichat-request:latest

使用 pip 安装

# 安装 pipx(推荐)
pip install pipx
pipx install bilichat-request

# 或直接使用 pip
pip install bilichat-request

# 启动服务
bilirq

服务启动后,访问 http://localhost:40432 即可使用API。

📚 API 文档

模块 描述 链接
📋 API 概述 API 基础信息和认证说明 docs/api-overview.md
👤 账户管理 Web账户的增删查管理 docs/account.md
🖼️ 内容服务 视频、动态、专栏截图服务 docs/content.md
📡 订阅服务 直播监控和动态获取 docs/subs.md
🔧 工具服务 B23链接处理和UP主搜索 docs/tools.md
💻 系统接口 版本信息和健康检查 docs/system.md

🔧 快速配置

创建 config.yaml 文件进行基本配置:

# API 访问控制
api_access_token: "your_secure_token"

# CookieCloud 同步(可选)
cookie_clouds:
  - url: "https://your-cookiecloud.com"
    uuid: "your-uuid"
    password: "your-password"

# 日志等级
log_level: "INFO"

更多配置选项请参考 配置文档。

📖 API 使用示例

# 获取视频截图
curl -X GET "http://localhost:40432/bilichatapi/content/video?video_id=BV1xx411c7mu" \
  -H "Authorization: Bearer your_token"

# 获取用户动态
curl -X GET "http://localhost:40432/bilichatapi/subs/dynamic?uid=123456" \
  -H "Authorization: Bearer your_token"

# 搜索UP主
curl -X GET "http://localhost:40432/bilichatapi/tools/search_up?keyword=测试" \
  -H "Authorization: Bearer your_token"

完整API文档请查看 API文档。

⚠️ 重要提示

  • 长时间运行可能遇到浏览器崩溃、网络故障等问题,建议定时重启服务
  • 生产环境请务必配置访问令牌(api_access_token)
  • 确保有足够的系统资源用于浏览器渲染

🔗 相关链接

Metadata

Release files for bilichat-request 0.5.12

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

Source distribution (sdist)

Source distribution for bilichat-request 0.5.12
File Size Uploaded
bilichat_request-0.5.12.tar.gz 145.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bilichat-request 0.5.12
File Interpreter ABI Platform
bilichat_request-0.5.12-py3-none-any.whl Python 3 none any Details

Total release size: 303.5 kB

Release files / bilichat_request-0.5.12.tar.gz

Download URL bilichat_request-0.5.12.tar.gz
Size 145.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b629bdd067c7ca15bc55345efe90ffe40e696ce8af43abd17002979b08c79be0
BLAKE2b-256 checksum
How to use checksums
580538c416c1a16d2f9e6642aeb755c101c9d6cecc88552c516612af0782b0b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / bilichat_request-0.5.12-py3-none-any.whl

Download URL bilichat_request-0.5.12-py3-none-any.whl
Size 158.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28449f4abf786b300da1ea06c5d6a523c3ff3e32f159bf13cfbf1fe61fec0c6e
BLAKE2b-256 checksum
How to use checksums
6d3dc2360928785d522de6732d1e5addd3b1e690e6d79f8762245543a26e9e6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.5.12 This release

2 release files

0.5.11

2 release files

0.5.10

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

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