From a2f5fa8ba69ed87916208e3f0439509f7a72da98 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Wed, 24 Oct 2018 21:07:35 +0200 Subject: [PATCH] Use a more appropriate coding style from @pirate. Co-Authored-By: f0086 --- archiver/links.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archiver/links.py b/archiver/links.py index 990df953..a16ca594 100644 --- a/archiver/links.py +++ b/archiver/links.py @@ -80,8 +80,8 @@ def new_links(all_links, existing_links): This is used to determine which links are new and not indexed jet. Set the ONLY_NEW environment variable to activate this filter mechanism. """ - existing_urls = list(map(lambda l: l['url'], existing_links)) - return list(filter(lambda l: l['url'] not in existing_urls, all_links)) + existing_urls = {link['url'] for link in existing_links} + return [link for link in all_links if link['url'] not in existing_urls] def archivable_links(links): """remove chrome://, about:// or other schemed links that cant be archived"""