Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete the regex for parsing the WHOIS response results for .jp domains. #210

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

J1ufan
Copy link
Contributor

@J1ufan J1ufan commented Apr 11, 2024

yahoo-net.jp Some whois information of the domain name cannot be obtained.

WHOIS command.

Domain Information: [ドメイン情報]
[Domain Name]                   YAHOO-NET.JP

[登録者名]                      LINEヤフー株式会社
[Registrant]                    LY Corporation

[Name Server]                   ns01.yahoo.co.jp
[Name Server]                   ns02.yahoo.co.jp
[Name Server]                   ns11.yahoo.co.jp
[Name Server]                   ns12.yahoo.co.jp
[Signing Key]

[登録年月日]                    2008/08/29
[有効期限]                      2024/08/31
[状態]                          Active
[ロック状態]                    DomainTransferLocked
[ロック状態]                    AgentChangeLocked
[最終更新]                      2024/04/11 16:21:56 (JST)

Copy link
Contributor

@mzpqnxow mzpqnxow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richardpenman, there is a question mark misplaced here -

        "updated_date": r"\[(?:Last Updated|最終更新)?\]\s?(.+)",

Should be:

        "updated_date": r"\[(?:Last Updated?|最終更新)\]\s?(.+)",

(the "d" in Updated does not appear in many or all records)

I think you just typo'd this

I'm not stalking your commits, it just happens that .jp was one that I had some changes for, but before sending a PR, I checked and saw this was already here!

FYI - I also added a /e to ".jp" queries in Whois.whois() - doing that ended up solving a lot of problems that I had with certain (but not all) .jp domains. You may not want to do this, my notes say "NOTE: this needs QA to identify regression" - but I didn't notice any in a randomish sampling. Your call - "ain't broke, don't fix it" is fine with me, though I'll send examples of "broken" cases if I encounter them again

@mzpqnxow
Copy link
Contributor

Example case:

[ JPRS database provides information on network administration. Its use is    ]
[ restricted to network administration purposes. For further information,     ]
[ use 'whois -h whois.jprs.jp help'. To suppress Japanese output, add'/e'     ]
[ at the end of command, e.g. 'whois -h whois.jprs.jp xxx/e'.                 ]
Domain Information:
a. [Domain Name]                SEIYU.CO.JP
g. [Organization]               SEIYU,KK.
l. [Organization Type]          Company
m. [Administrative Contact]     TN63542JP
n. [Technical Contact]          DY7141JP
n. [Technical Contact]          TN63542JP
p. [Name Server]                asns1.customer.ne.jp
p. [Name Server]                asns2.customer.ne.jp
s. [Signing Key]                
[State]                         Connected (2024/05/31)
[Registered Date]               1995/05/12
[Connected Date]                1995/06/05
[Last Update]                   2024/03/18 14:15:27 (JST)

With the question mark outside the parens, this ends up with None for the updated_date field

@richardpenman richardpenman merged commit 2576580 into richardpenman:master Apr 17, 2024
@richardpenman
Copy link
Owner

@mzpqnxow thanks for the PR to fix .jp domains!

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.

3 participants