mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: [#I710HS, #I711M9] 修复b站极个别视频解析报错
1. 修复b站极个别视频解析报错 2. 修复bili音乐解析效果
This commit is contained in:
parent
107befd7ec
commit
b6a167c7dd
@ -297,10 +297,15 @@ export class tools extends plugin {
|
||||
// 补充https
|
||||
url = url.startsWith("https://") ? url : "https://" + url;
|
||||
// av处理
|
||||
const matched = url.match(/(av|AV)(\w+)/);
|
||||
const matched = url.match(/\/(AV|av)(\w+)/);
|
||||
if (matched) {
|
||||
url = url.replace(matched[0], av2BV(Number(matched[2])));
|
||||
}
|
||||
// 只提取音乐处理
|
||||
if (e.msg.includes("bili音乐")) {
|
||||
await this.biliMusic(url, e, biliInfo);
|
||||
return true;
|
||||
}
|
||||
// 动态处理
|
||||
if (url.includes("t.bilibili.com")) {
|
||||
url = this.biliDynamic(url, e);
|
||||
@ -330,10 +335,6 @@ export class tools extends plugin {
|
||||
// 格式化数据
|
||||
const combineContent = `\n${ formatBiliInfo(dataProcessMap) }\n简介:${ desc }`;
|
||||
let biliInfo = [`识别:哔哩哔哩:${ title }`, combineContent]
|
||||
// 只提取音乐处理
|
||||
if (e.msg.includes("bili音乐")) {
|
||||
return await this.biliMusic(url, e, biliInfo);
|
||||
}
|
||||
// 总结
|
||||
const summary = await this.getBiliSummary(bvid, cid, owner.mid);
|
||||
// 不提取音乐,正常处理
|
||||
@ -373,9 +374,8 @@ export class tools extends plugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
async biliMusic(url, e, biliInfo) {
|
||||
const { audioUrl, title } = await getAudioUrl(url);
|
||||
e.reply(biliInfo)
|
||||
async biliMusic(url, e) {
|
||||
const { audioUrl } = await getAudioUrl(url);
|
||||
e.reply(segment.record(audioUrl))
|
||||
return true
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
- {
|
||||
version: 1.2.1,
|
||||
version: 1.2.2,
|
||||
data:
|
||||
[
|
||||
新增<span class="cmd">哔哩哔哩官方AI总结</span>功能,
|
||||
|
Loading…
x
Reference in New Issue
Block a user