-
Notifications
You must be signed in to change notification settings - Fork 3
/
parser_cn.go
33 lines (28 loc) · 1007 Bytes
/
parser_cn.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
package whoisparser
import (
"regexp"
)
var cnParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`No matching record.`),
RateLimit: nil, //failed to call rate-limit for .cn
MalformedRequest: regexp.MustCompile(`Invalid parameter:`),
},
registrarRegex: &RegistrarRegex{
DomainName: regexp.MustCompile(`Domain Name: *(.+)`),
DomainID: regexp.MustCompile(`ROID: *(.+)`),
DomainStatus: regexp.MustCompile(`Domain Status: *(.+)`),
NameServers: regexp.MustCompile(`Name Server: *(.+)`),
CreatedDate: regexp.MustCompile(`Registration Time: *(.+)`),
ExpirationDate: regexp.MustCompile(`Expiration Time: *(.+)`),
DomainDNSSEC: regexp.MustCompile(`DNSSEC: *(.+)`),
},
registrantRegex: &RegistrantRegex{
ID: regexp.MustCompile(`Registrant ID: *(.+)`),
Name: regexp.MustCompile(`Registrant: *(.+)`),
Email: regexp.MustCompile(`Registrant Contact Email: *(.+)`),
},
}
func init() {
RegisterParser(".cn", cnParser)
}