修复发布时间的bug (#651)
This commit is contained in:
parent
202d80cca6
commit
c774197e57
|
|
@ -36,7 +36,11 @@ module.exports = async (ctx) => {
|
|||
const dateList = $('.content tr')
|
||||
.find('div')
|
||||
.slice(0, 10)
|
||||
.map((i, e) => $(e).text())
|
||||
.map((i, e) =>
|
||||
$(e)
|
||||
.text()
|
||||
.replace('发布时间:', '')
|
||||
)
|
||||
.get();
|
||||
|
||||
const out = await Promise.all(
|
||||
|
|
@ -61,7 +65,7 @@ module.exports = async (ctx) => {
|
|||
$('.Article_PublishDate')
|
||||
.text()
|
||||
.replace('发布时间:', '')
|
||||
),
|
||||
).toUTCString(),
|
||||
};
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single), 24 * 60 * 60);
|
||||
return Promise.resolve(single);
|
||||
|
|
@ -70,7 +74,7 @@ module.exports = async (ctx) => {
|
|||
title: titleList[index],
|
||||
link: itemUrl,
|
||||
description: '该通知为文件,请点击原文链接↑下载',
|
||||
pubDate: dateList,
|
||||
pubDate: new Date(dateList[index]).toUTCString(),
|
||||
};
|
||||
return Promise.resolve(single);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue