feat(route): Add request throttling for news.cn (#13191)

This commit is contained in:
Andvari 2023-09-03 03:01:39 +08:00 committed by GitHub
parent 1819920082
commit 37404f280a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ module.exports = async (ctx) => {
let items = $('h3 a')
.toArray()
.slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 100)
.map((item) => {
item = $(item);
return {