diff --git a/lib/core/searcher.js b/lib/core/searcher.js index 4f3fcff1c5..0b99bf3640 100644 --- a/lib/core/searcher.js +++ b/lib/core/searcher.js @@ -67,7 +67,7 @@ function parseDynamicCard(dynamic_detail_card) { , { info = {} } = user_profile , cardToJson = strToJson(card) , extendjsonToJson = strToJson(extend_json) - , { add_on_card_info = [] } = display + , { add_on_card_info = [] } = display || {} , { item } = cardToJson; const dy_type2chat_type = new Map([[1, 17], [2, 11], [4, 17], [8, 1], [64, 12]]); /* 转发者的UID */ diff --git a/lib/net/bili.js b/lib/net/bili.js index efe8ae1e7a..0a7afafbc1 100644 --- a/lib/net/bili.js +++ b/lib/net/bili.js @@ -414,16 +414,25 @@ const bili_client = { }, _getOneDynamicByDyid: new Line( '获取一个动态的细节', - Array(10) - .fill( - (dynamic_id) => get({ - url: API.DYNAMIC_SVR_GET_DYNAMIC_DETAIL_V.replace('{{v}}', Math.floor(Math.random() * 10 ** 10)), - config: { retry: false }, - query: { - dynamic_id - } - }) - ) + [ + (dynamic_id) => get({ + url: API.DYNAMIC_SVR_GET_DYNAMIC_DETAIL_V.replace('{{v}}', 1), + config: { retry: false }, + query: { + dynamic_id + } + }), + ...Array(10) + .fill( + (dynamic_id) => get({ + url: API.DYNAMIC_SVR_GET_DYNAMIC_DETAIL_V.replace('{{v}}', Math.floor(Math.random() * 10 ** 10)), + config: { retry: false }, + query: { + dynamic_id + } + }) + ) + ] , responseText => { const res = strToJson(responseText), diff --git a/lib/utils.js b/lib/utils.js index 7eb6ba7efd..54fcf60c31 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -45,7 +45,7 @@ const utils = { const obj = JSON.parse(str); return typeof obj === 'object' ? obj : false } catch (e) { - utils.log.error("json解析", e) + utils.log.error("json解析", e + "\n" + params) return false; } } else {