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-video-parser-all

v1.7.8

Published

Koishi 视频/图集解析插件,支持抖音/快手/B站/今日头条/千问/TikTok/豆包/即梦等主流平台

Readme

koishi-plugin-video-parser-all

默认中文文档:English version

📌 重要公告(必读)

文档目录

| 文档 | 说明 | |------|------| | CHANGELOG-v1.7.8.md | v1.7.8 版本更新日志 | | API_ADDRESSES.md | 插件 API 解析地址一览(主 API 与各平台专属接口) | | COMPATIBILITY.md | API 字段兼容性说明(支持的所有字段别名) | | LINK_RULES.md | 所有平台的链接匹配规则(正则表达式) |

项目介绍

这是一个为 Koishi 机器人框架开发的视频/图集解析插件,支持自动识别并解析抖音、快手、B站、今日头条、千问、TikTok、AcFun(A站)、微视、好看视频、豆包(视频/图集)、即梦(AI视频/图片)、视频号、梨视频、Dola 等主流平台的短视频/图集/实况链接。平台清单以 api-new.ifphp.com 免费视频解析接口的实测结果为准。

项目仓库

  • GitHub:https://github.com/Minecraft-1314/koishi-plugin-video-parser-all
  • Issues:https://github.com/Minecraft-1314/koishi-plugin-video-parser-all/issues

快速开始

# 1. 进入 Koishi 控制台或项目工作区
# 2. 安装插件
# 3. 启用后发送视频/图集链接,插件会自动解析

核心指令

| 指令 | 说明 | 示例 | |------|------|------| | parse <url> | 手动解析指定的视频/图集链接 | parse https://v.douyin.com/xxxx/ |

配置项说明

基本设置

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | enable | boolean | true | 启用插件 | | botName | string | 视频解析机器人 | 合并转发中的昵称 | | showWaitingTip | boolean | true | 显示等待提示 | | debug | boolean | false | 开启调试日志 | | platformEnabled | object | 全开 | 各平台解析开关 |

消息格式

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | unifiedMessageFormat | string | 见预设 | 文字格式,支持变量:${标题} ${作者} ${简介} ${视频时长} ${点赞数} ${收藏数} ${转发数} ${播放数} ${评论数} ${发布时间} ${图片数量} ${作者ID} ${音乐标题} ${音乐作者},空行自动隐藏 |

媒体发送

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | showImageText | boolean | true | 发送文字内容 | | showCoverImage | boolean | true | 发送封面图片 | | showCoverFile | boolean | true | 封面是否以图片形式发送(关闭则只发送链接) | | showCoverText | boolean | true | 发送封面前显示文字提示 | | coverText | string | 封面: | 封面前显示的文字 | | showImageFileNew | boolean | true | 图片是否以图片形式发送(关闭则只发送链接) | | showAuthorAvatar | boolean | true | 发送作者头像图片 | | showAuthorAvatarFile | boolean | true | 作者头像图片是否以图片形式发送(关闭则只发送链接) | | showAuthorAvatarText | boolean | true | 作者头像前显示文字提示(将追加到文字消息末尾) | | authorAvatarText | string | 作者头像: | 作者头像前显示的文字 | | showMusicCover | boolean | false | 发送音乐封面图片 | | showMusicCoverText | boolean | true | 音乐封面前显示文字提示 | | musicCoverText | string | 音乐封面: | 音乐封面前显示的文字 | | showVideo | boolean | true | 发送视频(实况照片按普通图片处理,不发送实况视频) | | showVideoFile | boolean | true | 视频是否以视频形式发送(关闭则只发送链接) |

音乐链接

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | showMusicVoice | boolean | false | 发送音乐链接 | | musicVoiceScope | string | all | 发送范围:all 全部、video 仅视频、image 仅图文 | | showMusicVoiceFile | boolean | true | 音乐链接是否以语音形式发送(关闭则只发送链接) |

开启「发送音乐链接」后按「发送范围」决定哪些内容带音乐,默认全部;关闭则完全不发送。

