Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyCork authored Apr 25, 2019
2 parents bbb868d + fd1d442 commit 35b537e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ docs/_build/

# PyBuilder
target/

.idea
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='whois',
version='0.6.5',
version='0.7.1',
description='Python module/library for retrieving WHOIS information of domains.',
long_description = open('README').read(),
author='DDarko.org',
Expand Down
2 changes: 1 addition & 1 deletion whois/_1_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _do_whois_query(dl, ignore_returncode):
p = subprocess.Popen(['whois', '.'.join(dl)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
r = p.communicate()[0]
r = r.decode() if PYTHON_VERSION == 3 else r
if not ignore_returncode and p.returncode != 0: raise Exception(r)
if not ignore_returncode and p.returncode != 0 and p.returncode != 1: raise Exception(r)
return r


Expand Down
1 change: 1 addition & 0 deletions whois/_3_adjust.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def __init__(self, data):
'%a %b %d %Y', # Tue Dec 12 2000
'%Y-%m-%dT%H:%M:%S', # 2007-01-26T19:10:31
'%Y-%m-%dT%H:%M:%SZ', # 2007-01-26T19:10:31Z
'%Y-%m-%dt%H:%M:%S.%fz', # 2007-01-26t19:10:31.00z
'%Y-%m-%dT%H:%M:%S%z', # 2011-03-30T19:36:27+0200
'%Y-%m-%dT%H:%M:%S.%f%z', # 2011-09-08T14:44:51.622265+03:00
'%Y-%m-%dt%H:%M:%S.%f', # 2011-09-08t14:44:51.622265
Expand Down
26 changes: 25 additions & 1 deletion whois/tld_regexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@
'status': r'status:\s?(.+)',
}

ca = {
'extend': 'com',

'domain_name': r'domain:\s?(.+)',
'registrar': r'registrar:\s*(.+)',
'registrant': r'contact:\s?(.+)',

'creation_date': r'created:\s?(.+)',
'expiration_date': None,
'updated_date': r'last-update:\s?(.+)',

'name_servers': r'nserver:\s*(.+)',
'status': r'status:\s?(.+)',
}

br = {
'extend': 'com',
'domain_name': r'domain:\s?(.+)',
Expand All @@ -260,6 +275,7 @@
'status': r'status:\s?(.+)',
}


mx = {
'domain_name': r'Domain Name:\s?(.+)',
'registrant': r'Registrant:\n\s*(.+)',
Expand All @@ -268,4 +284,12 @@
'expiration_date': r'Expiration Date:\s?(.+)',
'updated_date': r'Last Updated On:\s?(.+)',
'name_servers': r'\sDNS:\s*(.+)',
}
}

sh = {
'extend': 'com',
'expiration_date': r'\nRegistry Expiry Date:\s*(.+)',
'registrant': r'\nRegistrant Organization:\s?(.+)',
'status': r'\nDomain Status:\s?(.+)',
}

0 comments on commit 35b537e

Please sign in to comment.