From 22537442045c3e9918fef2e96926b10a37d5d440 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 22 Jan 2022 20:06:55 +0000 Subject: [PATCH] style: auto format --- lib/v2/firefox/index.js | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/v2/firefox/index.js b/lib/v2/firefox/index.js index 7809c5760f..fce9536b23 100644 --- a/lib/v2/firefox/index.js +++ b/lib/v2/firefox/index.js @@ -27,23 +27,27 @@ module.exports = async (ctx) => { const items = await Promise.all( list && list.map((item) => - ctx.cache.tryGet(item.link, async () => { - const article = await got({ - url: item.link, - header: { - Referer: baseUrl + '/breaches', - }, - }); - const content = cheerio.load(article.body); + ctx.cache.tryGet( + item.link, + async () => { + const article = await got({ + url: item.link, + header: { + Referer: baseUrl + '/breaches', + }, + }); + const content = cheerio.load(article.body); - item.description = art(path.join(__dirname, 'templates/description.art'), { - header: content('#breach-detail').html(), - overview: content('section.detail-section.jst-cntr.flx.flx-col').html(), - dataClasses: content('section.detail-section.bg-white.jst-cntr.flx.flx-col').html(), - }); + item.description = art(path.join(__dirname, 'templates/description.art'), { + header: content('#breach-detail').html(), + overview: content('section.detail-section.jst-cntr.flx.flx-col').html(), + dataClasses: content('section.detail-section.bg-white.jst-cntr.flx.flx-col').html(), + }); - return item; - }, 31536000) + return item; + }, + 31536000 + ) ) );