--- a/whois/__init__.py Wed Mar 05 15:13:05 2014 -0500
+++ b/whois/__init__.py Wed Mar 05 15:27:46 2014 -0500
@@ -27,6 +27,8 @@
'google.com.au'
>>> extract_domain('http://blog.webscraping.com')
'webscraping.com'
+ >>> extract_domain('www.bbc.co.uk')
+ 'bbc.co.uk'
>>> extract_domain('198.252.206.140')
'stackoverflow.com'
>>> extract_domain('102.112.2O7.net')
--- a/whois/parser.py Wed Mar 05 15:13:05 2014 -0500
+++ b/whois/parser.py Wed Mar 05 15:27:46 2014 -0500
@@ -53,7 +53,7 @@
'referral_url': 'Referral URL:\s?(.+)', # http url of whois_server
'updated_date': 'Updated Date:\s?(.+)',
'creation_date': 'Creation Date:\s?(.+)',
- 'expiration_date': 'Expiration Date:\s?(.+)',
+ 'expiration_date': 'Expir\w+ Date:\s?(.+)',
'name_servers': 'Name Server:\s?(.+)', # list of name servers
'status': 'Status:\s?(.+)', # list of statuses
'emails': '[\w.-]+@[\w.-]+\.[\w]{2,4}', # list of email addresses
@@ -82,6 +82,8 @@
values.append(value)
if len(values) == 1:
values = values[0]
+ elif not values:
+ values = None
setattr(self, attr, values)
return getattr(self, attr)