mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): Remove duplicate articles in reuters feed. (#13349)
* Remove duplicate articles in reuters feed. * Refining
This commit is contained in:
@@ -55,8 +55,11 @@ module.exports = async (ctx) => {
|
||||
let items = response.result.articles.map((e) => ({
|
||||
title: e.title,
|
||||
link: new URL(e.canonical_url, rootUrl).href,
|
||||
guid: e.id,
|
||||
}));
|
||||
|
||||
items = items.filter((e, i) => items.findIndex((f) => e.guid === f.guid) === i);
|
||||
|
||||
items = await Promise.all(
|
||||
items.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
|
||||
Reference in New Issue
Block a user