A lot of WHOIS queries don’t work properly anymore since RDAP became the standard for many TLDs. If you're struggling with that, check out whoisjson.com it handles RDAP really well and returns clean JSON.