Closed GoogleCodeExporter closed 3 years ago
Thanks for raising this.
Currently, .ca isn't supported.It's on the todo list.
# -*- coding: utf-8 -*-
import whois
new_tld = {
'ca': {
'creation_date': re.compile('Creation Date:\\s?(.+)', re.IGNORECASE),
'domain_name': re.compile('Domain Name:\\s?(.+)', re.IGNORECASE),
'emails': re.compile('[\\w.-]+@[\\w.-]+\\.[\\w]{2,4}', re.IGNORECASE),
'expiration_date': re.compile('Expiration Date:\\s?(.+)', re.IGNORECASE),
'name_servers': re.compile('Name Server:\\s*(.+)\\s*', re.IGNORECASE),
'registrant': None,
'registrar': re.compile('Registrar:\\s?(.+)', re.IGNORECASE),
'status': re.compile('Domain Status:\\s?(.+)', re.IGNORECASE),
'updated_date': re.compile('Updated Date:\\s?(.+)', re.IGNORECASE)
}
}
whois.TLD_RE.update(new_tld)
domain = 'invisiblebracesintoronto.ca'
response = whois.query(domain, 'A')
.ca working
import whois domain = whois.query('invisiblebracesintoronto.ca') print(domain.dict) {'name': 'invisiblebracesintoronto.ca', 'registrar': 'Go Daddy Domains Canada, Inc', 'registrant_country': 'REDACTED FOR PRIVACY', 'creation_date': datetime.datetime(2013, 10, 4, 16, 27, 42), 'expiration_date': datetime.datetime(2021, 10, 4, 16, 27, 42), 'last_updated': datetime.datetime(2020, 11, 18, 16, 33, 19), 'status': 'clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited', 'statuses': ['clientTransferProhibited https://icann.org/epp#clientTransferProhibited', 'clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited', 'clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited'], 'dnssec': False, 'name_servers': {'dns1.stabletransit.com', 'dns2.stabletransit.com'}}
Original issue reported on code.google.com by
sta...@wm4d.com
on 5 Oct 2014 at 4:21