Skip to content

Commit

Permalink
fix: remove unlisted query
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyRL committed Sep 27, 2024
1 parent 25e8a2c commit 5dbe12d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/routes/bjnews/cat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/ttv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5dbe12d

Please sign in to comment.