--- a/whois/parser.py Tue May 30 08:03:53 2017 -0400
+++ b/whois/parser.py Mon Jul 17 12:07:49 2017 +0100
@@ -253,6 +253,8 @@
return WhoisIs(domain, text)
elif domain.endswith('.dk'):
return WhoisDk(domain, text)
+ elif domain.endswith('.it'):
+ return WhoisIt(domain, text)
else:
return WhoisEntry(domain, text)
@@ -1157,6 +1159,23 @@
else:
WhoisEntry.__init__(self, domain, text, self.regex)
+class WhoisIt(WhoisEntry):
+ """Whois parser for .it domains
+ """
+ regex = {
+ 'domain_name': 'Domain: *(.+)',
+ 'creation_date': '(?<! )Created: *(.+)',
+ 'updated_date': '(?<! )Last Update: *(.+)',
+ 'expiration_date': '(?<! )Expire Date: *(.+)',
+ 'status': 'Status: *(.+)', # list of statuses
+ }
+
+ def __init__(self, domain, text):
+ if 'not found.' in text:
+ raise PywhoisError(text)
+ else:
+ WhoisEntry.__init__(self, domain, text, self.regex)
+
class WhoisIs(WhoisEntry):
"""Whois parser for .se domains