import whois
"""Get WHOIS information for a domain."""
try:
domain_info = whois.whois(domain)
except whois.parser.PywhoisError as e:
return Response({"message": "Bad request", "details": str(e)}, status=400)
if domain_info["domain_name"] is None and domain_info["registrar"] is None:
return Response({"message": "Bad request", "details": f"{domain} not found or registered"}, status=400)
return {"result": domain_info}
I also built a unit converter (for android - https://unitmeasure.xyz). Best of luck, and even though LLMs are widely available, good tools still come in handy!
reply