fix: 笔趣阁章节乱序 (#6090)

This commit is contained in:
Ethan Shen 2020-11-03 11:42:15 +08:00 committed by GitHub
parent 39440ad9bc
commit 2c3a35f3bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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);