diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index 66217d6..018fb61 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -222,6 +222,7 @@ def preprocess_regex(regex): "Registrant:\n registrant_org: (?P.*)\n registrant_name: (?P.*)\n registrant_email: (?P.*)\n registrant_address: (?P
.*)\n registrant_city: (?P.*)\n registrant_state: (?P.*)\n registrant_zip: (?P.*)\n registrant_country: (?P.*)\n registrant_phone: (?P.*)", # Bellnames "Holder of domain name:\n(?P[\S\s]+)\n(?P.+)\n(?P[A-Z0-9-]+)\s+(?P.+)\n(?P.+)\nContractual Language", # nic.ch "\n\n(?:Owner)?\s+: (?P.*)\n(?:\s+: (?P.*)\n)?\s+: (?P.*)\n\s+: (?P.*)\n\s+: (?P.*)\n\s+: (?P.*)\n", # nic.io + "\n\n(?:Owner)?\s+: (?P.*)\n(?:Owner)?(?:\s+: (?P.*)\n)(?:Owner)??\s+: (?P.*)\n(?:Owner)?\s+: (?P.*)\n(?:Owner)?\s+: (?P.*)\n(?:Owner)?\s+: (?P.*)\n", # nic.io format with multiple Owner: "Contact Information:\n\[Name\]\s*(?P.*)\n\[Email\]\s*(?P.*)\n\[Web Page\]\s*(?P.*)\n\[Postal code\]\s*(?P.*)\n\[Postal Address\]\s*(?P.*)\n(?:\s+(?P.*)\n)?(?:\s+(?P.*)\n)?\[Phone\]\s*(?P.*)\n\[Fax\]\s*(?P.*)\n", # jprs.jp "g\. \[Organization\] (?P.+)\n", # .co.jp registrations at jprs.jp "Registrant ID:(?P.*)\nRegistrant Name:(?P.*)\n(?:Registrant Organization:(?P.*)\n)?Registrant Address1:(?P.*)\n(?:Registrant Address2:(?P.*)\n)?(?:Registrant Address3:(?P.*)\n)?Registrant City:(?P.*)\n(?:Registrant State/Province:(?P.*)\n)?(?:Registrant Postal Code:(?P.*)\n)?Registrant Country:(?P.*)\nRegistrant Country Code:.*\nRegistrant Phone Number:(?P.*)\n(?:Registrant Facsimile Number:(?P.*)\n)?Registrant Email:(?P.*)", # .US, .biz (NeuStar), .buzz, .moe (Interlink Co. Ltd.) diff --git a/test/data/github.io b/test/data/github.io new file mode 100644 index 0000000..c699996 --- /dev/null +++ b/test/data/github.io @@ -0,0 +1,14 @@ +Status : Client Updt Lock +Expiration date : 2016-03-08 00:00:00 +Name server : ns1.p16.dynect.net +Name server : ns2.p16.dynect.net +Name server : ns3.p16.dynect.net +Name server : ns4.p16.dynect.net + +Registrant + Name : Domain Administrator + Organization : GitHub, Inc. + Street address : 548 4th Street + City : San Francisco + State / Province : California + Country : United States diff --git a/test/target_default/github.io b/test/target_default/github.io new file mode 100644 index 0000000..0497375 --- /dev/null +++ b/test/target_default/github.io @@ -0,0 +1 @@ +{"status": ["Client Updt Lock"], "expiration_date": ["2016-03-08T00:00:00"], "raw": ["Status : Client Updt Lock\nExpiration date : 2016-03-08 00:00:00\nName server : ns1.p16.dynect.net\nName server : ns2.p16.dynect.net\nName server : ns3.p16.dynect.net\nName server : ns4.p16.dynect.net\n\nRegistrant\n Name : Domain Administrator\n Organization : GitHub, Inc.\n Street address : 548 4th Street\n City : San Francisco\n State / Province : California\n Country : United States\n"], "contacts": {"admin": null, "tech": null, "registrant": null, "billing": null}} \ No newline at end of file diff --git a/test/target_normalized/github.io b/test/target_normalized/github.io new file mode 100644 index 0000000..0497375 --- /dev/null +++ b/test/target_normalized/github.io @@ -0,0 +1 @@ +{"status": ["Client Updt Lock"], "expiration_date": ["2016-03-08T00:00:00"], "raw": ["Status : Client Updt Lock\nExpiration date : 2016-03-08 00:00:00\nName server : ns1.p16.dynect.net\nName server : ns2.p16.dynect.net\nName server : ns3.p16.dynect.net\nName server : ns4.p16.dynect.net\n\nRegistrant\n Name : Domain Administrator\n Organization : GitHub, Inc.\n Street address : 548 4th Street\n City : San Francisco\n State / Province : California\n Country : United States\n"], "contacts": {"admin": null, "tech": null, "registrant": null, "billing": null}} \ No newline at end of file