From 05d148fa7f0c95e6182efdbed491386f9255e660 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 24 Nov 2013 09:34:58 +0100 Subject: [PATCH] Improved normalization --- pythonwhois/parse.py | 48 +++++++++++++++++++++++++------ test/target_normalized/huskeh.net | 2 +- test/target_normalized/nic.pw | 2 +- test/target_normalized/ovh.fr | 2 +- 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index 1874e76..c65067c 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -244,15 +244,13 @@ def normalize_data(data, normalized): else: contact[key] = [item.lower() for item in contact[key]] - for key in ("state", "country", "organization"): - if key in contact and contact[key] is not None and (normalized == True or key in normalized) and contact[key].isupper(): - if len(contact[key]) > 2: # Two letter values are usually abbreviations and need to be in uppercase - contact[key] = " ".join(word.capitalize() for word in contact[key].strip(", ").split(" ")) + for key in ("name", "street"): + if key in contact and contact[key] is not None and (normalized == True or key in normalized): + contact[key] = normalize_name(contact[key], abbreviation_threshold=3) - for key in ("name", "street", "city"): - if key in contact and contact[key] is not None and (normalized == True or key in normalized) and (contact[key].islower() or contact[key].isupper()): - if len(contact[key]) > 2: # Two letter values are usually abbreviations and need to be in original case - contact[key] = " ".join(word.capitalize() for word in contact[key].strip(", ").split(" ")) + for key in ("city", "organization", "state", "country"): + if key in contact and contact[key] is not None and (normalized == True or key in normalized): + contact[key] = normalize_name(contact[key], abbreviation_threshold=3, length_threshold=3) for key in contact.keys(): try: @@ -261,6 +259,40 @@ def normalize_data(data, normalized): pass # Not a string return data +def normalize_name(value, abbreviation_threshold=4, length_threshold=8): + normalized_lines = [] + for line in value.split("\n"): + line = line.strip(",") # Get rid of useless comma's + if (line.isupper() or line.islower()) and len(line) >= length_threshold: + # This line is likely not capitalized properly + words = line.split() + normalized_words = [] + if len(words) >= 1: + # First word + if len(words[0]) >= abbreviation_threshold and "." not in words[0]: + normalized_words.append(words[0].capitalize()) + else: + # Probably an abbreviation or domain, leave it alone + normalized_words.append(words[0]) + if len(words) >= 3: + # Words between the first and last + for word in words[1:-1]: + if len(word) >= abbreviation_threshold and "." not in word: + normalized_words.append(word.capitalize()) + else: + # Probably an abbreviation or domain, leave it alone + normalized_words.append(word) + if len(words) >= 2: + # Last word + if len(words[-1]) >= abbreviation_threshold and "." not in words[-1]: + normalized_words.append(words[-1].capitalize()) + else: + # Probably an abbreviation or domain, leave it alone + normalized_words.append(words[-1]) + line = " ".join(normalized_words) + normalized_lines.append(line) + return "\n".join(normalized_lines) + def parse_dates(dates): global grammar parsed_dates = [] diff --git a/test/target_normalized/huskeh.net b/test/target_normalized/huskeh.net index e8475be..149b0e4 100644 --- a/test/target_normalized/huskeh.net +++ b/test/target_normalized/huskeh.net @@ -1 +1 @@ -{"updated_date": ["2013-09-18T00:00:00"], "status": ["clientDeleteProhibited", "clientTransferProhibited"], "contacts": {"admin": {"city": "Roubaix Cedex 1", "name": "Poulton Sam", "phone": "+33.899498765", "street": "huskeh.net, office #5075960\nc/o OwO, BP80157", "country": "FR", "postalcode": "59053", "email": "mtv1ufny8x589jxnfcsx@c.o-w-o.info"}, "tech": {"city": "Roubaix Cedex 1", "name": "Poulton Sam", "phone": "+33.899498765", "street": "huskeh.net, office #5075960\nc/o OwO, BP80157", "country": "FR", "postalcode": "59053", "email": "mtv1ufny8x589jxnfcsx@c.o-w-o.info"}, "registrant": {"city": "Roubaix Cedex 1", "name": "Poulton Sam", "phone": "+33.899498765", "street": "huskeh.net, office #5075960\nc/o OwO, BP80157", "country": "FR", "postalcode": "59053", "email": "0vdudcszg7joly3irb2u@e.o-w-o.info"}, "billing": {"city": "Roubaix Cedex 1", "name": "Poulton Sam", "phone": "+33.899498765", "street": "huskeh.net, office #5075960\nc/o OwO, BP80157", "country": "FR", "postalcode": "59053", "email": "mtv1ufny8x589jxnfcsx@c.o-w-o.info"}}, "expiration_date": ["2014-09-29T00:00:00", "2014-09-29T00:00:00"], "id": null, "creation_date": ["2009-09-29T00:00:00", "2009-09-29T00:00:00"], "raw": ["###############################################################################\n#\n# Welcome to the OVH WHOIS Server.\n# \n# whois server : whois.ovh.com check server : check.ovh.com\n# \n# The data in this Whois is at your disposal with the aim of supplying you the\n# information only, that is helping you in the obtaining of the information\n# about or related to a domain name registration record. OVH Sas make this\n# information available \"as is\", and do not guarantee its accuracy. By using\n# Whois, you agree that you will use these data only for legal purposes and\n# that, under no circumstances will you use this data to: (1) Allow, enable,\n# or otherwise support the transmission of mass unsolicited, commercial\n# advertisement or roughly or requests via the individual mail (courier),\n# the E-mail (SPAM), by telephone or by fax. (2) Enable high volume, automated,\n# electronic processes that apply to OVH Sas (or its computer systems).\n# The copy, the compilation, the re-packaging, the dissemination or the\n# other use of the Whois base is expressly forbidden without the prior\n# written consent of OVH. Domain ownership disputes should be settled using\n# ICANN's Uniform Dispute Resolution Policy: http://www.icann.org/udrp/udrp.htm\n# We reserve the right to modify these terms at any time. By submitting\n# this query, you agree to abide by these terms. OVH Sas reserves the right\n# to terminate your access to the OVH Sas Whois database in its sole\n# discretion, including without limitation, for excessive querying of\n# the Whois database or for failure to otherwise abide by this policy.\n#\n# L'outil du Whois est \u00e0 votre disposition dans le but de vous fournir\n# l'information seulement, c'est-\u00e0-dire vous aider dans l'obtention de\n# l'information sur ou li\u00e9 \u00e0 un rapport d'enregistrement de nom de domaine.\n# OVH Sas rend cette information disponible \"comme est,\" et ne garanti pas\n# son exactitude. En utilisant notre outil Whois, vous reconnaissez que vous\n# emploierez ces donn\u00e9es seulement pour des buts l\u00e9gaux et ne pas utiliser cet\n# outil dans les buts suivant: (1) la transmission de publicit\u00e9 non sollicit\u00e9e,\n# commerciale massive ou en gros ou des sollicitations via courrier individuel,\n# le courrier \u00e9lectronique (c'est-\u00e0-dire SPAM), par t\u00e9l\u00e9phone ou par fax. (2)\n# l'utilisation d'un grand volume, automatis\u00e9 des processus \u00e9lectroniques qui\n# soulignent ou chargent ce syst\u00e8me de base de donn\u00e9es Whois vous fournissant\n# cette information. La copie de tout ou partie, la compilation, le\n# re-emballage, la diss\u00e9mination ou d'autre utilisation de la base Whois sont\n# express\u00e9ment interdits sans consentement \u00e9crit ant\u00e9rieur de OVH. Un d\u00e9saccord\n# sur la possession d'un nom de domaine peut \u00eatre r\u00e9solu en suivant la Uniform\n# Dispute Resolution Policy de l'ICANN: http://www.icann.org/udrp/udrp.htm\n# Nous nous r\u00e9servons le droit de modifier ces termes \u00e0 tout moment. En\n# soumettant une requ\u00eate au Whois vous consentez \u00e0 vous soumettre \u00e0 ces termes.\n\n# local time : Wednesday, 20-Nov-2013 09:27:14 CET\n# gmt time : Wednesday, 20-Nov-2013 08:27:14 GMT\n# last modify : Saturday, 12-Oct-2013 12:38:49 CEST\n# request from : 192.168.244.150:25929\n\nDomain name: huskeh.net\n\nRegistrant:\n Poulton Sam\n huskeh.net, office #5075960\n c/o OwO, BP80157\n 59053, Roubaix Cedex 1\n FR\n +33.899498765\n 0vdudcszg7joly3irb2u@e.o-w-o.info\n\nAdministrative Contact:\n Poulton Sam\n huskeh.net, office #5075960\n c/o OwO, BP80157\n 59053, Roubaix Cedex 1\n FR\n +33.899498765\n mtv1ufny8x589jxnfcsx@c.o-w-o.info\n\nTechnical Contact:\n Poulton Sam\n huskeh.net, office #5075960\n c/o OwO, BP80157\n 59053, Roubaix Cedex 1\n FR\n +33.899498765\n mtv1ufny8x589jxnfcsx@c.o-w-o.info\n\nBilling Contact:\n Poulton Sam\n huskeh.net, office #5075960\n c/o OwO, BP80157\n 59053, Roubaix Cedex 1\n FR\n +33.899498765\n mtv1ufny8x589jxnfcsx@c.o-w-o.info\n\nRegistrar of Record: OVH.\nRecord last updated on 2013-09-18.\nRecord expires on 2014-09-29.\nRecord created on 2009-09-29.\n\n###############################################################################\n# powered by GNU/Linux\n\n", "\nWhois Server Version 2.0\n\nDomain names in the .com and .net domains can now be registered\nwith many different competing registrars. Go to http://www.internic.net\nfor detailed information.\n\n Domain Name: HUSKEH.NET\n Registrar: OVH\n Whois Server: whois.ovh.com\n Referral URL: http://www.ovh.com\n Name Server: NS1.SLPHOSTS.CO.UK\n Name Server: NS2.SLPHOSTS.CO.UK\n Status: clientDeleteProhibited\n Status: clientTransferProhibited\n Updated Date: 18-sep-2013\n Creation Date: 29-sep-2009\n Expiration Date: 29-sep-2014\n\n>>> Last update of whois database: Wed, 20 Nov 2013 08:26:33 UTC <<<\n\nNOTICE: The expiration date displayed in this record is the date the \nregistrar's sponsorship of the domain name registration in the registry is \ncurrently set to expire. This date does not necessarily reflect the expiration \ndate of the domain name registrant's agreement with the sponsoring \nregistrar. Users may consult the sponsoring registrar's Whois database to \nview the registrar's reported date of expiration for this registration.\n\nTERMS OF USE: You are not authorized to access or query our Whois \ndatabase through the use of electronic processes that are high-volume and \nautomated except as reasonably necessary to register domain names or \nmodify existing registrations; the Data in VeriSign Global Registry \nServices' (\"VeriSign\") Whois database is provided by VeriSign for \ninformation purposes only, and to assist persons in obtaining information \nabout or related to a domain name registration record. VeriSign does not \nguarantee its accuracy. By submitting a Whois query, you agree to abide \nby the following terms of use: You agree that you may use this Data only \nfor lawful purposes and that under no circumstances will you use this Data \nto: (1) allow, enable, or otherwise support the transmission of mass \nunsolicited, commercial advertising or solicitations via e-mail, telephone, \nor facsimile; or (2) enable high volume, automated, electronic processes \nthat apply to VeriSign (or its computer systems). The compilation, \nrepackaging, dissemination or other use of this Data is expressly \nprohibited without the prior written consent of VeriSign. You agree not to \nuse electronic processes that are automated and high-volume to access or \nquery the Whois database except as reasonably necessary to register \ndomain names or modify existing registrations. VeriSign reserves the right \nto restrict your access to the Whois database in its sole discretion to ensure \noperational stability. VeriSign may restrict or terminate your access to the \nWhois database for failure to abide by these terms of use. VeriSign \nreserves the right to modify these terms at any time. \n\nThe Registry database contains ONLY .COM, .NET, .EDU domains and\nRegistrars.\n"], "whois_server": ["whois.ovh.com"], "registrar": ["Ovh."], "name_servers": ["ns1.slphosts.co.uk", "ns2.slphosts.co.uk"], "emails": []} \ No newline at end of file +{"updated_date": ["2013-09-18T00:00:00"], "status": ["clientDeleteProhibited", "clientTransferProhibited"], "contacts": {"admin": {"city": "Roubaix Cedex 1", "name": "Poulton Sam", "phone": "+33.899498765", "street": "huskeh.net, Office #5075960\nc/o OwO, BP80157", "country": "FR", "postalcode": "59053", "email": "mtv1ufny8x589jxnfcsx@c.o-w-o.info"}, "tech": {"city": "Roubaix Cedex 1", "name": "Poulton Sam", "phone": "+33.899498765", "street": "huskeh.net, Office #5075960\nc/o OwO, BP80157", "country": "FR", "postalcode": "59053", "email": "mtv1ufny8x589jxnfcsx@c.o-w-o.info"}, "registrant": {"city": "Roubaix Cedex 1", "name": "Poulton Sam", "phone": "+33.899498765", "street": "huskeh.net, Office #5075960\nc/o OwO, BP80157", "country": "FR", "postalcode": "59053", "email": "0vdudcszg7joly3irb2u@e.o-w-o.info"}, "billing": {"city": "Roubaix Cedex 1", "name": "Poulton Sam", "phone": "+33.899498765", "street": "huskeh.net, Office #5075960\nc/o OwO, BP80157", "country": "FR", "postalcode": "59053", "email": "mtv1ufny8x589jxnfcsx@c.o-w-o.info"}}, "expiration_date": ["2014-09-29T00:00:00", "2014-09-29T00:00:00"], "id": null, "creation_date": ["2009-09-29T00:00:00", "2009-09-29T00:00:00"], "raw": ["###############################################################################\n#\n# Welcome to the OVH WHOIS Server.\n# \n# whois server : whois.ovh.com check server : check.ovh.com\n# \n# The data in this Whois is at your disposal with the aim of supplying you the\n# information only, that is helping you in the obtaining of the information\n# about or related to a domain name registration record. OVH Sas make this\n# information available \"as is\", and do not guarantee its accuracy. By using\n# Whois, you agree that you will use these data only for legal purposes and\n# that, under no circumstances will you use this data to: (1) Allow, enable,\n# or otherwise support the transmission of mass unsolicited, commercial\n# advertisement or roughly or requests via the individual mail (courier),\n# the E-mail (SPAM), by telephone or by fax. (2) Enable high volume, automated,\n# electronic processes that apply to OVH Sas (or its computer systems).\n# The copy, the compilation, the re-packaging, the dissemination or the\n# other use of the Whois base is expressly forbidden without the prior\n# written consent of OVH. Domain ownership disputes should be settled using\n# ICANN's Uniform Dispute Resolution Policy: http://www.icann.org/udrp/udrp.htm\n# We reserve the right to modify these terms at any time. By submitting\n# this query, you agree to abide by these terms. OVH Sas reserves the right\n# to terminate your access to the OVH Sas Whois database in its sole\n# discretion, including without limitation, for excessive querying of\n# the Whois database or for failure to otherwise abide by this policy.\n#\n# L'outil du Whois est \u00e0 votre disposition dans le but de vous fournir\n# l'information seulement, c'est-\u00e0-dire vous aider dans l'obtention de\n# l'information sur ou li\u00e9 \u00e0 un rapport d'enregistrement de nom de domaine.\n# OVH Sas rend cette information disponible \"comme est,\" et ne garanti pas\n# son exactitude. En utilisant notre outil Whois, vous reconnaissez que vous\n# emploierez ces donn\u00e9es seulement pour des buts l\u00e9gaux et ne pas utiliser cet\n# outil dans les buts suivant: (1) la transmission de publicit\u00e9 non sollicit\u00e9e,\n# commerciale massive ou en gros ou des sollicitations via courrier individuel,\n# le courrier \u00e9lectronique (c'est-\u00e0-dire SPAM), par t\u00e9l\u00e9phone ou par fax. (2)\n# l'utilisation d'un grand volume, automatis\u00e9 des processus \u00e9lectroniques qui\n# soulignent ou chargent ce syst\u00e8me de base de donn\u00e9es Whois vous fournissant\n# cette information. La copie de tout ou partie, la compilation, le\n# re-emballage, la diss\u00e9mination ou d'autre utilisation de la base Whois sont\n# express\u00e9ment interdits sans consentement \u00e9crit ant\u00e9rieur de OVH. Un d\u00e9saccord\n# sur la possession d'un nom de domaine peut \u00eatre r\u00e9solu en suivant la Uniform\n# Dispute Resolution Policy de l'ICANN: http://www.icann.org/udrp/udrp.htm\n# Nous nous r\u00e9servons le droit de modifier ces termes \u00e0 tout moment. En\n# soumettant une requ\u00eate au Whois vous consentez \u00e0 vous soumettre \u00e0 ces termes.\n\n# local time : Wednesday, 20-Nov-2013 09:27:14 CET\n# gmt time : Wednesday, 20-Nov-2013 08:27:14 GMT\n# last modify : Saturday, 12-Oct-2013 12:38:49 CEST\n# request from : 192.168.244.150:25929\n\nDomain name: huskeh.net\n\nRegistrant:\n Poulton Sam\n huskeh.net, office #5075960\n c/o OwO, BP80157\n 59053, Roubaix Cedex 1\n FR\n +33.899498765\n 0vdudcszg7joly3irb2u@e.o-w-o.info\n\nAdministrative Contact:\n Poulton Sam\n huskeh.net, office #5075960\n c/o OwO, BP80157\n 59053, Roubaix Cedex 1\n FR\n +33.899498765\n mtv1ufny8x589jxnfcsx@c.o-w-o.info\n\nTechnical Contact:\n Poulton Sam\n huskeh.net, office #5075960\n c/o OwO, BP80157\n 59053, Roubaix Cedex 1\n FR\n +33.899498765\n mtv1ufny8x589jxnfcsx@c.o-w-o.info\n\nBilling Contact:\n Poulton Sam\n huskeh.net, office #5075960\n c/o OwO, BP80157\n 59053, Roubaix Cedex 1\n FR\n +33.899498765\n mtv1ufny8x589jxnfcsx@c.o-w-o.info\n\nRegistrar of Record: OVH.\nRecord last updated on 2013-09-18.\nRecord expires on 2014-09-29.\nRecord created on 2009-09-29.\n\n###############################################################################\n# powered by GNU/Linux\n\n", "\nWhois Server Version 2.0\n\nDomain names in the .com and .net domains can now be registered\nwith many different competing registrars. Go to http://www.internic.net\nfor detailed information.\n\n Domain Name: HUSKEH.NET\n Registrar: OVH\n Whois Server: whois.ovh.com\n Referral URL: http://www.ovh.com\n Name Server: NS1.SLPHOSTS.CO.UK\n Name Server: NS2.SLPHOSTS.CO.UK\n Status: clientDeleteProhibited\n Status: clientTransferProhibited\n Updated Date: 18-sep-2013\n Creation Date: 29-sep-2009\n Expiration Date: 29-sep-2014\n\n>>> Last update of whois database: Wed, 20 Nov 2013 08:26:33 UTC <<<\n\nNOTICE: The expiration date displayed in this record is the date the \nregistrar's sponsorship of the domain name registration in the registry is \ncurrently set to expire. This date does not necessarily reflect the expiration \ndate of the domain name registrant's agreement with the sponsoring \nregistrar. Users may consult the sponsoring registrar's Whois database to \nview the registrar's reported date of expiration for this registration.\n\nTERMS OF USE: You are not authorized to access or query our Whois \ndatabase through the use of electronic processes that are high-volume and \nautomated except as reasonably necessary to register domain names or \nmodify existing registrations; the Data in VeriSign Global Registry \nServices' (\"VeriSign\") Whois database is provided by VeriSign for \ninformation purposes only, and to assist persons in obtaining information \nabout or related to a domain name registration record. VeriSign does not \nguarantee its accuracy. By submitting a Whois query, you agree to abide \nby the following terms of use: You agree that you may use this Data only \nfor lawful purposes and that under no circumstances will you use this Data \nto: (1) allow, enable, or otherwise support the transmission of mass \nunsolicited, commercial advertising or solicitations via e-mail, telephone, \nor facsimile; or (2) enable high volume, automated, electronic processes \nthat apply to VeriSign (or its computer systems). The compilation, \nrepackaging, dissemination or other use of this Data is expressly \nprohibited without the prior written consent of VeriSign. You agree not to \nuse electronic processes that are automated and high-volume to access or \nquery the Whois database except as reasonably necessary to register \ndomain names or modify existing registrations. VeriSign reserves the right \nto restrict your access to the Whois database in its sole discretion to ensure \noperational stability. VeriSign may restrict or terminate your access to the \nWhois database for failure to abide by these terms of use. VeriSign \nreserves the right to modify these terms at any time. \n\nThe Registry database contains ONLY .COM, .NET, .EDU domains and\nRegistrars.\n"], "whois_server": ["whois.ovh.com"], "registrar": ["Ovh."], "name_servers": ["ns1.slphosts.co.uk", "ns2.slphosts.co.uk"], "emails": []} \ No newline at end of file diff --git a/test/target_normalized/nic.pw b/test/target_normalized/nic.pw index 810cd64..cce94c4 100644 --- a/test/target_normalized/nic.pw +++ b/test/target_normalized/nic.pw @@ -1 +1 @@ -{"status": ["OK"], "updated_date": ["2013-04-30T15:06:57"], "contacts": {"admin": {"city": "N/a", "handle": "H2661317", "name": "Registry Manager", "state": "N/a", "street": "N/a", "country": "PW", "postalcode": "N/A", "organization": ".PW Registry", "email": "contact@registry.pw"}, "tech": {"city": "N/a", "handle": "H2661317", "name": "Registry Manager", "state": "N/a", "street": "N/a", "country": "PW", "postalcode": "N/A", "organization": ".PW Registry", "email": "contact@registry.pw"}, "registrant": {"city": "N/a", "handle": "H2661317", "name": "Registry Manager", "state": "N/a", "street": "N/a", "country": "PW", "postalcode": "N/A", "organization": ".PW Registry", "email": "contact@registry.pw"}, "billing": {"city": "N/a", "handle": "H2661317", "name": "Registry Manager", "state": "N/a", "street": "N/a", "country": "PW", "postalcode": "N/A", "organization": ".PW Registry", "email": "contact@registry.pw"}}, "expiration_date": ["2020-01-01T23:59:59"], "emails": [], "raw": ["This whois service is provided by CentralNic Ltd and only contains\ninformation pertaining to Internet domain names we have registered for\nour customers. By using this service you are agreeing (1) not to use any\ninformation presented here for any purpose other than determining\nownership of domain names, (2) not to store or reproduce this data in \nany way, (3) not to use any high-volume, automated, electronic processes\nto obtain data from this service. Abuse of this service is monitored and\nactions in contravention of these terms will result in being permanently\nblacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/\n\nDomain ID:CNIC-DO949898\nDomain Name:NIC.PW\nCreated On:2012-10-12T10:19:46.0Z\nLast Updated On:2013-04-30T15:06:57.0Z\nExpiration Date:2020-01-01T23:59:59.0Z\nStatus:OK\nRegistrant ID:H2661317\nRegistrant Name:Registry Manager\nRegistrant Organization:.PW Registry\nRegistrant Street1:N/A\nRegistrant City:N/A\nRegistrant State/Province:N/A\nRegistrant Postal Code:N/A\nRegistrant Country:PW\nRegistrant Phone:\nRegistrant Email:contact@registry.pw\nAdmin ID:H2661317\nAdmin Name:Registry Manager\nAdmin Organization:.PW Registry\nAdmin Street1:N/A\nAdmin City:N/A\nAdmin State/Province:N/A\nAdmin Postal Code:N/A\nAdmin Country:PW\nAdmin Phone:\nAdmin Email:contact@registry.pw\nTech ID:H2661317\nTech Name:Registry Manager\nTech Organization:.PW Registry\nTech Street1:N/A\nTech City:N/A\nTech State/Province:N/A\nTech Postal Code:N/A\nTech Country:PW\nTech Phone:\nTech Email:contact@registry.pw\nBilling ID:H2661317\nBilling Name:Registry Manager\nBilling Organization:.PW Registry\nBilling Street1:N/A\nBilling City:N/A\nBilling State/Province:N/A\nBilling Postal Code:N/A\nBilling Country:PW\nBilling Phone:\nBilling Email:contact@registry.pw\nSponsoring Registrar ID:H2661317\nSponsoring Registrar Organization:.PW Registry\nSponsoring Registrar Street1:N/A\nSponsoring Registrar City:N/A\nSponsoring Registrar State/Province:N/A\nSponsoring Registrar Postal Code:N/A\nSponsoring Registrar Country:PW\nSponsoring Registrar Phone:N/A\nSponsoring Registrar Website:http://www.registry.pw\nName Server:NS0.CENTRALNIC-DNS.COM\nName Server:NS1.CENTRALNIC-DNS.COM\nName Server:NS2.CENTRALNIC-DNS.COM\nName Server:NS3.CENTRALNIC-DNS.COM\nName Server:NS4.CENTRALNIC-DNS.COM\nName Server:NS5.CENTRALNIC-DNS.COM\nDNSSEC:Unsigned\n\n\n\n"], "whois_server": null, "registrar": [".PW Registry"], "name_servers": ["ns0.centralnic-dns.com", "ns1.centralnic-dns.com", "ns2.centralnic-dns.com", "ns3.centralnic-dns.com", "ns4.centralnic-dns.com", "ns5.centralnic-dns.com"], "creation_date": ["2012-10-12T10:19:46", "2012-10-12T10:19:46", "2012-10-12T10:19:46"], "id": ["CNIC-DO949898"]} \ No newline at end of file +{"status": ["OK"], "updated_date": ["2013-04-30T15:06:57"], "contacts": {"admin": {"city": "N/a", "handle": "H2661317", "name": "Registry Manager", "state": "N/a", "street": "N/A", "country": "PW", "postalcode": "N/A", "organization": ".PW Registry", "email": "contact@registry.pw"}, "tech": {"city": "N/a", "handle": "H2661317", "name": "Registry Manager", "state": "N/a", "street": "N/A", "country": "PW", "postalcode": "N/A", "organization": ".PW Registry", "email": "contact@registry.pw"}, "registrant": {"city": "N/a", "handle": "H2661317", "name": "Registry Manager", "state": "N/a", "street": "N/A", "country": "PW", "postalcode": "N/A", "organization": ".PW Registry", "email": "contact@registry.pw"}, "billing": {"city": "N/a", "handle": "H2661317", "name": "Registry Manager", "state": "N/a", "street": "N/A", "country": "PW", "postalcode": "N/A", "organization": ".PW Registry", "email": "contact@registry.pw"}}, "expiration_date": ["2020-01-01T23:59:59"], "emails": [], "raw": ["This whois service is provided by CentralNic Ltd and only contains\ninformation pertaining to Internet domain names we have registered for\nour customers. By using this service you are agreeing (1) not to use any\ninformation presented here for any purpose other than determining\nownership of domain names, (2) not to store or reproduce this data in \nany way, (3) not to use any high-volume, automated, electronic processes\nto obtain data from this service. Abuse of this service is monitored and\nactions in contravention of these terms will result in being permanently\nblacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/\n\nDomain ID:CNIC-DO949898\nDomain Name:NIC.PW\nCreated On:2012-10-12T10:19:46.0Z\nLast Updated On:2013-04-30T15:06:57.0Z\nExpiration Date:2020-01-01T23:59:59.0Z\nStatus:OK\nRegistrant ID:H2661317\nRegistrant Name:Registry Manager\nRegistrant Organization:.PW Registry\nRegistrant Street1:N/A\nRegistrant City:N/A\nRegistrant State/Province:N/A\nRegistrant Postal Code:N/A\nRegistrant Country:PW\nRegistrant Phone:\nRegistrant Email:contact@registry.pw\nAdmin ID:H2661317\nAdmin Name:Registry Manager\nAdmin Organization:.PW Registry\nAdmin Street1:N/A\nAdmin City:N/A\nAdmin State/Province:N/A\nAdmin Postal Code:N/A\nAdmin Country:PW\nAdmin Phone:\nAdmin Email:contact@registry.pw\nTech ID:H2661317\nTech Name:Registry Manager\nTech Organization:.PW Registry\nTech Street1:N/A\nTech City:N/A\nTech State/Province:N/A\nTech Postal Code:N/A\nTech Country:PW\nTech Phone:\nTech Email:contact@registry.pw\nBilling ID:H2661317\nBilling Name:Registry Manager\nBilling Organization:.PW Registry\nBilling Street1:N/A\nBilling City:N/A\nBilling State/Province:N/A\nBilling Postal Code:N/A\nBilling Country:PW\nBilling Phone:\nBilling Email:contact@registry.pw\nSponsoring Registrar ID:H2661317\nSponsoring Registrar Organization:.PW Registry\nSponsoring Registrar Street1:N/A\nSponsoring Registrar City:N/A\nSponsoring Registrar State/Province:N/A\nSponsoring Registrar Postal Code:N/A\nSponsoring Registrar Country:PW\nSponsoring Registrar Phone:N/A\nSponsoring Registrar Website:http://www.registry.pw\nName Server:NS0.CENTRALNIC-DNS.COM\nName Server:NS1.CENTRALNIC-DNS.COM\nName Server:NS2.CENTRALNIC-DNS.COM\nName Server:NS3.CENTRALNIC-DNS.COM\nName Server:NS4.CENTRALNIC-DNS.COM\nName Server:NS5.CENTRALNIC-DNS.COM\nDNSSEC:Unsigned\n\n\n\n"], "whois_server": null, "registrar": [".PW Registry"], "name_servers": ["ns0.centralnic-dns.com", "ns1.centralnic-dns.com", "ns2.centralnic-dns.com", "ns3.centralnic-dns.com", "ns4.centralnic-dns.com", "ns5.centralnic-dns.com"], "creation_date": ["2012-10-12T10:19:46", "2012-10-12T10:19:46", "2012-10-12T10:19:46"], "id": ["CNIC-DO949898"]} \ No newline at end of file diff --git a/test/target_normalized/ovh.fr b/test/target_normalized/ovh.fr index 11ebe02..fcf7193 100644 --- a/test/target_normalized/ovh.fr +++ b/test/target_normalized/ovh.fr @@ -1 +1 @@ -{"status": ["Active", "ok"], "updated_date": ["2006-10-11T00:00:00", "2013-10-28T00:00:00", "2009-04-03T00:00:00"], "contacts": {"admin": {"fax": "+33 3 20 20 09 58", "handle": "OK62-FRNIC", "phone": "+33 3 20 20 09 57", "street": "Sarl Ovh\n140, quai du Sartel", "postalcode": "59100", "city": "Roubaix", "name": "Octave Klaba", "country": "FR", "type": "PERSON", "changedate": "2009-04-03T00:00:00"}, "tech": {"handle": "OVH5-FRNIC", "phone": "+33 8 99 70 17 61", "street": "OVH\n140, quai du Sartel", "postalcode": "59100", "city": "Roubaix", "name": "Ovh Net", "country": "FR", "type": "ROLE", "email": "tech@ovh.net", "changedate": "2006-10-11T00:00:00"}, "registrant": {"fax": "+33 3 20 20 09 58", "handle": "SO255-FRNIC", "phone": "+33 8 99 70 17 61", "street": "140, Quai Du Sartel", "postalcode": "59100", "city": "Roubaix", "name": "Ovh Sas", "country": "FR", "type": "ORGANIZATION", "email": "oles@ovh.net", "changedate": "2013-10-28T00:00:00"}, "billing": null}, "expiration_date": null, "id": null, "creation_date": ["1999-11-12T00:00:00", "1999-10-21T00:00:00"], "raw": ["%%\n%% This is the AFNIC Whois server.\n%%\n%% complete date format : DD/MM/YYYY\n%% short date format : DD/MM\n%% version : FRNIC-2.5\n%%\n%% Rights restricted by copyright.\n%% See http://www.afnic.fr/afnic/web/mentions-legales-whois_en\n%%\n%% Use '-h' option to obtain more information about this service.\n%%\n%% [77.162.55.23 REQUEST] >> -V Md5.0 ovh.fr\n%%\n%% RL Net [##########] - RL IP [#########.]\n%%\n\ndomain: ovh.fr\nstatus: ACTIVE\nhold: NO\nholder-c: SO255-FRNIC\nadmin-c: OK62-FRNIC\ntech-c: OVH5-FRNIC\nzone-c: NFC1-FRNIC\nnsl-id: NSL16790-FRNIC\nregistrar: OVH\nanniversary: 12/11\ncreated: 12/11/1999\nlast-update: 03/04/2009\nsource: FRNIC\n\nns-list: NSL16790-FRNIC\nnserver: dns.ovh.net\nnserver: dns10.ovh.net\nnserver: ns.ovh.net\nnserver: ns10.ovh.net\nsource: FRNIC\n\nregistrar: OVH\ntype: Isp Option 1\naddress: 2 Rue Kellermann\naddress: ROUBAIX\ncountry: FR\nphone: +33 8 99 70 17 61\nfax-no: +33 3 20 20 09 58\ne-mail: support@ovh.net\nwebsite: http://www.ovh.com\nanonymous: NO\nregistered: 21/10/1999\nsource: FRNIC\n\nnic-hdl: OVH5-FRNIC\ntype: ROLE\ncontact: OVH NET\naddress: OVH\naddress: 140, quai du Sartel\naddress: 59100 Roubaix\ncountry: FR\nphone: +33 8 99 70 17 61\ne-mail: tech@ovh.net\ntrouble: Information: http://www.ovh.fr\ntrouble: Questions: mailto:tech@ovh.net\ntrouble: Spam: mailto:abuse@ovh.net\nadmin-c: OK217-FRNIC\ntech-c: OK217-FRNIC\nnotify: tech@ovh.net\nregistrar: OVH\nchanged: 11/10/2006 tech@ovh.net\nanonymous: NO\nobsoleted: NO\nsource: FRNIC\n\nnic-hdl: SO255-FRNIC\ntype: ORGANIZATION\ncontact: OVH SAS\naddress: 140, quai du sartel\naddress: 59100 Roubaix\ncountry: FR\nphone: +33 8 99 70 17 61\nfax-no: +33 3 20 20 09 58\ne-mail: oles@ovh.net\nregistrar: OVH\nchanged: 28/10/2013 nic@nic.fr\nanonymous: NO\nobsoleted: NO\neligstatus: ok\neligdate: 01/09/2011 12:03:35\nsource: FRNIC\n\nnic-hdl: OK62-FRNIC\ntype: PERSON\ncontact: Octave Klaba\naddress: Sarl Ovh\naddress: 140, quai du Sartel\naddress: 59100 Roubaix\ncountry: FR\nphone: +33 3 20 20 09 57\nfax-no: +33 3 20 20 09 58\nregistrar: OVH\nchanged: 03/04/2009 nic@nic.fr\nanonymous: NO\nobsoleted: NO\nsource: FRNIC\n"], "whois_server": null, "registrar": ["OVH"], "name_servers": ["dns.ovh.net", "dns10.ovh.net", "ns.ovh.net", "ns10.ovh.net"], "emails": ["support@ovh.net", "abuse@ovh.net", "nic@nic.fr"]} \ No newline at end of file +{"status": ["Active", "ok"], "updated_date": ["2006-10-11T00:00:00", "2013-10-28T00:00:00", "2009-04-03T00:00:00"], "contacts": {"admin": {"fax": "+33 3 20 20 09 58", "handle": "OK62-FRNIC", "phone": "+33 3 20 20 09 57", "street": "Sarl Ovh\n140, quai du Sartel", "postalcode": "59100", "city": "Roubaix", "name": "Octave Klaba", "country": "FR", "type": "PERSON", "changedate": "2009-04-03T00:00:00"}, "tech": {"handle": "OVH5-FRNIC", "phone": "+33 8 99 70 17 61", "street": "OVH\n140, quai du Sartel", "postalcode": "59100", "city": "Roubaix", "name": "OVH NET", "country": "FR", "type": "ROLE", "email": "tech@ovh.net", "changedate": "2006-10-11T00:00:00"}, "registrant": {"fax": "+33 3 20 20 09 58", "handle": "SO255-FRNIC", "phone": "+33 8 99 70 17 61", "street": "140, Quai du Sartel", "postalcode": "59100", "city": "Roubaix", "name": "OVH SAS", "country": "FR", "type": "ORGANIZATION", "email": "oles@ovh.net", "changedate": "2013-10-28T00:00:00"}, "billing": null}, "expiration_date": null, "id": null, "creation_date": ["1999-11-12T00:00:00", "1999-10-21T00:00:00"], "raw": ["%%\n%% This is the AFNIC Whois server.\n%%\n%% complete date format : DD/MM/YYYY\n%% short date format : DD/MM\n%% version : FRNIC-2.5\n%%\n%% Rights restricted by copyright.\n%% See http://www.afnic.fr/afnic/web/mentions-legales-whois_en\n%%\n%% Use '-h' option to obtain more information about this service.\n%%\n%% [77.162.55.23 REQUEST] >> -V Md5.0 ovh.fr\n%%\n%% RL Net [##########] - RL IP [#########.]\n%%\n\ndomain: ovh.fr\nstatus: ACTIVE\nhold: NO\nholder-c: SO255-FRNIC\nadmin-c: OK62-FRNIC\ntech-c: OVH5-FRNIC\nzone-c: NFC1-FRNIC\nnsl-id: NSL16790-FRNIC\nregistrar: OVH\nanniversary: 12/11\ncreated: 12/11/1999\nlast-update: 03/04/2009\nsource: FRNIC\n\nns-list: NSL16790-FRNIC\nnserver: dns.ovh.net\nnserver: dns10.ovh.net\nnserver: ns.ovh.net\nnserver: ns10.ovh.net\nsource: FRNIC\n\nregistrar: OVH\ntype: Isp Option 1\naddress: 2 Rue Kellermann\naddress: ROUBAIX\ncountry: FR\nphone: +33 8 99 70 17 61\nfax-no: +33 3 20 20 09 58\ne-mail: support@ovh.net\nwebsite: http://www.ovh.com\nanonymous: NO\nregistered: 21/10/1999\nsource: FRNIC\n\nnic-hdl: OVH5-FRNIC\ntype: ROLE\ncontact: OVH NET\naddress: OVH\naddress: 140, quai du Sartel\naddress: 59100 Roubaix\ncountry: FR\nphone: +33 8 99 70 17 61\ne-mail: tech@ovh.net\ntrouble: Information: http://www.ovh.fr\ntrouble: Questions: mailto:tech@ovh.net\ntrouble: Spam: mailto:abuse@ovh.net\nadmin-c: OK217-FRNIC\ntech-c: OK217-FRNIC\nnotify: tech@ovh.net\nregistrar: OVH\nchanged: 11/10/2006 tech@ovh.net\nanonymous: NO\nobsoleted: NO\nsource: FRNIC\n\nnic-hdl: SO255-FRNIC\ntype: ORGANIZATION\ncontact: OVH SAS\naddress: 140, quai du sartel\naddress: 59100 Roubaix\ncountry: FR\nphone: +33 8 99 70 17 61\nfax-no: +33 3 20 20 09 58\ne-mail: oles@ovh.net\nregistrar: OVH\nchanged: 28/10/2013 nic@nic.fr\nanonymous: NO\nobsoleted: NO\neligstatus: ok\neligdate: 01/09/2011 12:03:35\nsource: FRNIC\n\nnic-hdl: OK62-FRNIC\ntype: PERSON\ncontact: Octave Klaba\naddress: Sarl Ovh\naddress: 140, quai du Sartel\naddress: 59100 Roubaix\ncountry: FR\nphone: +33 3 20 20 09 57\nfax-no: +33 3 20 20 09 58\nregistrar: OVH\nchanged: 03/04/2009 nic@nic.fr\nanonymous: NO\nobsoleted: NO\nsource: FRNIC\n"], "whois_server": null, "registrar": ["OVH"], "name_servers": ["dns.ovh.net", "dns10.ovh.net", "ns.ovh.net", "ns10.ovh.net"], "emails": ["support@ovh.net", "abuse@ovh.net", "nic@nic.fr"]} \ No newline at end of file