Fix NeuStar regex to make State/Province optional since these are apparently not always present, and explicitly remove variable-width whitespace matching.

master
Sven Slootweg 10 years ago
parent 5f660bfa96
commit c5f63363d2

@ -518,7 +518,7 @@ def parse_registrants(data):
"Holder of domain name:\n(?P<name>[\S\s]+)\n(?P<street>.+)\n(?P<postalcode>[A-Z0-9-]+)\s+(?P<city>.+)\n(?P<country>.+)\nContractual Language", # nic.ch
"\n\n(?:Owner)?\s+: (?P<name>.*)\n(?:\s+: (?P<organization>.*)\n)?\s+: (?P<street>.*)\n\s+: (?P<city>.*)\n\s+: (?P<state>.*)\n\s+: (?P<country>.*)\n", # nic.io
"Contact Information:\n\[Name\]\s*(?P<name>.*)\n\[Email\]\s*(?P<email>.*)\n\[Web Page\]\s*(?P<url>.*)\n\[Postal code\]\s*(?P<postalcode>.*)\n\[Postal Address\]\s*(?P<street1>.*)\n(?:\s+(?P<street2>.*)\n)?(?:\s+(?P<street3>.*)\n)?\[Phone\]\s*(?P<phone>.*)\n\[Fax\]\s*(?P<fax>.*)\n", # jprs.jp
"Registrant ID:[ ]*(?P<handle>.*)\nRegistrant Name:[ ]*(?P<name>.*)\n(?:Registrant Organization:[ ]*(?P<organization>.*)\n)?Registrant Address1:[ ]*(?P<street1>.*)\n(?:Registrant Address2:[ ]*(?P<street2>.*)\n)?(?:Registrant Address3:[ ]*(?P<street3>.*)\n)?Registrant City:[ ]*(?P<city>.*)\nRegistrant State/Province:[ ]*(?P<state>.*)\nRegistrant Postal Code:[ ]*(?P<postalcode>.*)\nRegistrant Country:[ ]*(?P<country>.*)\nRegistrant Country Code:[ ]*.*\nRegistrant Phone Number:[ ]*(?P<phone>.*)\n(?:Registrant Facsimile Number:[ ]*(?P<facsimile>.*)\n)?Registrant Email:[ ]*(?P<email>.*)", # .US (NeuStar)
"Registrant ID:(?P<handle>.*)\nRegistrant Name:(?P<name>.*)\n(?:Registrant Organization:(?P<organization>.*)\n)?Registrant Address1:(?P<street1>.*)\n(?:Registrant Address2:(?P<street2>.*)\n)?(?:Registrant Address3:(?P<street3>.*)\n)?Registrant City:(?P<city>.*)\n(?:Registrant State/Province:(?P<state>.*)\n)?Registrant Postal Code:(?P<postalcode>.*)\nRegistrant Country:(?P<country>.*)\nRegistrant Country Code:.*\nRegistrant Phone Number:(?P<phone>.*)\n(?:Registrant Facsimile Number:(?P<facsimile>.*)\n)?Registrant Email:(?P<email>.*)", # .US, .biz (NeuStar)
" Organisation Name[.]* (?P<name>.*)\n Organisation Address[.]* (?P<street1>.*)\n Organisation Address[.]* (?P<street2>.*)\n(?: Organisation Address[.]* (?P<street3>.*)\n)? Organisation Address[.]* (?P<city>.*)\n Organisation Address[.]* (?P<postalcode>.*)\n Organisation Address[.]* (?P<state>.*)\n Organisation Address[.]* (?P<country>.*)", # Melbourne IT (what a horrid format...)
"Registrant:[ ]*(?P<name>.+)\n[\s\S]*Eligibility Name:[ ]*(?P<organization>.+)\n[\s\S]*Registrant Contact ID:[ ]*(?P<handle>.+)\n", # .au business
"Eligibility Type:[ ]*Citizen\/Resident\n[\s\S]*Registrant Contact ID:[ ]*(?P<handle>.+)\n[\s\S]*Registrant Contact Name:[ ]*(?P<name>.+)\n", # .au individual
@ -550,7 +550,7 @@ def parse_registrants(data):
"Technical Contact:\n tech_org: (?P<organization>.*)\n tech_name: (?P<name>.*)\n tech_email: (?P<email>.*)\n tech_address: (?P<address>.*)\n tech_city: (?P<city>.*)\n tech_state: (?P<state>.*)\n tech_zip: (?P<postalcode>.*)\n tech_country: (?P<country>.*)\n tech_phone: (?P<phone>.*)", # Bellnames
"Technical contact:\n(?P<name>[\S\s]+)\n(?P<street>.+)\n(?P<postalcode>[A-Z0-9-]+)\s+(?P<city>.+)\n(?P<country>.+)\n\n", # nic.ch
"Tech Contact ID:[ ]*(?P<handle>.+)\nTech Contact Name:[ ]*(?P<name>.+)", # .au
"Technical Contact ID:[ ]*(?P<handle>.*)\nTechnical Contact Name:[ ]*(?P<name>.*)\n(?:Technical Contact Organization:[ ]*(?P<organization>.*)\n)?Technical Contact Address1:[ ]*(?P<street1>.*)\n(?:Technical Contact Address2:[ ]*(?P<street2>.*)\n)?(?:Technical Contact Address3:[ ]*(?P<street3>.*)\n)?Technical Contact City:[ ]*(?P<city>.*)\nTechnical Contact State/Province:[ ]*(?P<state>.*)\nTechnical Contact Postal Code:[ ]*(?P<postalcode>.*)\nTechnical Contact Country:[ ]*(?P<country>.*)\nTechnical Contact Country Code:[ ]*.*\nTechnical Contact Phone Number:[ ]*(?P<phone>.*)\n(?:Technical Contact Facsimile Number:[ ]*(?P<facsimile>.*)\n)?Technical Contact Email:[ ]*(?P<email>.*)", # .US (NeuStar)
"Technical Contact ID:(?P<handle>.*)\nTechnical Contact Name:(?P<name>.*)\n(?:Technical Contact Organization:(?P<organization>.*)\n)?Technical Contact Address1:(?P<street1>.*)\n(?:Technical Contact Address2:(?P<street2>.*)\n)?(?:Technical Contact Address3:(?P<street3>.*)\n)?Technical Contact City:(?P<city>.*)\n(?:Technical Contact State/Province:(?P<state>.*)\n)?Technical Contact Postal Code:(?P<postalcode>.*)\nTechnical Contact Country:(?P<country>.*)\nTechnical Contact Country Code:.*\nTechnical Contact Phone Number:(?P<phone>.*)\n(?:Technical Contact Facsimile Number:(?P<facsimile>.*)\n)?Technical Contact Email:(?P<email>.*)", # .US, .biz (NeuStar)
"Tech Name[.]* (?P<name>.*)\n Tech Address[.]* (?P<street1>.*)\n Tech Address[.]* (?P<street2>.*)\n(?: Tech Address[.]* (?P<street3>.*)\n)? Tech Address[.]* (?P<city>.*)\n Tech Address[.]* (?P<postalcode>.*)\n Tech Address[.]* (?P<state>.*)\n Tech Address[.]* (?P<country>.*)\n Tech Email[.]* (?P<email>.*)\n Tech Phone[.]* (?P<phone>.*)\n Tech Fax[.]* (?P<fax>.*)", # Melbourne IT
"Technical contact:\n(?: (?P<organization>.+)\n)? (?P<name>.+)\n (?P<email>.+)\n (?P<street>.+)\n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+)\n Phone: (?P<phone>.*)\n Fax: (?P<fax>.*)\n", # Fabulous.com
"tech-c-name:\s*(?P<name>.+)\ntech-c-type:\s*(?P<type>.+)\ntech-c-address:\s*(?P<street>.+)\ntech-c-postcode:\s*(?P<postalcode>.+)\ntech-c-city:\s*(?P<city>.+)\ntech-c-country:\s*(?P<country>.+)\n(?:tech-c-phone:\s*(?P<phone>.+)\n)?(?:tech-c-email:\s*(?P<email>.+)\n)?", # Hetzner
@ -572,7 +572,7 @@ def parse_registrants(data):
" Administrative Contact Details:[ ]*\n (?P<organization>.*)\n (?P<name>.*)[ ]{2,}\((?P<email>.*)\)\n (?P<street1>.*)\n(?: (?P<street2>.*)\n)?(?: (?P<street3>.*)\n)? (?P<city>.*)\n (?P<state>.*),(?P<postalcode>.*)\n (?P<country>.*)\n Tel. (?P<phone>.*)", # Whois.com
"admin-id:[ ]*(?P<handle>.*)\n(?:admin-organization:[ ]*(?P<organization>.*)\n)?admin-name:[ ]*(?P<name>.*)\nadmin-street:[ ]*(?P<street>.*)\nadmin-city:[ ]*(?P<city>.*)\nadmin-zip:[ ]*(?P<postalcode>.*)\nadmin-country:[ ]*(?P<country>.*)\n(?:admin-phone:[ ]*(?P<phone>.*)\n)?(?:admin-fax:[ ]*(?P<fax>.*)\n)?admin-email:[ ]*(?P<email>.*)", # InterNetworX
"Administrative Contact:\n admin_org: (?P<organization>.*)\n admin_name: (?P<name>.*)\n admin_email: (?P<email>.*)\n admin_address: (?P<address>.*)\n admin_city: (?P<city>.*)\n admin_state: (?P<state>.*)\n admin_zip: (?P<postalcode>.*)\n admin_country: (?P<country>.*)\n admin_phone: (?P<phone>.*)", # Bellnames
"Administrative Contact ID:[ ]*(?P<handle>.*)\nAdministrative Contact Name:[ ]*(?P<name>.*)\n(?:Administrative Contact Organization:[ ]*(?P<organization>.*)\n)?Administrative Contact Address1:[ ]*(?P<street1>.*)\n(?:Administrative Contact Address2:[ ]*(?P<street2>.*)\n)?(?:Administrative Contact Address3:[ ]*(?P<street3>.*)\n)?Administrative Contact City:[ ]*(?P<city>.*)\nAdministrative Contact State/Province:[ ]*(?P<state>.*)\nAdministrative Contact Postal Code:[ ]*(?P<postalcode>.*)\nAdministrative Contact Country:[ ]*(?P<country>.*)\nAdministrative Contact Country Code:[ ]*.*\nAdministrative Contact Phone Number:[ ]*(?P<phone>.*)\n(?:Administrative Contact Facsimile Number:[ ]*(?P<facsimile>.*)\n)?Administrative Contact Email:[ ]*(?P<email>.*)", # .US (NeuStar)
"Administrative Contact ID:(?P<handle>.*)\nAdministrative Contact Name:(?P<name>.*)\n(?:Administrative Contact Organization:(?P<organization>.*)\n)?Administrative Contact Address1:(?P<street1>.*)\n(?:Administrative Contact Address2:(?P<street2>.*)\n)?(?:Administrative Contact Address3:(?P<street3>.*)\n)?Administrative Contact City:(?P<city>.*)\n(?:Administrative Contact State/Province:(?P<state>.*)\n)?Administrative Contact Postal Code:(?P<postalcode>.*)\nAdministrative Contact Country:(?P<country>.*)\nAdministrative Contact Country Code:.*\nAdministrative Contact Phone Number:(?P<phone>.*)\n(?:Administrative Contact Facsimile Number:(?P<facsimile>.*)\n)?Administrative Contact Email:(?P<email>.*)", # .US, .biz (NeuStar)
"Admin Name[.]* (?P<name>.*)\n Admin Address[.]* (?P<street1>.*)\n Admin Address[.]* (?P<street2>.*)\n(?: Admin Address[.]* (?P<street3>.*)\n)? Admin Address[.]* (?P<city>.*)\n Admin Address[.]* (?P<postalcode>.*)\n Admin Address[.]* (?P<state>.*)\n Admin Address[.]* (?P<country>.*)\n Admin Email[.]* (?P<email>.*)\n Admin Phone[.]* (?P<phone>.*)\n Admin Fax[.]* (?P<fax>.*)", # Melbourne IT
"Administrative contact:\n(?: (?P<organization>.+)\n)? (?P<name>.+)\n (?P<email>.+)\n (?P<street>.+)\n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+)\n Phone: (?P<phone>.*)\n Fax: (?P<fax>.*)\n", # Fabulous.com
"admin-c-name:\s*(?P<name>.+)\nadmin-c-type:\s*(?P<type>.+)\nadmin-c-address:\s*(?P<street>.+)\nadmin-c-postcode:\s*(?P<postalcode>.+)\nadmin-c-city:\s*(?P<city>.+)\nadmin-c-country:\s*(?P<country>.+)\n(?:admin-c-phone:\s*(?P<phone>.+)\n)?(?:admin-c-email:\s*(?P<email>.+)\n)?", # Hetzner
@ -591,7 +591,7 @@ def parse_registrants(data):
" Billing Contact Details:[ ]*\n (?P<organization>.*)\n (?P<name>.*)[ ]{2,}\((?P<email>.*)\)\n (?P<street1>.*)\n(?: (?P<street2>.*)\n)?(?: (?P<street3>.*)\n)? (?P<city>.*)\n (?P<state>.*),(?P<postalcode>.*)\n (?P<country>.*)\n Tel. (?P<phone>.*)", # Whois.com
"billing-id:[ ]*(?P<handle>.*)\n(?:billing-organization:[ ]*(?P<organization>.*)\n)?billing-name:[ ]*(?P<name>.*)\nbilling-street:[ ]*(?P<street>.*)\nbilling-city:[ ]*(?P<city>.*)\nbilling-zip:[ ]*(?P<postalcode>.*)\nbilling-country:[ ]*(?P<country>.*)\n(?:billing-phone:[ ]*(?P<phone>.*)\n)?(?:billing-fax:[ ]*(?P<fax>.*)\n)?billing-email:[ ]*(?P<email>.*)", # InterNetworX
"Billing Contact:\n bill_org: (?P<organization>.*)\n bill_name: (?P<name>.*)\n bill_email: (?P<email>.*)\n bill_address: (?P<address>.*)\n bill_city: (?P<city>.*)\n bill_state: (?P<state>.*)\n bill_zip: (?P<postalcode>.*)\n bill_country: (?P<country>.*)\n bill_phone: (?P<phone>.*)", # Bellnames
"Billing Contact ID:[ ]*(?P<handle>.*)\nBilling Contact Name:[ ]*(?P<name>.*)\n(?:Billing Contact Organization:[ ]*(?P<organization>.*)\n)?Billing Contact Address1:[ ]*(?P<street1>.*)\n(?:Billing Contact Address2:[ ]*(?P<street2>.*)\n)?(?:Billing Contact Address3:[ ]*(?P<street3>.*)\n)?Billing Contact City:[ ]*(?P<city>.*)\nBilling Contact State/Province:[ ]*(?P<state>.*)\nBilling Contact Postal Code:[ ]*(?P<postalcode>.*)\nBilling Contact Country:[ ]*(?P<country>.*)\nBilling Contact Country Code:[ ]*.*\nBilling Contact Phone Number:[ ]*(?P<phone>.*)\n(?:Billing Contact Facsimile Number:[ ]*(?P<facsimile>.*)\n)?Billing Contact Email:[ ]*(?P<email>.*)", # .US (NeuStar)
"Billing Contact ID:(?P<handle>.*)\nBilling Contact Name:(?P<name>.*)\n(?:Billing Contact Organization:(?P<organization>.*)\n)?Billing Contact Address1:(?P<street1>.*)\n(?:Billing Contact Address2:(?P<street2>.*)\n)?(?:Billing Contact Address3:(?P<street3>.*)\n)?Billing Contact City:(?P<city>.*)\n(?:Billing Contact State/Province:(?P<state>.*)\n)?Billing Contact Postal Code:(?P<postalcode>.*)\nBilling Contact Country:(?P<country>.*)\nBilling Contact Country Code:.*\nBilling Contact Phone Number:(?P<phone>.*)\n(?:Billing Contact Facsimile Number:(?P<facsimile>.*)\n)?Billing Contact Email:(?P<email>.*)", # .US, .biz (NeuStar)
"Billing contact:\n(?: (?P<organization>.+)\n)? (?P<name>.+)\n (?P<email>.+)\n (?P<street>.+)\n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+)\n Phone: (?P<phone>.*)\n Fax: (?P<fax>.*)\n", # Fabulous.com
"Billing Contact Information :[ ]*\n[ ]+(?P<firstname>.*)\n[ ]+(?P<lastname>.*)\n[ ]+(?P<organization>.*)\n[ ]+(?P<email>.*)\n[ ]+(?P<street>.*)\n[ ]+(?P<city>.*)\n[ ]+(?P<postalcode>.*)\n[ ]+(?P<phone>.*)\n[ ]+(?P<fax>.*)\n\n", # GAL Communication
]

