likexian / whois-parser

Whois parser for domain whois information parsing in Go(Golang).
Apache License 2.0
284 stars 86 forks source link

Reliable non existing domain detection #42

Closed AlexBlack772 closed 2 years ago

AlexBlack772 commented 3 years ago

The library relays on word like "not found" to detect non existing domains. but, for example, .it tld does't have such words. I belive we need a method to detect such domains. We can do this in prepareXX method, or introduce net method (for example precheckXX)

whois aaadjdhfhfhssssfh.it
Domain:             aaadjdhfhfhssssfh.it
Status:             AVAILABLE

{
  "domain": {
    "domain": "aaadjdhfhfhssssfh.it",
    "punycode": "aaadjdhfhfhssssfh.it",
    "name": "aaadjdhfhfhssssfh",
    "extension": "it",
    "status": [
      "available"
    ]
  }
}
[Querying whois.nic.it]
[whois.nic.it]
Domain:             agrigento.it
Status:             UNASSIGNABLE

{
  "domain": {
    "domain": "agrigento.it",
    "punycode": "agrigento.it",
    "name": "agrigento",
    "extension": "it",
    "status": [
      "unassignable"
    ]
  }
}

what do you think?

likexian commented 3 years ago

Hello @AlexBlack772 Thanks for your feedback. I think it is too heavy to implement with prepareXX or precheckXX, it is more acceptable that to improve isDomainNotFound.


If you think this repository is helpful, please share it with friends, thanks.

AlexBlack772 commented 3 years ago

it is more acceptable that to improve isDomainNotFound.

this is a possible way, but in this case we need another algorithm of isDomainNotFound calling.

now, isDomainNotFound is called from getDomainErrorType. But getDomainErrorType is called only if we can't detect domain name.

With .it tld we can detect domain name and getDomainErrorType is not called

likexian commented 3 years ago

Yes, you are right, let me think about it.


If you think this repository is helpful, please share it with friends, thanks.

AlexBlack772 commented 3 years ago

JFYI, the same issue with .nl tld

sometimes it responds with the following text


whois.domain-registry.nl: Server too busy, try again later
likexian commented 3 years ago

Hello @AlexBlack772 It works. Please try the latest version.


If you think this repository is helpful, please share it with friends, thanks.