We want to store all the link domains in a table, and mark their status (banned/safe). Ideally when matching, we should be querying the DB like so:
domain_parts = self.extract_domain(url) # ['io', 'github', 'slint']
"""
SELECT status
FROM domain_tree
WHERE domain LIKE 'io.github%' -- this is a "good" domain and should match
-- This is a "bad" more specific domain
-- WHERE domain LIKE 'io.github.ketogummies'
"""
We want to store all the link domains in a table, and mark their status (banned/safe). Ideally when matching, we should be querying the DB like so: