Skip to content

Conversation

@usiegj00
Copy link

Fix .US Domain Parser & Add .JP Registrar Support

This PR includes two important parser fixes:

1. Fix .US Domain Parser for ICANN-Compliant Format

Problem

The .us domain parser was failing because it was using BaseShared2 which was designed for the old NeuStar format (pre-2015). The .US registry has since transitioned to Registry Services, LLC and now uses ICANN-compliant WHOIS format.

Solution

  • Changed parser from BaseShared2 to BaseIcannCompliant
  • Added custom status handler to return actual EPP codes as an array

2. Add Registrar Property Support for Japanese (.jp) Domains

Problem

The Japanese (.jp) WHOIS parser was missing registrar information extraction.

Solution

  • Added registrar property parsing for whois.jprs.jp responses
  • Includes test fixtures and specs

Background

The .us registry changed their WHOIS format sometime after 2014:

Old format (NeuStar, pre-2015):

Domain Name:                                 GOOGLE.US
Sponsoring Registrar:                        MARKMONITOR, INC.
Domain Registration Date:                    Fri Apr 19 23:15:57 GMT 2002

New format (Registry Services LLC, current):

Domain Name: google.us
Registrar: MarkMonitor, Inc.
Creation Date: 2002-04-19T23:16:01Z
Registry Expiry Date: 2026-04-18T23:59:59Z

Changes

  1. Parser now uses BaseIcannCompliant base class
  2. Custom status property returns EPP codes as array: ["clientDeleteProhibited", "serverTransferProhibited"]
  3. Updated test fixtures with current NASA.us data

Verification

Tested with multiple .us domains, all return ICANN-compliant format:

  • google.us ✅
  • nasa.us ✅
  • whitehouse.us ✅
# Test the parser:
bundle exec rspec spec/whois/parsers/responses/whois.nic.us/us/

References

The .US registry changed their WHOIS output format from a proprietary format
to ICANN-compliant format sometime after 2014 when the registry transitioned
from NeuStar to Registry Services, LLC.

Old format (pre-2015):
- Used fields like "Sponsoring Registrar:", "Domain Registration Date:"
- Dates in format: "Fri Apr 19 23:15:57 GMT 2002"
- Managed by NeuStar, Inc.

New format (current):
- Uses ICANN-compliant fields: "Registrar:", "Creation Date:"
- ISO 8601 dates: "2002-04-19T23:16:01Z"
- Managed by Registry Services, LLC (about.us)

This commit updates the parser from BaseShared2 (which handled the old
format) to BaseIcannCompliant, and adds custom handling for EPP status
codes to return them as an array rather than a simplified symbol.

Verified with: google.us, nasa.us, teampassword-staging.us, whitehouse.us
All return the same ICANN-compliant format from whois.nic.us.
Update test format to match project standards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant