WhoisParser is a simple Go module for domain whois information parsing.
This module parses the provided domain whois information and returns a readable data struct.
It is supposed to be working with all domain extensions, but verified extensions must works, because I have checked them one by one manually.
If there is any problem, please feel free to open a new issue.
For binary distributions of whois information query and parsing, please download whois release tool.
go get github.com/likexian/whois-parser
import (
"github.com/likexian/whois-parser"
)
Visit the docs on GoDoc
result, err := whoisparser.Parse(whois_raw)
if err == nil {
// Print the domain status
fmt.Println(result.Domain.Status)
// Print the domain created date
fmt.Println(result.Domain.CreatedDate)
// Print the domain expiration date
fmt.Println(result.Domain.ExpirationDate)
// Print the registrar name
fmt.Println(result.Registrar.Name)
// Print the registrant name
fmt.Println(result.Registrant.Name)
// Print the registrant email address
fmt.Println(result.Registrant.Email)
}
Please refer to whois
Copyright 2014-2024 Li Kexian
Licensed under the Apache License 2.0
If this project is helpful, please share it with friends.
If you want to thank me, you can give me a cup of coffee.