-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathparser_biz.go
39 lines (34 loc) · 1.43 KB
/
parser_biz.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package whoisparser
import (
"regexp"
)
var bizParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`No Data Found`),
RateLimit: nil, //failed to call rate-limit for .biz
MalformedRequest: nil, //MalformedRequest and NoSuchDomain same
},
registrarRegex: &RegistrarRegex{
DomainName: regexp.MustCompile(`Domain Name: *(.+)`),
DomainID: regexp.MustCompile(`Registry Domain ID: *(.+)`),
WhoisServer: regexp.MustCompile(`Registrar WHOIS Server: *(.+)`),
ReferralURL: regexp.MustCompile(`Registrar URL: *(.+)`),
UpdatedDate: regexp.MustCompile(`Updated Date: *(.+)`),
CreatedDate: regexp.MustCompile(`Creation Date: *(.+)`),
ExpirationDate: regexp.MustCompile(`Registry Expiry Date: *(.+)`),
RegistrarName: regexp.MustCompile(`Registrar: *(.+)`),
RegistrarID: regexp.MustCompile(`Registrar IANA ID: *(.+)`),
Emails: regexp.MustCompile(`Registrar Abuse Contact Email: *(.+)`),
DomainStatus: regexp.MustCompile(`Domain Status: *(.+)`),
NameServers: regexp.MustCompile(`Name Server: *(.+)`),
DomainDNSSEC: regexp.MustCompile(`DNSSEC: *(.+)`),
},
registrantRegex: &RegistrantRegex{
Province: regexp.MustCompile(`Registrant State/Province: *(.+)`),
Organization: regexp.MustCompile(`Registrant Organization: *(.+)`),
Country: regexp.MustCompile(`Registrant Country: *(.+)`),
},
}
func init() {
RegisterParser(".biz", bizParser)
}