diff --git a/apps/tools.js b/apps/tools.js index fe098a2..eedcc5e 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -10,7 +10,7 @@ import HttpProxyAgent from "https-proxy-agent"; import { mkdirsSync } from "../utils/file.js"; import { downloadBFile, getDownloadUrl, mergeFileToMp4, getDynamic } from "../utils/bilibili.js"; import { parseUrl, parseM3u8, downloadM3u8Videos, mergeAcFileToMp4 } from "../utils/acfun.js"; -import { transMap, douyinTypeMap, XHS_CK, TEN_THOUSAND, BILI_DURATION } from "../utils/constant.js"; +import { transMap, douyinTypeMap, XHS_CK, TEN_THOUSAND } from "../utils/constant.js"; import { getIdVideo, generateRandomStr } from "../utils/common.js"; import config from "../model/index.js"; import Translate from "../utils/trans-strategy.js"; @@ -350,7 +350,7 @@ export class tools extends plugin { `简介:${desc}`; e.reply([`识别:哔哩哔哩:${title}`, combineContent]); - await getDownloadUrl(url, duration > BILI_DURATION) + await getDownloadUrl(url) .then(data => { this.downBili(`${path}temp`, data.videoUrl, data.audioUrl) .then(_ => { diff --git a/utils/bilibili.js b/utils/bilibili.js index 354a7e6..86dcb52 100644 --- a/utils/bilibili.js +++ b/utils/bilibili.js @@ -35,7 +35,7 @@ async function downloadBFile (url, fullFileName, progressCallback) { }); } -async function getDownloadUrl (url, isLargeVideo=false) { +async function getDownloadUrl (url) { return axios .get(url, { headers: { @@ -49,12 +49,11 @@ async function getDownloadUrl (url, isLargeVideo=false) { data.match(/