summaryapi / utils /tag_utils.py
quyip
fix
2a78aa3
raw
history blame contribute delete
369 Bytes
from typing import List
BlockTagNames = {'fifty'}
BlockTagContents = ['voice']
def filter_tags(tags: List[str]) -> List[str]:
tags = [tag.strip().lower().replace('|', '') for tag in tags]
return [tag for tag in tags
if len(tag) > 2
and tag not in BlockTagNames
and not any(content in tag for content in BlockTagContents)]