diff --git a/lib/v2/reuters/common.js b/lib/v2/reuters/common.js index 2bfa07bc23..0fb924f85b 100644 --- a/lib/v2/reuters/common.js +++ b/lib/v2/reuters/common.js @@ -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 () => {