Finished basic addition of uk domain lookups, need to figure out how to properly do it
This commit is contained in:
parent
455b821fde
commit
628f96d293
2
tests/out.txt
Normal file
2
tests/out.txt
Normal file
@ -0,0 +1,2 @@
|
||||
['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'chooseServer', 'query', 'sendHTTPQuery', 'sendQuery']
|
||||
{'Status': ['Registered until expiry date.'], 'UpdatedDate': ['29-Apr-2017'], 'Registrar': ['Nom-IQ Limited t/a Com Laude [Tag = NOMIQ]'], 'ExpirationDate': ['03-May-2018'], 'DomainName': ['amamzon.co.uk'], 'NameServer': ['pdns1.ultradns.net'], 'CreationDate': ['03-May-2001'], 'RegistrantName': ['Amazon Europe Core S.?.r.l.']}
|
||||
@ -6,7 +6,7 @@ from whois import whois
|
||||
from whois import parser
|
||||
|
||||
print dir(whois)
|
||||
domain = "example.com"
|
||||
domain = "amamzon.co.uk"
|
||||
w = whois(domain, True)
|
||||
t = w.query(False)
|
||||
p = parser.Parser(domain, t[1], t[0], True)
|
||||
|
||||
@ -136,7 +136,6 @@ class Parser(object):
|
||||
if matches:
|
||||
logging.debug("run: regex matches found for key %s. %s"%(key, matches))
|
||||
result.update({key: map(lambda x: x.strip(), matches)})
|
||||
|
||||
else:
|
||||
logging.debug("run: No match for %s"%(key))
|
||||
|
||||
|
||||
@ -5,20 +5,20 @@ server = {
|
||||
|
||||
parse = {
|
||||
"default": {
|
||||
"NotFound": "No Data Found",
|
||||
"DomainName": "Domain name:\s+(.+)",
|
||||
"Registrar": "Registrar Name:\s+(.+)",
|
||||
"NotFound": "No match for",
|
||||
"DomainName": "Domain name:\s+(.+|\n)",
|
||||
"Registrar": "Registrar:\s+(.+)",
|
||||
"NameServer": "Name servers:\s+(.+)",
|
||||
"Status": "Registration status:\s+(.+)",
|
||||
"UpdatedDate": "Last updated:\s+(.+)",
|
||||
"CreationDate": "Registered on:\s+(.+)",
|
||||
"ExpirationDate": "Expiry date:\s+(.+)",
|
||||
# "RegistrantName": "Registrant:(.+)",
|
||||
"EligibilityName": "Registrant:\s+(.+)",
|
||||
"EligibilityType": "Eligibility Type:(.+)",
|
||||
"AdminID": "Registrant Contact ID:(.+)",
|
||||
"AdminName": "Registrant Contact Name:(.+)",
|
||||
"TechName": "Tech Contact Name:(.+)",
|
||||
"TechID": "Tech Contact ID:(.+)",
|
||||
"RegistrantName": "Registrant:\s(.+)",
|
||||
# "EligibilityName": "Registrant:\s+(.+)",
|
||||
# "EligibilityType": "Eligibility Type:(.+)",
|
||||
# "AdminID": "Registrant Contact ID:(.+)",
|
||||
# "AdminName": "Registrant Contact Name:(.+)",
|
||||
# "TechName": "Tech Contact Name:(.+)",
|
||||
# "TechID": "Tech Contact ID:(.+)",
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user