fix: add getOneDynamicByDyid v1

This commit is contained in:
shanmite 2024-04-05 10:10:01 +08:00
parent 7a8682ce76
commit 469a6dc7b5
3 changed files with 21 additions and 12 deletions

View File

@ -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 */

View File

@ -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),

View File

@ -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 {