Skip to content

Commit 6ec0b3c

Browse files
committed
调整b站动态源解析
1 parent fc6d381 commit 6ec0b3c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

JS/background.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,15 @@ let getBili = {
204204
time: x.desc.timestamp,
205205
type: x.desc.type
206206
};
207-
// desc.type 8 是视频 64是专栏 2是动态
207+
// desc.type 8 是视频 64是专栏 2是动态 4是无图片动态
208208
// todo 等微博数据分析完毕 就添加titile
209209
if (x.desc.type == 2) {
210210
card.image = (dynamicInfo.item.pictures && dynamicInfo.item.pictures.length > 0) ? dynamicInfo.item.pictures[0].img_src : null;
211211
card.dynamicInfo = dynamicInfo.item.description;
212212
card.url = `https://t.bilibili.com/${x.desc.dynamic_id_str}`
213+
} else if (x.desc.type == 4) {
214+
card.dynamicInfo = dynamicInfo.item.content;
215+
card.url = `https://t.bilibili.com/${x.desc.dynamic_id_str}`
213216
} else if (x.desc.type == 8) {
214217
card.image = dynamicInfo.pic;
215218
card.dynamicInfo = dynamicInfo.dynamic;

0 commit comments

Comments
 (0)