summaryrefslogtreecommitdiff
path: root/utils.py
blob: ea5e0c1336a0963be5e0177e520fd76ca217f58d (plain)
1
2
3
def is_foreign_url(link: str, filters: list[str]):
    dest_lower = link.lower()
    return (dest_lower.startswith("http://") or dest_lower.startswith("https://")) and not any((elem in dest_lower for elem in filters))