added entry for .cf domain

This commit is contained in:
kiriharu 2021-01-14 00:37:29 +03:00
parent 8ff4d8c16c
commit 8a89e58840

View File

@ -0,0 +1,22 @@
from whois.parser import WhoisEntry, PywhoisError, EMAIL_REGEX
class WhoisCf(WhoisEntry):
"""Whois parser for .cf domains
"""
regex = {
'domain_name': 'Domain name:\n*(.+)\n',
'org': 'Organisation:\n *(.+)',
'emails': EMAIL_REGEX,
}
def __init__(self, domain, text):
if 'The domain you requested is not known in Freenoms database' in text:
raise PywhoisError(text)
else:
WhoisEntry.__init__(self, domain, text, self.regex)
ZONES = {
"cf": WhoisCf
}