我正在尝试使whois数据成为数据采集器,我以以下格式获取了数据。
Domain Name: google.com
Registry Domain ID: 2138514_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.markmonitor.com
Registrar URL: http://www.markmonitor.com
Updated Date: 2018-02-21T10:45:07-0800
Creation Date: 1997-09-15T00:00:00-0700
Registrar Registration Expiration Date: 2020-09-13T21:00:00-0700
Registrar: MarkMonitor, Inc.
Registrar IANA ID: 292
Registrar Abuse Contact Email: abusecomplaints@markmonitor.com
Registrar Abuse Contact Phone: +1.2083895740
Domain Status: clientUpdateProhibited (https://www.icann.org/epp#clientUpdateProhibited)
Domain Status: clientTransferProhibited (https://www.icann.org/epp#clientTransferProhibited)
Domain Status: clientDeleteProhibited (https://www.icann.org/epp#clientDeleteProhibited)
Domain Status: serverUpdateProhibited (https://www.icann.org/epp#serverUpdateProhibited)
Domain Status: serverTransferProhibited (https://www.icann.org/epp#serverTransferProhibited)
Domain Status: serverDeleteProhibited (https://www.icann.org/epp#serverDeleteProhibited)
Registrant Organization: Google LLC
Registrant State/Province: CA
Registrant Country: US
Admin Organization: Google LLC
Admin State/Province: CA
Admin Country: US
Tech Organization: Google LLC
Tech State/Province: CA
Tech Country: US
Name Server: ns1.google.com
Name Server: ns3.google.com
Name Server: ns4.google.com
Name Server: ns2.google.com
DNSSEC: unsigned
- 现在,我正在尝试使用令牌生成器解析数据,但我不了解如何使用该令牌生成器。谁能给我一个示例代码,说明如何使用令牌生成器。
var result = await WhoisClient.QueryAsync("google.com");
string s = result.Raw;
Tokenizer tokenizer = new Tokenizer();
var pattern =@"{Domain Name: {WhoisRecord.Domain}";
var result1 = tokenizer.Parse<WhoisRecord>(pattern, s);
MessageBox.Show("Domain Name: " + result1.Domain);
-