-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathparser_il.go
More file actions
34 lines (29 loc) · 1.15 KB
/
parser_il.go
File metadata and controls
34 lines (29 loc) · 1.15 KB
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
package whoisparser
import (
"regexp"
)
var ilParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`% No data was found to match the request criteria.`),
RateLimit: nil, //failed to call rate-limit for .il
MalformedRequest: nil, //MalformedRequest and NoSuchDomain same
},
registrarRegex: &RegistrarRegex{
DomainName: regexp.MustCompile(`domain:\s*(.+)`),
NameServers: regexp.MustCompile(`nserver:\s*(.+)`),
DomainDNSSEC: regexp.MustCompile(`DNSSEC:\s*(.+)`),
DomainStatus: regexp.MustCompile(`status:\s*(.+)`),
RegistrarName: regexp.MustCompile(`registrar name:\s*(.+)`),
Emails: regexp.MustCompile(`registrar info:\s(.+)`),
},
registrantRegex: &RegistrantRegex{
Name: regexp.MustCompile(`person:\s*(.*)`),
Fax: regexp.MustCompile(`fax-no:\s*(.*)`),
Phone: regexp.MustCompile(`phone:\s*(.*)`),
Email: regexp.MustCompile(`person:(?:.*\s)+e-mail:\s*(.*)`),
Address: regexp.MustCompile(`(?m)(?:.*?address *(?P<city>.*?)$.*?)\n *(?:.*?address *(?P<postalCode>.*?)$.*?)\n *(?:.*?address *(?P<country>.*?)$.*?)\nphone:`),
},
}
func init() {
RegisterParser(".il", ilParser)
}