import json from urllib.parse import urlparse CC3 = ('com','co','org','net','ac','gov','edu') def dom(c): u=c.get('url') if u: h=urlparse(u).netloc.lower().split(':')[0] p=h.split('.') if len(p)>=3 and p[-2] in CC3 and len(p[-1])==2: return '.'.join(p[-3:]) return '.'.join(p[-2:]) if len(p)>=2 else h t=(c.get('title') or '').lower().strip() return t if '.' in t and ' ' not in t else None def load(path='/home/claude/audit/responses.jsonl'): return [json.loads(l) for l in open(path,encoding='utf-8') if l.strip()]