fix: description获取不到

This commit is contained in:
shanmite 2021-12-02 18:51:59 +08:00
parent 70c10f247b
commit 8de74537f7
2 changed files with 10 additions and 4 deletions

View File

@ -279,7 +279,7 @@ class Monitor extends Searcher {
|| (hasOfficialLottery && chatmodel[0] === '1')
|| (!hasOfficialLottery && chatmodel[1] === '1');
log.debug("筛选动态", { real_uid, mIsFollowed, oriIsFollowed, realIsFollowed, needAt, needTopic, isRelayDynamic, isTwoLevelDynamic, key_words, has_key_words, isBlock, isLottery, isSendChat })
log.debug("筛选动态", { real_uid, mIsFollowed, oriIsFollowed, realIsFollowed, needAt, needTopic, isRelayDynamic, isTwoLevelDynamic, key_words, has_key_words, blockword, isBlock, isLottery, isSendChat })
/**屏蔽词 */
if (isBlock) {
@ -304,7 +304,7 @@ class Monitor extends Searcher {
: blacklist;
if ((new RegExp(dyid + '|' + m_uid + '|' + ori_uid)).test(new_blacklist)) {
log.info("筛选动态", `黑名单用户(https://t.bilibili.com/${dyid})`)
log.info("筛选动态", `公共黑名单用户(https://t.bilibili.com/${dyid})`)
return false
}

View File

@ -75,7 +75,10 @@ function parseDynamicCard(dynamic_detail_card) {
/* 是否有官方抽奖 */
obj.hasOfficialLottery = extension && extension.lott && true;
/* 转发者的描述 后两个分别是视频动态的描述和视频本身的描述*/
obj.description = (item && (item.content || item.description || cardToJson.dynamic || cardToJson.desc)) || '';
obj.description =
(item && (item.content + item.description))
|| (cardToJson.dynamic + cardToJson.desc)
|| '';
if (obj.type === 1) {
const { origin_extension, origin } = cardToJson
, originToJson = strToJson(origin)
@ -93,7 +96,10 @@ function parseDynamicCard(dynamic_detail_card) {
/* 被转发者的name */
obj.origin_uname = (user && (user.name || user.uname)) || '';
/* 被转发者的描述 */
obj.origin_description = (item && (item.content || item.description || originToJson.dynamic || originToJson.desc)) || '';
obj.origin_description =
(item && (item.content + item.description))
|| (originToJson.dynamic + originToJson.desc)
|| '';
}
return obj