From 29645bc4e7c81fb94751d0bd13085a1fbb90333b Mon Sep 17 00:00:00 2001 From: shanmite Date: Tue, 16 May 2023 09:55:08 +0800 Subject: [PATCH] =?UTF-8?q?fixed:=20=E8=AF=9D=E9=A2=98=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=B7=B2=E5=A4=B1=E6=95=88=20#285?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed #285 --- lib/core/searcher.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/core/searcher.js b/lib/core/searcher.js index d0b7575..b490f6f 100644 --- a/lib/core/searcher.js +++ b/lib/core/searcher.js @@ -186,6 +186,12 @@ function modifyDynamicRes(res) { log.warn('处理动态数据', '未找到任何动态信息') } + if (typeof has_more === "undefined" + && typeof offset === "undefined") { + log.error('处理动态数据', '该功能已失效'); + return null; + } + const /** * 字符串offset防止损失精度 @@ -353,6 +359,8 @@ class Searcher { * @returns {Promise} */ async getLotteryInfoByTag(tag_name) { + log.info('获取动态', `开始获取带话题#${tag_name}#的动态信息`); + const tag_id = await bili.getTagIDByTagName(tag_name), hotdy = await bili.getHotDynamicInfoByTagID(tag_id), @@ -360,7 +368,6 @@ class Searcher { if (modDR === null) return null; - log.info('获取动态', `开始获取带话题#${tag_name}#的动态信息`); log.info('获取动态', '成功获取热门动态'); /**