Find match on items with more than one URL

This commit is contained in:
Felipe M 2021-02-09 14:13:14 +01:00
parent e31bd672ee
commit 5f41e4a7c6
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
1 changed files with 3 additions and 3 deletions

View File

@ -187,9 +187,9 @@ class OnePass:
host = extract_host(url)
def filter_host(item):
"""Exclude items that does not match host """
if "url" in item["overview"]:
return host in item["overview"]["url"]
"""Exclude items that does not match host on any configured URL"""
if "URLs" in item["overview"]:
return any(filter(lambda x: host in x["u"], item["overview"]["URLs"]))
return False
items = cls.list_items()