-
Notifications
You must be signed in to change notification settings - Fork 3
/
parser_ru.go
31 lines (25 loc) · 886 Bytes
/
parser_ru.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
package whoisparser
import (
"regexp"
)
var ruParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`No entries found for the selected source`),
RateLimit: regexp.MustCompile(`You have exceeded allowed connection rate`),
MalformedRequest: nil, //MalformedRequest and NoSuchDomain same
},
registrarRegex: &RegistrarRegex{
CreatedDate: regexp.MustCompile(`(?i)created: *(.+)`),
DomainName: regexp.MustCompile(`(?i)domain: *(.+)`),
DomainStatus: regexp.MustCompile(`(?i)state: *(.+)`),
ExpirationDate: regexp.MustCompile(`(?i)free-date: *(.+)`),
NameServers: regexp.MustCompile(`(?i)nserver: *(.+).`),
RegistrarName: regexp.MustCompile(`(?i)registrar: *(.+)`),
},
registrantRegex: &RegistrantRegex{
Organization: regexp.MustCompile(`(?i)org: *(.+)`),
},
}
func init() {
RegisterParser(".ru", ruParser)
}