Added funtion to build registrant details
This commit is contained in:
parent
1b77f05cad
commit
117ce36da5
@ -3,6 +3,7 @@ import whois
|
|||||||
|
|
||||||
class WhoIS():
|
class WhoIS():
|
||||||
def __init__(self, domain):
|
def __init__(self, domain):
|
||||||
|
self.domain = domain
|
||||||
self.getWhois(domain)
|
self.getWhois(domain)
|
||||||
|
|
||||||
def getWhois(self, domain):
|
def getWhois(self, domain):
|
||||||
@ -10,5 +11,12 @@ class WhoIS():
|
|||||||
whoisData = whois.parser.Parser(domain, whoisData[1]).parse()
|
whoisData = whois.parser.Parser(domain, whoisData[1]).parse()
|
||||||
self.registrar = whoisData.get('Registrar')
|
self.registrar = whoisData.get('Registrar')
|
||||||
self.status = whoisData.get('Status')
|
self.status = whoisData.get('Status')
|
||||||
self.registrant = whoisData.get('RegistrantName')
|
self.registrant = self.buildRegistrantInfo(whoisData)
|
||||||
self.nameservers = whoisData.get('NameServer')
|
self.nameservers = whoisData.get('NameServer')
|
||||||
|
|
||||||
|
def buildRegistrantInfo(self, whoisData):
|
||||||
|
ret = {}
|
||||||
|
ret['registrantName'] = whoisData.get('RegistrantName')
|
||||||
|
ret['eligibilityType'] = whoisData.get('EligibilityType')
|
||||||
|
ret['registrantID'] = whoisData.get('RegistrantID')
|
||||||
|
return ret
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user