解决澎湃新闻条目过多超时的问题 (#684)

This commit is contained in:
Henry Wang 2018-09-12 04:57:54 +01:00 committed by DIYgod
parent 97886d5f51
commit 11270cbbdc
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,9 @@ module.exports = async (ctx) => {
const data = res.data;
const $ = cheerio.load(data);
const list = $('p.news_tit01, div.news_tit02').get();
const list = $('p.news_tit01, div.news_tit02')
.slice(0, 10)
.get();
const out = await Promise.all(
list.map(async (item) => {