def exclude_tags(tags, excluded, relation=operator.is_):
"""Filter out tags that are related to at least one of the excluded set."""
return [t for t in make_bs4_iterable(tags) if not any(relation(t, s) for s in make_bs4_iterable(excluded))]
评论列表
文章目录