npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

koishi-plugin-paserbili

v1.4.0

Published

哔哩哔哩登录和API调用插件,支持二维码登录和Cookie管理

Downloads

193

Readme

Koishi Bilitester Plugin

一个用于 Koishi 的哔哩哔哩登录和 API 调用插件,支持二维码登录和 Cookie 管理。

功能特性

  • 二维码登录:通过扫描二维码登录哔哩哔哩账号
  • Cookie 管理:自动存储和管理登录 Cookie
  • 账号信息查询:查看当前登录账号的详细信息
  • 视频信息查询:获取哔哩哔哩视频的详细信息
  • 视频搜索:搜索哔哩哔哩视频
  • 动态查询:获取用户的最新动态
  • 直播间信息:获取直播间状态和信息
  • 账号信息刷新:更新缓存的账号信息

安装

在 Koishi 项目的根目录下执行:

npm install koishi-plugin-bilitester

配置

在 Koishi 的配置文件中添加插件:

plugins:
  bilibili:
    # 轮询扫码状态的时间间隔(毫秒),默认 2000
    pollInterval: 2000
    # 二维码超时时间(秒),默认 180
    qrCodeTimeout: 180

使用方法

登录哔哩哔哩

bilibili login

执行后会返回一个二维码,使用哔哩哔哩 APP 扫描二维码即可登录。

查看账号信息

bilibili info

显示当前登录账号的详细信息,包括用户名、UID、等级、硬币、大会员状态等。

刷新账号信息

bilitester refresh

更新缓存的账号信息。

退出登录

bilitester logout

清除本地存储的登录信息。

查询视频信息

bilitester video <BV号>

例如:bilitester video BV1xx411c7mD

搜索视频

bilitester search <关键词>

例如:bilitester search 动画

查询动态

bilibili dynamic

获取当前登录账号的最新 5 条动态。

查询直播间信息

bilitester live <房间号>

例如:bilitester live 6

数据存储

插件使用 Koishi 的数据库存储账号信息,包括:

  • Cookie 信息(SESSDATA、bili_jct、DedeUserID、DedeUserID__ckMd5)
  • 用户基本信息(UID、用户名、头像)
  • 会员信息(会员状态、会员类型、到期时间)
  • 等级和硬币信息

注意事项

  1. Cookie 会过期,如果遇到登录失效的情况,请重新登录
  2. 插件会根据用户的 QQ 号(或频道 ID)分别存储账号信息
  3. 二维码有效期为 180 秒,超时需要重新获取
  4. 建议定期刷新账号信息以保持数据最新

开发

# 安装依赖
npm install

# 编译
npm run build

# 监听模式
npm run watch

许可证

MIT