fix: remove pubDate due to i18n date string parsing issue (#2144)
This commit is contained in:
parent
6e0e993fc6
commit
770a094414
|
|
@ -25,13 +25,13 @@ module.exports = async (ctx) => {
|
|||
.map((i, e) => $(e).text())
|
||||
.get();
|
||||
|
||||
const datelist = $('tr td p')
|
||||
.map((i, e) =>
|
||||
$(e)
|
||||
.text()
|
||||
.trim()
|
||||
)
|
||||
.get();
|
||||
// const datelist = $('tr td p')
|
||||
// .map((i, e) =>
|
||||
// $(e)
|
||||
// .text()
|
||||
// .trim()
|
||||
// )
|
||||
// .get();
|
||||
|
||||
const out = await Promise.all(
|
||||
list.map(async (itemUrl, index) => {
|
||||
|
|
@ -54,7 +54,7 @@ module.exports = async (ctx) => {
|
|||
link: itemUrl,
|
||||
author: 'Apple Inc.',
|
||||
description: description,
|
||||
pubDate: new Date(datelist[index].replace(/(\d+) 年 (\d+) 月 (\d+) 日/, '$1-$2-$3')).toISOString(),
|
||||
// pubDate: new Date(datelist[index].replace(/(\d+) 年 (\d+) 月 (\d+) 日/, '$1-$2-$3')).toISOString(),
|
||||
};
|
||||
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single));
|
||||
|
|
|
|||
Loading…
Reference in New Issue