style: auto format

This commit is contained in:
GitHub Action 2021-10-05 09:22:18 +00:00
parent adf321e1e0
commit 14d778a3ea
1 changed files with 11 additions and 11 deletions

View File

@ -27,16 +27,16 @@ module.exports = async (ctx) => {
const title = $('span>h1').text();
const chapter_item = $('#content li a')
.map((_, item) => {
item = $(item);
const date = item.attr('title').match(/更新时间:(.*)/)[1]; // "10-04 00:17"
return {
title: item.text(),
link: item.attr('href'),
pubDate: timezone(parseDate(date, 'MM-DD HH:mm'), +8),
};
})
.get();
.map((_, item) => {
item = $(item);
const date = item.attr('title').match(/更新时间:(.*)/)[1]; // "10-04 00:17"
return {
title: item.text(),
link: item.attr('href'),
pubDate: timezone(parseDate(date, 'MM-DD HH:mm'), +8),
};
})
.get();
const items = await Promise.all(
chapter_item.map((item) =>
ctx.cache.tryGet(item.link, async () => {
@ -73,4 +73,4 @@ module.exports = async (ctx) => {
description: '',
item: items,
};
};
};