性能与限制

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | maxDescLength | number | 200 | 简介长度上限 | | maxConcurrent | number | 3 | 解析最大并发数 |

网络与请求

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | timeout | number | 180000 | API 请求超时(ms) | | videoSendTimeout | number | 180000 | 消息发送超时(ms) | | userAgent | string | 见预设 | User-Agent | | apiKey | string | 空 | api-new.ifphp.com API Key | | authMode | string | header | API Key 传递方式:header(X-API-Key 头)或 query(URL 参数 ?key=xxx) | | proxy | object | 见说明 | HTTP/HTTPS 代理 | | customHeaders | array | [] | 自定义请求头 |

proxy 结构:enabled、protocol、host、port、auth.username、auth.password。

发送与重试

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | ignoreSendError | boolean | true | 忽略发送失败 | | retryTimes | number | 3 | 重试次数 | | retryInterval | number | 1000 | 重试间隔(ms) | | enableForward | boolean | false | 合并转发(OneBot/Satori) | | forwardMergeText | boolean | true | 文字参与合并转发 | | forwardMergeImage | boolean | true | 作品图片参与合并转发 | | forwardMergeCover | boolean | true | 封面参与合并转发 | | forwardMergeAvatar | boolean | true | 作者头像参与合并转发 | | forwardMergeMusicCover | boolean | true | 音乐封面参与合并转发 | | forwardMergeVideo | boolean | false | 视频参与合并转发 | | forwardMergeMusic | boolean | false | 音乐参与合并转发 |

未勾选的类型单独发送;合并段里只剩一条时也直接单独发送,不再套一层转发。

调试日志

打开 debug 后日志会记录完整链路,便于定位多发、漏发和解析异常:

  • 启动时的配置快照(API Key 打码)与已关闭平台列表
  • 命中链接的消息:平台、机器人、用户、频道、消息 ID、元素类型(不记录聊天正文)
  • 链接识别结果,以及被平台开关过滤掉的链接
  • 每个链接的平台配置、API 调用顺序、每次请求的地址与耗时、HTTP 状态、业务码
  • 解析结果摘要:类型、标题,以及是否有视频 / 图片 / 封面 / 头像 / 音乐
  • 发送计划与分段决策:哪些类型合并、哪些单独发送
  • 每次发送的内容摘要、耗时与成功状态

WARN 和 ERROR 不受 debug 开关影响始终输出,DEBUG 和 INFO 只在开启 debug 时输出;单条日志超过 2000 字符会截断并标注总长度。

缓存与去重

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | enableDeduplication | boolean | true | 启用重复解析检测与提示 | | deduplicationInterval | number | 180 | 去重间隔(s) | | cacheTTL | number | 600 | 缓存时间(s) |

API 与平台

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | primaryApiUrl | string | https://api-new.ifphp.com/api/svparse | 主解析 API 地址(聚合接口) | | platformDedicatedFirst | object | 全关 | 优先使用专属 API(仅 bilibili、douyin、kuaishou、wechat_channel、doubao、jimeng、dola) | | customApis | array | [] | 覆盖内置平台 API | | customPlatforms | array | [] | 自定义新平台 | | globalFieldMapping | string | 预设 | 全局字段映射 JSON |

专属 API 包括:bilibili、douyin、kuaishou、wechat_channel、doubao、jimeng、dola。抖音接口顺序为 svparse → dyjx → dydj;前序接口只返回 video_id 时,最后尝试 zjyh 原画直链解析。

界面文本

| 配置项 | 类型 | 默认值 | 说明 | |------|------|------|------| | waitingTipText | string | 正在解析视频,请稍候... | 等待提示 | | unsupportedPlatformText | string | 不支持该平台链接 | 不支持提示 | | invalidLinkText | string | 无效的视频链接 | 无效链接提示 | | parseErrorPrefix | string | ❌ 解析失败: | 错误前缀 | | parseErrorItemFormat | string | 【${url}】: ${msg} | 错误格式 | | deduplicationTipText | string | 链接 ${url} 在最近 ${interval} 秒内已解析过,已跳过。 | 重复解析提示,支持变量 ${url} ${interval} |

