From e2a15fffdccb021cfd87e47eece85dd680859117 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Nov 2023 02:14:13 +0000 Subject: [PATCH] style: auto format --- lib/v2/bnu/dwxgb.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/v2/bnu/dwxgb.js b/lib/v2/bnu/dwxgb.js index e6610138e..66d4dd162 100644 --- a/lib/v2/bnu/dwxgb.js +++ b/lib/v2/bnu/dwxgb.js @@ -6,7 +6,7 @@ module.exports = async (ctx) => { const { category, type } = ctx.params; const rootUrl = 'https://dwxgb.bnu.edu.cn'; - let currentUrl = `${rootUrl}/${category}/${type}/index.html`; + const currentUrl = `${rootUrl}/${category}/${type}/index.html`; let response; try { @@ -22,16 +22,16 @@ module.exports = async (ctx) => { const $ = cheerio.load(response.data); const list = $('ul.container.list > li') - .map((_, item) => { - const link = $(item).find('a').attr('href'); - const absoluteLink = new URL(link, currentUrl).href; - return { - title: $(item).find('a').text().trim(), - pubDate: parseDate($(item).find('span').text()), - link: absoluteLink, - }; - }) - .get(); + .map((_, item) => { + const link = $(item).find('a').attr('href'); + const absoluteLink = new URL(link, currentUrl).href; + return { + title: $(item).find('a').text().trim(), + pubDate: parseDate($(item).find('span').text()), + link: absoluteLink, + }; + }) + .get(); const items = await Promise.all( list.map((item) =>