fix: bilibili输出author标签为视频作者, juejin时区转化问题 (#2879)
This commit is contained in:
parent
5501113f82
commit
e72c5b76b1
|
|
@ -39,10 +39,11 @@ module.exports = async (ctx) => {
|
|||
let item = hotlist[i];
|
||||
|
||||
item = {
|
||||
title: `${item.title} - ${item.author}`,
|
||||
title: `${item.title}`,
|
||||
description: `${item.description}<img referrerpolicy="no-referrer" src="https:${item.pic}"><br/>Tags:${item.tag}`,
|
||||
pubDate: new Date(item.pubdate).toUTCString(),
|
||||
link: `https://www.bilibili.com/video/av${item.id}`,
|
||||
author: item.author,
|
||||
};
|
||||
items.push(item);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,11 @@ module.exports = async (ctx) => {
|
|||
item:
|
||||
list &&
|
||||
list.map((item) => ({
|
||||
title: `${item.title} - ${item.owner.name}`,
|
||||
title: `${item.title}`,
|
||||
description: `${item.desc}<img referrerpolicy="no-referrer" src="${item.pic}">`,
|
||||
pubDate: new Date(item.pubdate * 1000).toUTCString(),
|
||||
link: `https://www.bilibili.com/video/av${item.aid}`,
|
||||
author: item.owner.name,
|
||||
})),
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ module.exports = async (ctx) => {
|
|||
title: item.title,
|
||||
description: `作者:${item.author}<br>播放量:${item.play}<br>时长:${item.duration}<br>综合得分:${item.pts}<br>弹幕:${item.video_review}<br><img referrerpolicy="no-referrer" src="${item.pic}">`,
|
||||
link: `https://www.bilibili.com/video/av${item.aid}`,
|
||||
author: item.author,
|
||||
})),
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ module.exports = async (ctx) => {
|
|||
description: `${item.desc}<br><img referrerpolicy="no-referrer" src="${item.pic}">`,
|
||||
pubDate: new Date(item.pubdate * 1000).toUTCString(),
|
||||
link: `https://www.bilibili.com/video/av${item.aid}`,
|
||||
author: userName,
|
||||
})),
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ module.exports = async (ctx) => {
|
|||
description: `${item.description}<br><img referrerpolicy="no-referrer" src="https:${item.pic}">`,
|
||||
pubDate: new Date(item.created * 1000).toUTCString(),
|
||||
link: `https://www.bilibili.com/video/av${item.aid}`,
|
||||
author: name,
|
||||
})),
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,11 +30,13 @@ async function load(link) {
|
|||
const ProcessFeed = async (list, caches) =>
|
||||
await Promise.all(
|
||||
list.map(async (item) => {
|
||||
const pubdate = new Date();
|
||||
pubdate.setTime(Date.parse(item.createdAt) - 8 * 60 * 60 * 1000);
|
||||
// 列表上提取到的信息
|
||||
const single = {
|
||||
title: item.title,
|
||||
description: `${(item.content || item.summaryInfo || '无描述').replace(/[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f]/g, '')}`,
|
||||
pubDate: new Date(item.createdAt).toUTCString(),
|
||||
pubDate: pubdate.toUTCString(),
|
||||
author: item.user.username,
|
||||
link: item.originalUrl,
|
||||
guid: item.originalUrl,
|
||||
|
|
|
|||
Loading…
Reference in New Issue