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) =>