mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): reverse is not a function (#9309)
很久以前这个路由是正常的,现在报错 $().reverse is not a function 推测是cheerio包的返回类型变了
This commit is contained in:
@@ -8,7 +8,7 @@ module.exports = async (ctx) => {
|
||||
const url = host + `/book/${id}`;
|
||||
const response = await got.get(url);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('#detail-list-select > li > a').reverse().slice(0, 10).get();
|
||||
const list = $('#detail-list-select > li > a').get().reverse().slice(0, 10);
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map(async (item) => {
|
||||
|
||||
Reference in New Issue
Block a user