From 2c3a35f3bcfe0c7103b3cf548af2383af16ab6ae Mon Sep 17 00:00:00 2001 From: Ethan Shen Date: Tue, 3 Nov 2020 11:42:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AC=94=E8=B6=A3=E9=98=81=E7=AB=A0?= =?UTF-8?q?=E8=8A=82=E4=B9=B1=E5=BA=8F=20(#6090)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/novel/biquge.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/routes/novel/biquge.js b/lib/routes/novel/biquge.js index b27237208..b57481113 100644 --- a/lib/routes/novel/biquge.js +++ b/lib/routes/novel/biquge.js @@ -25,6 +25,7 @@ module.exports = async (ctx) => { .map((_, e) => ({ title: e.children[0].data, link: e.attribs.href, + pubDate: new Date((parseInt(e.attribs.href.split('/').pop().replace('.html', '')) - 15015015) * 10000).toUTCString(), })) .get(); @@ -49,6 +50,7 @@ module.exports = async (ctx) => { title: item.title, description, link: item.link, + pubDate: item.pubDate, }; ctx.cache.set(item.link, JSON.stringify(single)); return Promise.resolve(single);