mirror of
https://github.com/jakejarvis/rdapper.git
synced 2026-10-26 08:26:22 -04:00
fix: read the .tw registrar from "Registration Service Provider"
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2 files changed
+10
No files matched your search
@@ -344,10 +344,18 @@ test("WHOIS .tw TWNIC 'Record ... on' sentence dates", () => {
|
||||
" Domain servers in listed order:",
|
||||
" dns1.twnic.net.tw 210.65.47.29 ",
|
||||
"",
|
||||
"Registration Service Provider: TWNIC",
|
||||
"Registration Service URL: https://rs.twnic.tw/",
|
||||
"Registrar Abuse Contact Email: abuse@twnic.tw",
|
||||
].join("\n");
|
||||
const rec = normalizeWhois("twnic.net.tw", "net.tw", text, "whois.twnic.net.tw");
|
||||
expect(rec.creationDate).toBe("2000-02-02T07:06:48Z");
|
||||
expect(rec.expirationDate).toBe("2099-12-31T15:59:59Z");
|
||||
expect(rec.registrar).toMatchObject({
|
||||
name: "TWNIC",
|
||||
url: "https://rs.twnic.tw/",
|
||||
email: "abuse@twnic.tw",
|
||||
});
|
||||
});
|
||||
|
||||
test("WHOIS header-style date whose value follows a blank line still parses", () => {
|
||||
|
||||
@@ -133,6 +133,7 @@ export function normalizeWhois(
|
||||
"sponsoring registrar",
|
||||
"organisation",
|
||||
"record maintained by",
|
||||
"registration service provider", // .tw
|
||||
]);
|
||||
const ianaId = anyValue(map, ["registrar iana id", "sponsoring registrar iana id", "iana id"]);
|
||||
const url = anyValue(map, [
|
||||
@@ -140,6 +141,7 @@ export function normalizeWhois(
|
||||
"registrar website",
|
||||
"registrar web", // .it
|
||||
"url of the registrar",
|
||||
"registration service url", // .tw
|
||||
"referrer",
|
||||
]);
|
||||
const abuseEmail = anyValue(map, ["registrar abuse contact email", "abuse contact email"]);
|
||||
|
||||
Reference in new issue
Block a user