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"""