-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathparser_br.go
More file actions
33 lines (29 loc) · 961 Bytes
/
parser_br.go
File metadata and controls
33 lines (29 loc) · 961 Bytes
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 brParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`Invalid query`),
RateLimit: regexp.MustCompile(`Query rate limit exceeded. Reduced information`),
MalformedRequest: regexp.MustCompile(`No match for`),
},
registrarRegex: &RegistrarRegex{
CreatedDate: regexp.MustCompile(`domain:(?:.*\n)+?created: *(.*)`),
DomainDNSSEC: nil,
DomainID: nil,
DomainName: regexp.MustCompile(`domain: *(.*)`),
DomainStatus: regexp.MustCompile(`(?m)^status: *(.*)`),
Emails: nil,
ExpirationDate: nil,
NameServers: regexp.MustCompile(`nserver: *(.*)`),
ReferralURL: nil,
RegistrarID: regexp.MustCompile(`ownerid: *(.*)`),
RegistrarName: regexp.MustCompile(`owner: *(.*)`),
UpdatedDate: regexp.MustCompile(`domain:(?:.*\n)+?changed: *(.*)`),
WhoisServer: nil,
},
}
func init() {
RegisterParser(".br", brParser)
}