From 5cc9b773080082bc8b8499914eef6879ed54c2e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jezer=20Mej=C3=ADa?= Date: Thu, 16 May 2024 04:03:47 -0600 Subject: [PATCH] Add studio host --- whois/parser.py | 8 +++++--- whois/whois.py | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/whois/parser.py b/whois/parser.py index c9d7983..32e63e5 100644 --- a/whois/parser.py +++ b/whois/parser.py @@ -1362,12 +1362,14 @@ def __init__(self, domain, text): WhoisRu.__init__(self, domain, text) -class WhoisStudio(WhoisRu): +class WhoisStudio(WhoisBz): """Whois parser for .studio domains""" def __init__(self, domain, text): - WhoisRu.__init__(self, domain, text) - + if "Domain not found." in text: + raise PywhoisError(text) + else: + WhoisEntry.__init__(self, domain, text, self.regex) class WhoisStyle(WhoisRu): """Whois parser for .style domains""" diff --git a/whois/whois.py b/whois/whois.py index cd759f0..40f67dd 100644 --- a/whois/whois.py +++ b/whois/whois.py @@ -99,6 +99,7 @@ class NICClient(object): SHOP_HOST = "whois.nic.shop" SG_HOST = "whois.sgnic.sg" STORE_HOST = "whois.centralnic.com" + STUDIO_HOST = "whois.nic.studio" DETI_HOST = "whois.nic.xn--d1acj3b" MOSKVA_HOST = "whois.registry.nic.xn--80adxhks" RF_HOST = "whois.registry.tcinet.ru" @@ -343,7 +344,7 @@ def choose_server(self, domain): elif tld == "design": return NICClient.DESIGN_HOST elif tld == "studio": - return NICClient.RU_HOST + return NICClient.STUDIO_HOST elif tld == "style": return NICClient.RU_HOST elif tld == "su":