From c2bbf19a9f44257e8eb109ec42b7e9d9d6bd73f7 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Wed, 29 Jan 2020 14:47:08 +0800 Subject: [PATCH] feat: nhc list_gzbd --- lib/routes/nhc/list_gzbd.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/nhc/list_gzbd.js b/lib/routes/nhc/list_gzbd.js index 2b077901f6..1c30c47408 100644 --- a/lib/routes/nhc/list_gzbd.js +++ b/lib/routes/nhc/list_gzbd.js @@ -8,7 +8,7 @@ module.exports = async (ctx) => { const $ = cheerio.load(res.data); const list = $('.zxxx_list a').get(); const out = await Promise.all( - list.map(async (item) => { + list.splice(0, 10).map(async (item) => { const $ = cheerio.load(item); const title = $(item).text(); const address = $(item).attr('href'); @@ -28,7 +28,7 @@ module.exports = async (ctx) => { }) ); ctx.state.data = { - title: '疫情通报', + title: '疫情通报-国家卫健委', link: url, item: out, };