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-baidu-search

v1.2.2

Published

百度网盘资源搜索插件 - 支持电影电视剧(API搜索)和广播剧(爬虫搜索)

Readme

koishi-plugin-baidu-search

电影电视剧百度网盘资源搜索插件。

功能特性

  • 🔍 自定义搜索API:已配置两个api
  • 🔄 备用API自动切换:主API失败时自动使用备用API
  • 链接有效性验证:自动过滤失效的分享链接
  • 📄 分页浏览:支持上一页/下一页浏览搜索结果
  • 🔁 自动重试:网络异常时自动重试,提高成功率
  • 📊 详细日志:记录所有操作,方便调试

安装

方法一:本地插件(推荐)

  1. baidu-search 文件夹放到 Koishi 的 external 目录
  2. 在 Koishi 根目录执行 yarn install
  3. 在控制台启用插件

方法二:npm 安装

yarn add koishi-plugin-baidu-search
# 或
npm install koishi-plugin-baidu-search

配置说明

都已在代码里配置好,安装即用

| 配置项 | 默认值 | 说明 | |--------|--------|------| | watchGroups | [] | 监控的群号列表,留空监控所有群 | | limit | 10 | 每次搜索返回的最大结果数 | | sessionTimeout | 120 | 搜索会话超时时间(秒) | | saveTimeout | 180 | 转存超时时间(秒) |

使用方法

基本搜索

在群聊中发送:

搜百度 流浪地球

插件会返回搜索结果列表,回复数字编号即可转存。

翻页浏览

下一页
上一页

工作流程

  1. 用户发送搜索指令
  2. 调用主搜索API(失败则尝试备用API)
  3. 验证链接有效性,过滤失效链接
  4. 返回有效结果列表
  5. 用户选择编号
  6. 转存到百度网盘 /机器人 目录
  7. 创建新分享链接(提取码:6666)
  8. 发送链接给用户

日志说明

插件会记录详细的操作日志:

  • [INFO] 正常操作信息
  • [WARN] 警告信息(如重试)
  • [ERROR] 错误信息
  • [DEBUG] 调试信息(需开启调试模式)

查看日志可以了解:

  • 搜索到的资源及链接
  • 链接验证结果
  • 转存过程

开发

编译

yarn build
# 或
npm run build

打包

npm pack

调试

在 Koishi 配置中启用调试模式,可以看到更详细的日志。

许可证

MIT

更新日志

v1.0.0

  • 初始版本
  • 支持百度网盘资源搜索和转存
  • 自动链接验证
  • 分页浏览功能

功能更新说明

  • 新增:搜索日志与统计报表(日报 / 周报 / 月报)功能。
  • 搜索日志包含:关键词、用户 ID、群号、结果数;日志文件保存在 data/logs/ 目录,便于审计与统计。
  • 开启报表推送需启用 Koishi 的 cron 插件,并在插件配置中设置:
    • enableDailyReport:是否开启每日推送(布尔)。
    • reportTime:每日推送时间,格式 HH:mm(例如 23:55)。
    • adminIds:接收私聊报告的管理员 ID 列表(字符串数组)。
  • 周报与月报会在同一时间点自动推送(周报默认每周一;月报在当月最后一天)。
  • 快速验证:将 reportTime 设置为当前时间后的 2 分钟,并将你的用户 ID 填入 adminIds,到点后将收到私聊统计汇总。