🔧 chore: 减少IO

This commit is contained in:
zhiyu1998 2024-08-20 13:56:06 +08:00
parent f38442d508
commit ed3be00a97

View File

@ -73,7 +73,8 @@ import {
downloadImg, downloadImg,
estimateReadingTime, estimateReadingTime,
formatBiliInfo, formatBiliInfo,
retryAxiosReq, saveJsonToFile, retryAxiosReq,
saveJsonToFile,
secondsToTime, secondsToTime,
testProxy, testProxy,
truncateString, urlTransformShortLink truncateString, urlTransformShortLink
@ -309,7 +310,7 @@ export class tools extends plugin {
const data = await retryAxiosReq(dyResponse) const data = await retryAxiosReq(dyResponse)
// logger.info(data) // logger.info(data)
const item = await data.aweme_detail; const item = await data.aweme_detail;
await saveJsonToFile(item); // await saveJsonToFile(item);
// 如果为null则退出 // 如果为null则退出
if (item == null) { if (item == null) {
e.reply("R插件无法识别到当前抖音内容请换一个试试"); e.reply("R插件无法识别到当前抖音内容请换一个试试");