-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathparser_tw.go
31 lines (26 loc) · 962 Bytes
/
parser_tw.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 twParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`No Found`),
RateLimit: nil, //failed to call rate-limit for .tw
MalformedRequest: regexp.MustCompile(`網域名稱不合規定!`),
},
registrarRegex: &RegistrarRegex{
DomainName: regexp.MustCompile(`Domain Name: *(.+)`),
DomainStatus: regexp.MustCompile(`Domain Status: *(.+)`),
ExpirationDate: regexp.MustCompile(`Record expires on *(.+)`),
CreatedDate: regexp.MustCompile(`Record created on *(.+)`),
NameServers: regexp.MustCompile(`(?s)Domain servers in listed order:\n\s*(.*?)\n\n`),
RegistrarName: regexp.MustCompile(`Registration Service Provider: *(.*)`),
ReferralURL: regexp.MustCompile(`Registration Service URL: *(.*)`),
},
registrantRegex: &RegistrantRegex{
Name: regexp.MustCompile(`Registrant:\n\s*(.*)`),
},
}
func init() {
RegisterParser(".tw", twParser)
}