diff --git a/whois/_2_parse.py b/whois/_2_parse.py index 7f7931d..ab0f883 100644 --- a/whois/_2_parse.py +++ b/whois/_2_parse.py @@ -123,7 +123,9 @@ def handleShortResponse( # NOTE: from here s is lowercase only # --------------------------------- noneStrings = [ + "no matching record", "not found", + "no data found", "no entries found", "status: free", "no such domain", diff --git a/whois/__init__.py b/whois/__init__.py index 86c4ca7..6a237ad 100644 --- a/whois/__init__.py +++ b/whois/__init__.py @@ -46,6 +46,12 @@ SLOW_DOWN = 0 Map2Underscore = { + ".co.za": "co_za", # south africa + ".web.za": "web_za", # south africa + ".org.za": "org_za", # south africa + ".net.za": "net_za", # south africa + # + ".com.eg": "com_eg", # egypt ".ac.uk": "ac_uk", ".co.uk": "co_uk", ".co.il": "co_il", @@ -83,6 +89,8 @@ ".net.tr": "net_tr", # ".edu.ua": "edu_ua", + ".com.ua": "com_ua", + ".net.ua": "net_ua", ".lviv.ua": "lviv_ua", # dynamic dns without whois ".hopto.org": "hopto_org", diff --git a/whois/tld_regexpr.py b/whois/tld_regexpr.py index 01d2dcc..6ac9a1a 100644 --- a/whois/tld_regexpr.py +++ b/whois/tld_regexpr.py @@ -368,7 +368,7 @@ download = { "extend": "amsterdam", - "name_servers": r"Name Server:[ \t]+(\S+)", # fix needed after strip(\r) in _2_parse.py in version 0.19 + "name_servers": r"Name Server:[ \t]+(\S+)", # fix needed after strip(\r) in _2_parse.py in version 0.19 "status": r"Domain Status:\s*([a-zA-z]+)", } @@ -676,7 +676,7 @@ "extend": "biz", "creation_date": r"Creation Date:\s?(.+)", "expiration_date": r"Expiry Date:\s?(.+)", - "updated_date": r"Updated Date:\s?(.+)", + "updated_date": None, # some entries have no date string but not always "name_servers": r"Name Server:\s*(\S+)\r?\n", "status": r"Domain Status:\s?(.+)", } @@ -957,12 +957,10 @@ "creation_date": r"Creation Date:\s?(.+)", "expiration_date": r"Expiration Date:\s?(.+)", "updated_date": r"Modified Date:\s?(.+)", - # fix needed after strip(\r) in _2_parse.py in version 0.19 # "name_servers": r"Name Servers:\r\n(?:\s*(\S+)[ \t\r]*\n)(?:\s*(\S+)[ \t\r]*\n)?(?:\s*(\S+)[ \t\r]*\n)?", "name_servers": r"Name Servers:(?:\s+(\S+))(?:\s+(\S+))?(?:\s+([\.\w]+)\s+)?", # this seems ok for 2 and 3 ns and does not catch the dnssec: line - "status": r"Domain Status:\s*(.*)\r?\n", # "emails": r"(\S+@\S+)", "emails": r"[\w\.-]+@[\w\.-]+\.[\w]{2,4}", @@ -975,7 +973,7 @@ "creation_date": r"Created:\s?(.+)", "expiration_date": r"Valid Until:\s?(.+)", "updated_date": r"Updated:\s?(.+)", - "name_servers": r"Nameserver:\s*(\S+)", # fix needed after strip(\r) in _2_parse.py in version 0.19 + "name_servers": r"Nameserver:\s*(\S+)", # fix needed after strip(\r) in _2_parse.py in version 0.19 "registrant": r"Contact:\s?(.+)", "registrant_country": r"Country Code:\s?(.+)\nRegistrar:", } @@ -1082,6 +1080,12 @@ "extend": "ua", "creation_date": r"\ncreated:\s+0-UANIC\s+(.+)", } +com_ua = { + "extend": "ua", +} +net_ua = { + "extend": "ua", +} lviv_ua = { "extend": "com", @@ -1149,6 +1153,11 @@ "extend": "com", } +web_za = { "extend": "za", "_server": "web-whois.registry.net.za" } +org_za = { "extend": "za", "_server": "org-whois.registry.net.za" } +net_za = { "extend": "za", "_server": "net-whois.registry.net.za" } +co_za = { "extend": "za" , "_server": "coza-whois.registry.net.za"} + gy = { "extend": "com", } @@ -2010,6 +2019,7 @@ "registrant_country": r"registrant-country:\s+(\S+)", "registrant": r"registrant-organi(?:s|z)ation:\s*(.+)\r?\n", } + so = {"extend": "com"} nrw = {"extend": "com"} lat = {"extend": "com"} @@ -2025,5 +2035,99 @@ blue = {"extend": "com"} garden = {"extend": "com", "_server": "whois.nic.garden"} promo = {"extend": "com", "_server": "whois.nic.promo"} -one = {"extend": "com"} + pyc_ = {"extend": "com"} + +mn = {"extend": "com", "_server": "whois.nic.mn"} + +africa = {"extend": "com", "_server": "whois.nic.africa"} + +green = {"extend": "com"} + +mk = { + "extend": None, + "_server": "whois.marnet.mk", + "domain_name": r"domain:\s?(.+)", + "registrar": r"registrar:\s?(.+)", + "registrant": r"registrant:\s?(.+)", + "registrant_country": r"Registrant Country:\s?(.+)", + "creation_date": r"registered:\s?(.+)", + "expiration_date": r"expire:\s?(.+)", + "updated_date": r"changed:\s?(.+)", + "name_servers": r"nserver:\s*(.+)\s*", + "status": r"Status:\s?(.+)", + # the trailing domain must have minimal 2 parts firstname.lastname@fld.tld + # it may actually have more then 4 levels + # to match the dot in firstname.lastname we must use \. + "emails": r"[\w\.-]+@[\w\.-]+\.[\w]{2,4}", +} + +observer = {"extend": "com", "_server": "whois.nic.observer"} +one = {"extend": "com", "_server": "whois.nic.one"} +page = {"extend": "com", "_server": "whois.nic.google"} + +bf = { + "extend": "com", + "_server": "whois.nic.bf", + "registrant": r"Registrant Name:\s?(.+)", +} +bz = {"extend": "_privateReg"} + +si = { + "extend": None, + "_server": "whois.register.si", + "domain_name": r"domain:\s?(.+)", + "registrar": r"registrar:\s?(.+)", + "registrant": r"registrant:\s?(.+)", + "registrant_country": r"Registrant Country:\s?(.+)", + "creation_date": r"created:\s?(.+)", + "expiration_date": r"expire:\s?(.+)", + "updated_date": r"changed:\s?(.+)", + "name_servers": r"nameserver:\s*(.+)\s*", + "status": r"Status:\s?(.+)", + # the trailing domain must have minimal 2 parts firstname.lastname@fld.tld + # it may actually have more then 4 levels + # to match the dot in firstname.lastname we must use \. + "emails": r"[\w\.-]+@[\w\.-]+\.[\w]{2,4}", +} + +sx = {"extend": "com", "_server": "whois.sx"} + +tc = { + "extend": "com", + "_server": "whois.nic.tc", + "domain_name": r"Domain Name:\s?(.+)", + "registrar": r"Sponsoring Registrar:\s?(.+)", + "creation_date": r"Creation Date:\s?(.+)", + "expiration_date": r"Registry Expiry Date:\s?(.+)", + "name_servers": r"Name Server:\s*(.+)\s*", + "status": r"Domain Status:\s?(.+)", +} + +wf = { + "extend": "com", + "_server": "whois.nic.wf", + "domain_name": r"domain:\s?(.+)", + "registrar": r"registrar:\s?(.+)", + "registrant": r"registrant:\s?(.+)", + "registrant_country": r"Registrant Country:\s?(.+)", + "creation_date": r"created:\s?(.+)", + "expiration_date": r"Expiry Date:\s?(.+)", + "updated_date": r"last-update:\s?(.+)", + "name_servers": r"nserver:\s*(.+)\s*", + "status": r"\nstatus:\s?(.+)", +} + +lk = {"extend": "_privateReg"} # Sri Lanka, whois.nic.lk exists but does not answer +eg = {"extend": "_privateReg"} # Egipt +com_eg = {"extend": "_privateReg"} # Egipt + +mo = { + "extend": "com", + "_server": "whois.monic.mo", + "name_servers": r"Domain name servers:\s+-+\s+(\S+)\n(?:(\S+)\n)?(?:(\S+)\n)?(?:(\S+)\n)?", + "creation_date": r"Record created on (.+)", + "expiration_date": r"Record expires on (.+)", +} + +ph = {"extend": "_privateReg"}