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('获取动态', '成功获取热门动态'); /**