-
Notifications
You must be signed in to change notification settings - Fork 3
/
parser_by.go
35 lines (30 loc) · 1.12 KB
/
parser_by.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
package whoisparser
import (
"regexp"
)
var byParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`Object does not exist`),
RateLimit: nil, //failed to call rate-limit for .by
MalformedRequest: regexp.MustCompile(`Parameter value syntax error`),
},
registrarRegex: &RegistrarRegex{
DomainName: regexp.MustCompile(`Domain Name: *(.+)`),
RegistrarName: regexp.MustCompile(`Registrar: *(.+)`),
NameServers: regexp.MustCompile(`Name Server: *(.+)`),
UpdatedDate: regexp.MustCompile(`Updated Date: *(.+)`),
CreatedDate: regexp.MustCompile(`Creation Date: *(.+)`),
ExpirationDate: regexp.MustCompile(`Expiration Date: *(.+)`),
},
registrantRegex: &RegistrantRegex{
Name: regexp.MustCompile(`Person: *(.+)`),
Country: regexp.MustCompile(`Country: *(.+)`),
Email: regexp.MustCompile(`Email: *(.+)`),
Phone: regexp.MustCompile(`Phone: *(.+)`),
ID: regexp.MustCompile(`Registration or other identification number: *(.+)`),
Organization: regexp.MustCompile(`Org: *(.+)`),
},
}
func init() {
RegisterParser(".by", byParser)
}