From 95d3ef68f6f4f59d6a93da41905fdd19073a8d24 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Tue, 22 Jul 2014 00:05:32 +0200 Subject: [PATCH] Make 'state' an optional field for Realtime Register. --- pythonwhois/parse.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index 23da26b..2e123b7 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -247,7 +247,7 @@ registrant_regexes = [ " Registrant:\n (?P.+)\n (?P.+) (?P.+)\n (?P.*)\n (?P.*)\n (?P.*)\n (?P.+), (?P[^,\n]*)\n (?P.+)\n", # .com.tw (Western registrars) "Registrant:\n(?P.+)\n(?P.+)\n(?P.+?)(?:,+(?P.+?)(?:,+(?P.+?)(?:,+(?P.+?)(?:,+(?P.+?)(?:,+(?P.+?)(?:,+(?P.+?))?)?)?)?)?)?,(?P.+),(?P.+)\n\n Contact:\n (?P.+) (?P.+)\n TEL: (?P.+?)(?:(?:#|ext.?)(?P.+))?\n FAX: (?P.+)(?:(?:#|ext.?)(?P.+))?\n", # .com.tw (TWNIC/SEEDNET, Taiwanese companies only?) "Registrant Contact Information:\n\nCompany English Name \(It should be the same as the registered/corporation name on your Business Register Certificate or relevant documents\):(?P.+)\nCompany Chinese name:(?P.+)\nAddress: (?P.+)\nCountry: (?P.+)\nEmail: (?P.+)\n", # HKDNR (.hk) - "Registrant ID:(?P.+)\nRegistrant Name:(?P.*)\n(?:Registrant Organization:(?P.+)\n)?Registrant Street1:(?P.+?)\nRegistrant City:(?P.+)\nRegistrant State:(?P.+)\nRegistrant Postal Code:(?P.+)\nRegistrant Country:(?P[A-Z]+)\nRegistrant Phone:(?P.+?)\nRegistrant Fax:(?P.*)\nRegistrant Email:(?P.+)\n", # Realtime Register + "Registrant ID:(?P.+)\nRegistrant Name:(?P.*)\n(?:Registrant Organization:(?P.+)\n)?Registrant Street1:(?P.+?)\nRegistrant City:(?P.+)\nRegistrant State:(?P.*)\nRegistrant Postal Code:(?P.+)\nRegistrant Country:(?P[A-Z]+)\nRegistrant Phone:(?P.+?)\nRegistrant Fax:(?P.*)\nRegistrant Email:(?P.+)\n", # Realtime Register "owner:\s+(?P.+)", # .br "person:\s+(?P.+)", # nic.ru (person) "org:\s+(?P.+)", # nic.ru (organization) @@ -285,7 +285,7 @@ tech_contact_regexes = [ "Tech Contact: (?P.+)\n(?P.+)\n(?P.+)\n(?P.+)\n(?:(?P.+)\n)?(?P.+)\n(?P.+)\n(?P[A-Z]+)\n", # .co.th, format 6 " Technical Contact:\n (?P.+) (?P.+)\n (?P.*)\n (?P.*)\n", # .com.tw (Western registrars) "Technical Contact Information:\n\n(?:Given name: (?P.+)\n)?(?:Family name: (?P.+)\n)?(?:Company name: (?P.+)\n)?Address: (?P.+)\nCountry: (?P.+)\nPhone: (?P.*)\nFax: (?P.*)\nEmail: (?P.+)\n(?:Account Name: (?P.+)\n)?", # HKDNR (.hk) - "TECH ID:(?P.+)\nTECH Name:(?P.*)\nTECH Organization:(?P.*)\nTECH Street1:(?P.+?)\nTECH City:(?P.+)\nTECH State:(?P.+)\nTECH Postal Code:(?P.+)\nTECH Country:(?P[A-Z]+)\nTECH Phone:(?P.+?)\nTECH Fax:(?P.*)\nTECH Email:(?P.+)\n", # Realtime Register + "TECH ID:(?P.+)\nTECH Name:(?P.*)\nTECH Organization:(?P.*)\nTECH Street1:(?P.+?)\nTECH City:(?P.+)\nTECH State:(?P.*)\nTECH Postal Code:(?P.+)\nTECH Country:(?P[A-Z]+)\nTECH Phone:(?P.+?)\nTECH Fax:(?P.*)\nTECH Email:(?P.+)\n", # Realtime Register ] admin_contact_regexes = [ @@ -311,7 +311,7 @@ admin_contact_regexes = [ "\[Tech-C\]\nType: (?P.+)\nName: (?P.+)\n(Organisation: (?P.+)\n){0,1}(Address: (?P.+)\n){1}(Address: (?P.+)\n){0,1}(Address: (?P.+)\n){0,1}(Address: (?P.+)\n){0,1}PostalCode: (?P.+)\nCity: (?P.+)\nCountryCode: (?P[A-Za-z]{2})\nPhone: (?P.+)\nFax: (?P.+)\nEmail: (?P.+)\n(Remarks: (?P.+)\n){0,1}Changed: (?P.+)", # DeNIC " Administrative Contact:\n (?P.+) (?P.+)\n (?P.*)\n (?P.*)\n", # .com.tw (Western registrars) "Administrative Contact Information:\n\n(?:Given name: (?P.+)\n)?(?:Family name: (?P.+)\n)?(?:Company name: (?P.+)\n)?Address: (?P.+)\nCountry: (?P.+)\nPhone: (?P.*)\nFax: (?P.*)\nEmail: (?P.+)\n(?:Account Name: (?P.+)\n)?", # HKDNR (.hk) - "ADMIN ID:(?P.+)\nADMIN Name:(?P.*)\nADMIN Organization:(?P.*)\nADMIN Street1:(?P.+?)\nADMIN City:(?P.+)\nADMIN State:(?P.+)\nADMIN Postal Code:(?P.+)\nADMIN Country:(?P[A-Z]+)\nADMIN Phone:(?P.+?)\nADMIN Fax:(?P.*)\nADMIN Email:(?P.+)\n", # Realtime Register + "ADMIN ID:(?P.+)\nADMIN Name:(?P.*)\nADMIN Organization:(?P.*)\nADMIN Street1:(?P.+?)\nADMIN City:(?P.+)\nADMIN State:(?P.*)\nADMIN Postal Code:(?P.+)\nADMIN Country:(?P[A-Z]+)\nADMIN Phone:(?P.+?)\nADMIN Fax:(?P.*)\nADMIN Email:(?P.+)\n", # Realtime Register ] billing_contact_regexes = [ @@ -328,7 +328,7 @@ billing_contact_regexes = [ "Billing contact:\n(?: (?P.+)\n)? (?P.+)\n (?P.+)\n (?P.+)\n (?P.+), (?P.+) (?P.+) (?P.+)\n Phone: (?P.*)\n Fax: (?P.*)\n", # Fabulous.com "Billing Contact Information :[ ]*\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n\n", # GAL Communication "Billing Contact:\n Name: (?P.+)\n City: (?P.+)\n State: (?P.+)\n Country: (?P.+)\n", # Akky (.com.mx) - "BILLING ID:(?P.+)\nBILLING Name:(?P.*)\nBILLING Organization:(?P.*)\nBILLING Street1:(?P.+?)\nBILLING City:(?P.+)\nBILLING State:(?P.+)\nBILLING Postal Code:(?P.+)\nBILLING Country:(?P[A-Z]+)\nBILLING Phone:(?P.+?)\nBILLING Fax:(?P.*)\nBILLING Email:(?P.+)\n", # Realtime Register + "BILLING ID:(?P.+)\nBILLING Name:(?P.*)\nBILLING Organization:(?P.*)\nBILLING Street1:(?P.+?)\nBILLING City:(?P.+)\nBILLING State:(?P.*)\nBILLING Postal Code:(?P.+)\nBILLING Country:(?P[A-Z]+)\nBILLING Phone:(?P.+?)\nBILLING Fax:(?P.*)\nBILLING Email:(?P.+)\n", # Realtime Register ] # Some registries use NIC handle references instead of directly listing contacts...