mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
parent
00174b0fdc
commit
d370fef899
@ -110,8 +110,12 @@ function parseDynamicCard(dynamic_detail_card) {
|
||||
obj.hasOfficialLottery = extension && extension.lott && true;
|
||||
/* 转发者的描述 纯文字内容 图片动态描述 后两个分别是视频动态的描述和视频本身的描述*/
|
||||
obj.description =
|
||||
(item && (item.content || '' + item.description || ''))
|
||||
|| (cardToJson.dynamic || '' + cardToJson.desc || '')
|
||||
(item && ((item.content || '') + (item.description || '')))
|
||||
|| (
|
||||
(cardToJson.dynamic || '')
|
||||
+ (cardToJson.desc || '')
|
||||
+ (cardToJson.vest && cardToJson.vest.content || '')
|
||||
)
|
||||
|| '';
|
||||
/* 转发 */
|
||||
if (obj.type === 1) {
|
||||
|
||||
@ -4,7 +4,7 @@ const searcher = require("../lib/core/searcher");
|
||||
const util = require('./util');
|
||||
|
||||
(async () => {
|
||||
await util.par_run([0, 1, 2, 3, 4, 5], [
|
||||
await util.par_run([0, 1, 2, 3, 4, 5, 6], [
|
||||
// 0
|
||||
async () => {
|
||||
let info = await bili_client.getOneDynamicByDyid("728424890210713624");
|
||||
@ -44,6 +44,12 @@ const util = require('./util');
|
||||
chats = await bili_client.getChat(card.rid_str, card.chat_type)
|
||||
assert.equal(chats.filter(it => it[0] === '六的月').length, 0)
|
||||
},
|
||||
// 6
|
||||
async () => {
|
||||
const dy = await bili_client.getOneDynamicByDyid("774973685666676768");
|
||||
const card = searcher.parseDynamicCard(dy)
|
||||
assert.notEqual(card.description + "", undefined + "");
|
||||
},
|
||||
])
|
||||
|
||||
console.log("dynamic_card.test ... ok!");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user