Open PatchRequest opened 9 months ago
I looked into it a little an it looks like the response from the whois lib is No match for "TWITCH.TV". Weird
Hi @CementryMage - I'm looking into this
It looks like this is an issue with https://github.com/domainr/whois, which I use to make whois requests. All .tv
is appearing to be available:
% go run test.go
true
No match for "APPLE.TV".
I've fixed the issue to use whois.nic.tv as the whois server:
func getWhois(tld string, domain string) (response string) {
req, err := whois.NewRequest(domain)
if err != nil {
return
}
if tld == "tv" {
req.Host = "whois.nic.tv"
req.Body = []byte(fmt.Sprintf("%s\r\n", req.Query))
}
resp, err := whois.DefaultClient.Fetch(req)
if err != nil {
return
}
return fmt.Sprintf("%s", resp)
}
Thank you for reporting this issue!
Thanks for the fix!
i did not dig deeper but i saw similar behavior with .ca and .lt if i remember it correctly
Thanks for the letting me know @PatchRequest, I'm going to reopen this issue then.
I'll begin updating available and going through each TLD to make sure all the whois servers are correct.
Hi, when i run the following code:
It return true, which is obviously wrong.
How can we fix this? :D