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

This commit is contained in:
Henry Wang
2018-09-12 11:57:54 +08:00
committed by DIYgod
parent 97886d5f51
commit 11270cbbdc
+3 -1
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) => {