diff --git a/apps/query.js b/apps/query.js index 8ddddaf..67db42b 100644 --- a/apps/query.js +++ b/apps/query.js @@ -1,5 +1,3 @@ -// 主库 -// http库 import axios from "axios"; import _ from "lodash"; import fetch from "node-fetch"; diff --git a/apps/tools.js b/apps/tools.js index e707a25..29a0f23 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -41,7 +41,9 @@ import { MIYOUSHE_ARTICLE, NETEASE_API_CN, NETEASE_SONG_DOWNLOAD, - NETEASE_TEMP_API, PearAPI_CRAWLER, PearAPI_DEEPSEEK, + NETEASE_TEMP_API, + PearAPI_CRAWLER, + PearAPI_DEEPSEEK, QISHUI_MUSIC_TEMP_API, QQ_MUSIC_TEMP_API, TWITTER_TWEET_INFO, @@ -1778,7 +1780,7 @@ export class tools extends plugin { const llmCrawler = await fetch(PearAPI_CRAWLER.replace("{}", summaryLink)); const content = await (await llmCrawler.json())?.data; const titleMatch = content.match(/Title:\s*(.*?)\n/)?.[1]; - e.reply(`${ this.identifyPrefix } 识别:${ name } - ${titleMatch},正在为您总结,请稍等...`, true); + e.reply(`${ this.identifyPrefix } 识别:${ name } - ${ titleMatch },正在为您总结,请稍等...`, true); const deepseekFreeSummary = await fetch(PearAPI_DEEPSEEK, { method: "POST", headers: { diff --git a/utils/bilibili.js b/utils/bilibili.js index 938c9a2..4b7bbcf 100644 --- a/utils/bilibili.js +++ b/utils/bilibili.js @@ -1,8 +1,10 @@ -import fs from "node:fs"; import axios from 'axios' +import { exec, spawn } from 'child_process'; import child_process from 'node:child_process' -import util from "util"; +import fs from "node:fs"; import path from "path"; +import qrcode from "qrcode" +import util from "util"; import { BILI_BVID_TO_CID, BILI_DYNAMIC, @@ -12,8 +14,6 @@ import { BILI_VIDEO_INFO } from "../constants/tools.js"; import { mkdirIfNotExists } from "./file.js"; -import { exec, spawn } from 'child_process'; -import qrcode from "qrcode" export const BILI_HEADER = { 'User-Agent': @@ -548,4 +548,4 @@ function replaceP2PUrl(url) { } catch (e) { return url; } -} \ No newline at end of file +} diff --git a/utils/common.js b/utils/common.js index 9cb7658..861e851 100644 --- a/utils/common.js +++ b/utils/common.js @@ -1,6 +1,5 @@ import axios from "axios"; import { exec } from "child_process"; -import https from 'https'; import { HttpsProxyAgent } from 'https-proxy-agent'; import fetch from "node-fetch"; import fs from "node:fs"; @@ -478,7 +477,7 @@ export function checkToolInCurEnv(someCommand) { */ export async function urlTransformShortLink(url) { const data = { - url: `${encodeURI(url)}` + url: `${ encodeURI(url) }` }; const resp = await fetch(SHORT_LINKS, { @@ -490,4 +489,4 @@ export async function urlTransformShortLink(url) { body: JSON.stringify(data) }).then(response => response.json()); return await resp.data.short_url; -} \ No newline at end of file +}