Use a more appropriate coding style from @pirate.

Co-Authored-By: f0086 <mail@aaron-fischer.net>
This commit is contained in:
Nick Sweeting 2018-10-24 21:07:35 +02:00 committed by Aaron Fischer
parent ebc327bb89
commit a2f5fa8ba6

View file

@ -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 This is used to determine which links are new and not indexed jet. Set the
ONLY_NEW environment variable to activate this filter mechanism. ONLY_NEW environment variable to activate this filter mechanism.
""" """
existing_urls = list(map(lambda l: l['url'], existing_links)) existing_urls = {link['url'] for link in existing_links}
return list(filter(lambda l: l['url'] not in existing_urls, all_links)) return [link for link in all_links if link['url'] not in existing_urls]
def archivable_links(links): def archivable_links(links):
"""remove chrome://, about:// or other schemed links that cant be archived""" """remove chrome://, about:// or other schemed links that cant be archived"""