mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
fix: add getOneDynamicByDyid v1
This commit is contained in:
parent
7a8682ce76
commit
469a6dc7b5
@ -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 */
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user