Fix Nominet parsing for registrants that do not have a state/region listed

master
Sven Slootweg 10 years ago
parent 43a62c5828
commit 5d32a3c883

@ -519,7 +519,7 @@ def parse_registrants(data):
"Eligibility Type:[ ]*Citizen\/Resident\n[\s\S]*Registrant Contact ID:[ ]*(?P<handle>.+)\n[\s\S]*Registrant Contact Name:[ ]*(?P<name>.+)\n", # .au individual
"Registrant:[ ]*(?P<organization>.+)\n[\s\S]*Eligibility Type:[ ]*(Higher Education Institution|Company|Incorporated Association|Other)\n[\s\S]*Registrant Contact ID:[ ]*(?P<handle>.+)\n[\s\S]*Registrant Contact Name:[ ]*(?P<name>.+)\n", # .au educational, company, 'incorporated association' (non-profit?), other (spotted for linux.conf.au, unsure if also for others)
" Registrant:\n (?P<name>.+)\n\n Registrant type:\n .*\n\n Registrant's address:\n The registrant .* opted to have", # Nominet (.uk) with hidden address
" Registrant:\n (?P<name>.+)\n\n[\s\S]* Registrant type:\n .*\n\n Registrant's address:\n (?P<street1>.+)\n(?: (?P<street2>.+)\n)?(?: (?P<street3>.+)\n)? (?P<city>.+)\n (?P<state>.+)\n (?P<postalcode>.+)\n (?P<country>.+)\n\n", # Nominet (.uk) with visible address
" Registrant:\n (?P<name>.+)\n\n[\s\S]* Registrant type:\n .*\n\n Registrant's address:\n (?P<street1>.+)\n(?: (?P<street2>.+)\n(?: (?P<street3>.+)\n)??)?? (?P<city>[^0-9\n]+)\n(?: (?P<state>.+)\n)? (?P<postalcode>.+)\n (?P<country>.+)\n\n", # Nominet (.uk) with visible address
"Domain Owner:\n\t(?P<organization>.+)\n\n[\s\S]*?(?:Registrant Contact:\n\t(?P<name>.+))?\n\nRegistrant(?:'s)? (?:a|A)ddress:(?:\n\t(?P<street1>.+)\n(?:\t(?P<street2>.+)\n)?(?:\t(?P<street3>.+)\n)?\t(?P<city>.+)\n\t(?P<postalcode>.+))?\n\t(?P<country>.+)(?:\n\t(?P<phone>.+) \(Phone\)\n\t(?P<fax>.+) \(FAX\)\n\t(?P<email>.+))?\n\n", # .ac.uk - what a mess...
"Registrant contact:\n (?P<name>.+)\n (?P<street>.*)\n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+)\n\n", # Fabulous.com
"registrant-name:\s*(?P<name>.+)\nregistrant-type:\s*(?P<type>.+)\nregistrant-address:\s*(?P<street>.+)\nregistrant-postcode:\s*(?P<postalcode>.+)\nregistrant-city:\s*(?P<city>.+)\nregistrant-country:\s*(?P<country>.+)\n(?:registrant-phone:\s*(?P<phone>.+)\n)?(?:registrant-email:\s*(?P<email>.+)\n)?", # Hetzner

@ -0,0 +1,51 @@
Domain name:
gov.uk
Registrant:
UK Cabinet Office
Registrant type:
UK Government Body
Registrant's address:
Government Digital Service
Aviation House, 6th floor
125 Kingsway
London
OX11 OSG
GB
Registrar:
No registrar listed. This domain is directly registered with Nominet.
Relevant dates:
Registered on: before Aug-1996
Registration status:
No registration status listed.
Name servers:
ns0.ja.net.
ns2.ja.net.
ns3.ja.net.
ns4.ja.net.
auth50.ns.de.uu.net.
auth00.ns.de.uu.net.
ns1.surfnet.nl.
WHOIS lookup made at 16:56:04 23-May-2014
--
This WHOIS information is provided for free by Nominet UK the central registry
for .uk domain names. This information and the .uk WHOIS are:
Copyright Nominet UK 1996 - 2014.
You may not access the .uk WHOIS or use any data from it except as permitted
by the terms of use available in full at http://www.nominet.org.uk/whoisterms,
which includes restrictions on: (A) use of the data for advertising, or its
repackaging, recompilation, redistribution or reuse (B) obscuring, removing
or hiding any or all of this notice and (C) exceeding query rate or volume
limits. The data is provided on an 'as-is' basis and may lag behind the
register. Access may be withdrawn or restricted at any time.

