mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
style: auto format
This commit is contained in:
+19
-15
@@ -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
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user