fix: remove unlisted query
This commit is contained in:
@@ -35,7 +35,7 @@ async function handler(ctx) {
|
||||
category: $(a).parent().find('.source').text().trim(),
|
||||
}));
|
||||
|
||||
const out = await asyncPoolAll(ctx.req.query('pool') ? Number.parseInt(ctx.req.query('pool')) : 1, list, (item) => fetchArticle(item));
|
||||
const out = await asyncPoolAll(2, list, (item) => fetchArticle(item));
|
||||
return {
|
||||
title: `新京报 - 分类 - ${$('.cur').text().trim()}`,
|
||||
link: url,
|
||||
|
||||
@@ -34,7 +34,7 @@ async function handler(ctx) {
|
||||
const $ = load(response.data);
|
||||
|
||||
let items = $('div.news-list li')
|
||||
.slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.query.limit) : 30)
|
||||
.slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 30)
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
|
||||
Reference in New Issue
Block a user