@ -0,0 +1 @@
{"nameservers": ["auth50.ns.de.uu.net", "auth00.ns.de.uu.net", "ns0.ja.net", "ns2.ja.net", "ns3.ja.net", "ns4.ja.net", "ns1.surfnet.nl"], "status": ["No registration status listed."], "contacts": {"admin": null, "tech": null, "registrant": {"city": "London", "name": "UK Cabinet Office", "street": "Government Digital Service\nAviation House, 6th floor\n125 Kingsway", "country": "GB", "postalcode": "OX11 OSG"}, "billing": null}, "registrar": ["No registrar listed. This domain is directly registered with Nominet."], "raw": [" Domain name:\n gov.uk\n\n Registrant:\n UK Cabinet Office\n\n Registrant type:\n UK Government Body\n\n Registrant's address:\n Government Digital Service\n Aviation House, 6th floor\n 125 Kingsway\n London\n OX11 OSG\n GB\n\n Registrar:\n No registrar listed. This domain is directly registered with Nominet.\n\n Relevant dates:\n Registered on: before Aug-1996\n Registration status:\n No registration status listed.\n\n Name servers:\n ns0.ja.net. \n ns2.ja.net. \n ns3.ja.net. \n ns4.ja.net. \n auth50.ns.de.uu.net. \n auth00.ns.de.uu.net. \n ns1.surfnet.nl. \n\n\n WHOIS lookup made at 16:56:04 23-May-2014\n\n-- \nThis WHOIS information is provided for free by Nominet UK the central registry\nfor .uk domain names. This information and the .uk WHOIS are:\n\n Copyright Nominet UK 1996 - 2014.\n\nYou may not access the .uk WHOIS or use any data from it except as permitted\nby the terms of use available in full at http://www.nominet.org.uk/whoisterms,\nwhich includes restrictions on: (A) use of the data for advertising, or its\nrepackaging, recompilation, redistribution or reuse (B) obscuring, removing\nor hiding any or all of this notice and (C) exceeding query rate or volume\nlimits. The data is provided on an 'as-is' basis and may lag behind the\nregister. Access may be withdrawn or restricted at any time. \n\n"]}

@ -0,0 +1 @@
{"nameservers": ["auth50.ns.de.uu.net", "auth00.ns.de.uu.net", "ns0.ja.net", "ns2.ja.net", "ns3.ja.net", "ns4.ja.net", "ns1.surfnet.nl"], "status": ["No registration status listed."], "contacts": {"admin": null, "tech": null, "registrant": {"city": "London", "name": "UK Cabinet Office", "street": "Government Digital Service\nAviation House, 6th floor\n125 Kingsway", "country": "GB", "postalcode": "OX11 OSG"}, "billing": null}, "registrar": ["No registrar listed. This domain is directly registered with Nominet."], "raw": [" Domain name:\n gov.uk\n\n Registrant:\n UK Cabinet Office\n\n Registrant type:\n UK Government Body\n\n Registrant's address:\n Government Digital Service\n Aviation House, 6th floor\n 125 Kingsway\n London\n OX11 OSG\n GB\n\n Registrar:\n No registrar listed. This domain is directly registered with Nominet.\n\n Relevant dates:\n Registered on: before Aug-1996\n Registration status:\n No registration status listed.\n\n Name servers:\n ns0.ja.net. \n ns2.ja.net. \n ns3.ja.net. \n ns4.ja.net. \n auth50.ns.de.uu.net. \n auth00.ns.de.uu.net. \n ns1.surfnet.nl. \n\n\n WHOIS lookup made at 16:56:04 23-May-2014\n\n-- \nThis WHOIS information is provided for free by Nominet UK the central registry\nfor .uk domain names. This information and the .uk WHOIS are:\n\n Copyright Nominet UK 1996 - 2014.\n\nYou may not access the .uk WHOIS or use any data from it except as permitted\nby the terms of use available in full at http://www.nominet.org.uk/whoisterms,\nwhich includes restrictions on: (A) use of the data for advertising, or its\nrepackaging, recompilation, redistribution or reuse (B) obscuring, removing\nor hiding any or all of this notice and (C) exceeding query rate or volume\nlimits. The data is provided on an 'as-is' basis and may lag behind the\nregister. Access may be withdrawn or restricted at any time. \n\n"]}
Loading…
Cancel
Save