mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🦄 refactor: 优化哔哩哔哩解析信息
This commit is contained in:
parent
6fc36501e1
commit
937e7a1507
@ -340,14 +340,13 @@ export class tools extends plugin {
|
|||||||
const dataProcessing = data => {
|
const dataProcessing = data => {
|
||||||
return Number(data) >= TEN_THOUSAND ? (data / TEN_THOUSAND).toFixed(1) + "万" : data;
|
return Number(data) >= TEN_THOUSAND ? (data / TEN_THOUSAND).toFixed(1) + "万" : data;
|
||||||
};
|
};
|
||||||
const combineContent = `总播放量:${dataProcessing(view)}, 弹幕数量:${dataProcessing(
|
// 格式化数据
|
||||||
danmaku,
|
const combineContent =
|
||||||
)}, 回复量:${dataProcessing(reply)}, 收藏数:${dataProcessing(
|
`标题:${title}\n` +
|
||||||
favorite,
|
`点赞:${dataProcessing(like,)} | 硬币:${dataProcessing(coin)} | 收藏:${dataProcessing(favorite)} | 分享:${dataProcessing(share)}\n`+
|
||||||
)}, 投币:${dataProcessing(coin)}, 分享:${dataProcessing(share)}, 点赞:${dataProcessing(
|
`总播放量:${dataProcessing(view)} | 弹幕数量:${dataProcessing(danmaku)} | 评论:${dataProcessing(reply)}\n`+
|
||||||
like,
|
`简介:${desc}`;
|
||||||
)}\n`;
|
e.reply([`识别:哔哩哔哩:${title}`, combineContent]);
|
||||||
e.reply([`识别:哔哩哔哩:${title}\n${desc}\n`, combineContent]);
|
|
||||||
|
|
||||||
await getDownloadUrl(url)
|
await getDownloadUrl(url)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
@ -369,7 +368,7 @@ export class tools extends plugin {
|
|||||||
if (this.biliSessData && this.openaiApiKey) {
|
if (this.biliSessData && this.openaiApiKey) {
|
||||||
try {
|
try {
|
||||||
const prompt = await getBiliGptInputText(
|
const prompt = await getBiliGptInputText(
|
||||||
{ title, desc, dynamic, aid, cid },
|
videoInfo,
|
||||||
this.biliSessData,
|
this.biliSessData,
|
||||||
);
|
);
|
||||||
const response = await this.chatGptClient.sendMessage(prompt);
|
const response = await this.chatGptClient.sendMessage(prompt);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user