支持的变量

可在 unifiedMessageFormat 中使用以下变量,空行自动隐藏。

| 变量 | 说明 | |------|------| | ${标题} | 视频/图集标题 | | ${作者} | 作者名称 | | ${简介} | 内容简介 | | ${视频时长} | 视频时长(时:分:秒) | | ${点赞数} | 点赞数量 | | ${收藏数} | 收藏数量 | | ${转发数} | 转发/分享数量 | | ${播放数} | 播放量 | | ${评论数} | 评论数量 | | ${发布时间} | 发布时间(格式化) | | ${图片数量} | 图集/实况图片数量 | | ${作者ID} | 作者唯一标识 ID | | ${音乐标题} | 音乐标题 | | ${音乐作者} | 音乐作者 |

支持的平台

以下为插件内置链接匹配规则,可根据用户发送的链接自动识别。所有匹配规则同时支持 HTTP 和 HTTPS 协议,并兼容多级路径(如短链后带 / 子路径)。

| 平台 | 关键词识别(域名/路径模式) | 解析能力 | |------|------|------| | 哔哩哔哩(B站) | bilibili.com/video/、b23.tv、bili*.cn、b23.wtf、b2233.cn | 视频 | | 抖音 | douyin.com/video/、v.douyin.com | 短视频、图集、实况(Live Photo 全部按普通图片发送) | | Dola | dola.com/thread/ | 短视频 | | 快手 | kuaishou.com/short-video/、v.kuaishou.com、kuaishou.com/f/ | 短视频、图集 | | 今日头条 | toutiao.com/video/、toutiao.com/i|w|group|article/ | 视频 | | 千问 | qianwen.com/chat/、qianwen.com/share/chat/、tongyi.aliyun.com | AI 视频、图片 | | TikTok | tiktok.com/@/video/、vm.tiktok.com、vt.tiktok.com | 短视频 | | AcFun(A站) | acfun.cn/v/ac | 视频 | | 微视 | weishi.qq.com/weishi/feed/ | 短视频 | | 好看视频 | haokan.baidu.com/v?vid= | 短视频 | | 豆包(视频) | doubao.com/video/、doubao.com/video-sharing | 视频 | | 豆包(图集) | doubao.com/thread/ | 图文 | | 即梦 | jimeng.jianying.com、jimeng.cn、dreamina.jianying.com、dreamina.capcut.com | AI视频、AI图片 | | 视频号 | channels.weixin.qq.com、weixin.qq.com/sph/ | 短视频 | | 梨视频 | pearvideo.com/video_、video.li | 短视频 | | 自定义平台 | 通过 customPlatforms 配置添加 | 取决于提供的 API |

项目贡献者

| 贡献者 | 贡献内容 | |------|------| | Minecraft-1314 | 插件完整开发 | | ShiraiKuroko003 | 修复消息格式设置问题并且 PR-1.2.5 版本已修复 | | cyavb | 提交功能建议-给自定义 API 添加 KEY 认证-已采纳 | | Keep785 | 提交 Bug-无法正常关闭发送封面-已修复;提交 Bug-解析问题-已修复 | | dzt2008 + Apricityx | 提交 Bug-会对非支持视频平台 URL 进行误解析-已修复 | | linyves | 提交 Bug-小红书图集重复发送封面-已修复;提交 Bug-话题显示异常-已修复;提交建议-Live Photo 全部按普通图片处理-已采纳;提交 Bug-解析后会把作者头像一起发送-已修复 | | GSRealms | 提交 Bug-视频重复解析-已修复 | | a255266 | 提交功能建议-合并转发增加筛选功能-已采纳;提交功能建议-音乐链接发送范围功能-已采纳;提交 Bug-解析抖音无法发送实况照片-已修复 | | JH-Ahua | API 支持 | | shangxue | 灵感来源 |

欢迎通过 Issues 或 PR 加入贡献者列表。

许可协议

本项目采用 MIT 许可证,详情参见 LICENSE 文件。

支持我们

如果这个项目对您有帮助,欢迎点亮右上角的 Star 支持我们!