@ -0,0 +1,82 @@
Domain Name: DRPCIV.BIZ
Domain ID: D48726051-BIZ
Sponsoring Registrar: INTERNET.BS CORP.
Sponsoring Registrar IANA ID: 814
Registrar URL (registration services): www.internet.bs
Domain Status: clientTransferProhibited
Registrant ID: INTEJ39MZQIM27GY
Registrant Name: Domain Administrator
Registrant Organization: Fundacion Private Whois
Registrant Address1: Attn: drpciv.biz
Registrant Address2: Aptds. 0850-00056
Registrant City: Panama
Registrant Postal Code: Zona 15
Registrant Country: Panama
Registrant Country Code: PA
Registrant Phone Number: +507.65967959
Registrant Email: 522e20e76bmlbpe0@5225b4d0pi3627q9.privatewhois.net
Administrative Contact ID: INTEDIIYRYASW5MQ
Administrative Contact Name: Domain Administrator
Administrative Contact Organization: Fundacion Private Whois
Administrative Contact Address1: Attn: drpciv.biz
Administrative Contact Address2: Aptds. 0850-00056
Administrative Contact City: Panama
Administrative Contact Postal Code: Zona 15
Administrative Contact Country: Panama
Administrative Contact Country Code: PA
Administrative Contact Phone Number: +507.65967959
Administrative Contact Email: 522e20e76q1lbtbk@5225b4d0pi3627q9.privatewhois.net
Billing Contact ID: INTE9CPTNSAGCZVW
Billing Contact Name: Domain Administrator
Billing Contact Organization: Fundacion Private Whois
Billing Contact Address1: Attn: drpciv.biz
Billing Contact Address2: Aptds. 0850-00056
Billing Contact City: Panama
Billing Contact Postal Code: Zona 15
Billing Contact Country: Panama
Billing Contact Country Code: PA
Billing Contact Phone Number: +507.65995877
Billing Contact Email: 522e20e7hvddrqc3@5225b4d0pi3627q9.privatewhois.net
Technical Contact ID: INTEHQ98UIY8AG7R
Technical Contact Name: Domain Administrator
Technical Contact Organization: Fundacion Private Whois
Technical Contact Address1: Attn: drpciv.biz
Technical Contact Address2: Aptds. 0850-00056
Technical Contact City: Panama
Technical Contact Postal Code: Zona 15
Technical Contact Country: Panama
Technical Contact Country Code: PA
Technical Contact Phone Number: +507.65967959
Technical Contact Email: 522e20e7o2mhz6ui@5225b4d0pi3627q9.privatewhois.net
Name Server: HANK.NS.CLOUDFLARE.COM
Name Server: AMY.NS.CLOUDFLARE.COM
Created by Registrar: INTERNET.BS CORP.
Last Updated by Registrar: INTERNET.BS CORP.
Domain Registration Date: Fri Feb 03 15:34:57 GMT 2012
Domain Expiration Date: Mon Feb 02 23:59:59 GMT 2015
Domain Last Updated Date: Tue Jan 28 14:02:20 GMT 2014
>>>> Whois database was last updated on: Wed Jun 04 22:33:43 GMT 2014 <<<<
NeuStar, Inc., the Registry Operator for .BIZ, has collected this information
for the WHOIS database through an ICANN-Accredited Registrar. This information
is provided to you for informational purposes only and is designed to assist
persons in determining contents of a domain name registration record in the
NeuStar registry database. NeuStar makes this information available to you
"as is" and does not guarantee its accuracy. By submitting a WHOIS query, you
agree that you will use this data only for lawful purposes and that, under no
circumstances will you use this data: (1) to allow, enable, or otherwise
support the transmission of mass unsolicited, commercial advertising or
solicitations via direct mail, electronic mail, or by telephone; (2) in
contravention of any applicable data and privacy protection acts; or (3) to
enable high volume, automated, electronic processes that apply to the registry
(or its systems). Compilation, repackaging, dissemination, or other use of the
WHOIS database in its entirety, or of a substantial portion thereof, is not
allowed without NeuStar's prior written permission. NeuStar reserves the
right to modify or change these conditions at any time without prior or
subsequent notification of any kind. By executing this query, in any manner
whatsoever, you agree to abide by these terms.
NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE
OF THE AVAILABILITY OF A DOMAIN NAME.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save