mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): gamme (#14108)
This commit is contained in:
@@ -11,7 +11,7 @@ module.exports = async (ctx) => {
|
||||
const baseUrl = `https://${domain}.gamme.com.tw`;
|
||||
const feed = await parser.parseURL(`${baseUrl + (category ? `/category/${category}` : '')}/feed`);
|
||||
|
||||
await Promise.all(
|
||||
const items = await Promise.all(
|
||||
feed.items.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const { data } = await got(item.link);
|
||||
@@ -45,6 +45,6 @@ module.exports = async (ctx) => {
|
||||
link: feed.link,
|
||||
image: domain === 'news' ? `${baseUrl}/blogico.ico` : `${baseUrl}/favicon.ico`,
|
||||
description: feed.description,
|
||||
item: feed.items,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@ module.exports = async (ctx) => {
|
||||
const { data } = await got(pageUrl);
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
const items = $('#category_new li a, .List-4 h3 a')
|
||||
const list = $('#category_new li a, .List-4 h3 a')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
@@ -24,8 +24,8 @@ module.exports = async (ctx) => {
|
||||
};
|
||||
});
|
||||
|
||||
await Promise.all(
|
||||
items.map((item) =>
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const { data } = await got(item.link);
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
Reference in New Issue
Block a user