#!/root/psl-venv/bin/python3 from publicsuffix2 import get_sld import sys d = sys.argv[1].strip().lower().rstrip(".") sld = get_sld(d) or "" print(sld)