mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 14:07:54 +08:00
@@ -40,7 +40,7 @@ module.exports = async (ctx) => {
|
||||
const regResult = /https:\/\/www.okjike.com\/medium\/[a-zA-Z0-9]*/.exec(item.description);
|
||||
if (regResult) {
|
||||
const newsUrl = regResult[0];
|
||||
const cache = ctx.cache.get(newsUrl);
|
||||
const cache = await ctx.cache.get(newsUrl);
|
||||
if (cache) {
|
||||
item.description = cache;
|
||||
} else {
|
||||
@@ -55,13 +55,14 @@ module.exports = async (ctx) => {
|
||||
}
|
||||
if (description) {
|
||||
item.description = description;
|
||||
ctx.cache.set(newsUrl, description);
|
||||
await ctx.cache.set(newsUrl, description, 24 * 60 * 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
item.title = `${topic.content} ${dayjs(new Date(one.pubDate)).format('MM月DD日')}`;
|
||||
return item;
|
||||
});
|
||||
|
||||
ctx.state.data.item = await Promise.all(promises);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user