267 return WhoisIl(domain, text) |
267 return WhoisIl(domain, text) |
268 elif domain.endswith('.in'): |
268 elif domain.endswith('.in'): |
269 return WhoisIn(domain, text) |
269 return WhoisIn(domain, text) |
270 elif domain.endswith('.cat'): |
270 elif domain.endswith('.cat'): |
271 return WhoisCat(domain, text) |
271 return WhoisCat(domain, text) |
|
272 elif domain.endswith('.ie'): |
|
273 return WhoisIe(domain, text) |
272 else: |
274 else: |
273 return WhoisEntry(domain, text) |
275 return WhoisEntry(domain, text) |
274 |
276 |
275 |
277 |
276 class WhoisCom(WhoisEntry): |
278 class WhoisCom(WhoisEntry): |
1331 else: |
1333 else: |
1332 # Merge base class regex with specifics |
1334 # Merge base class regex with specifics |
1333 self._regex.copy().update(self.regex) |
1335 self._regex.copy().update(self.regex) |
1334 self.regex = self._regex |
1336 self.regex = self._regex |
1335 WhoisEntry.__init__(self, domain, text, self.regex) |
1337 WhoisEntry.__init__(self, domain, text, self.regex) |
|
1338 |
|
1339 |
|
1340 class WhoisIe(WhoisEntry): |
|
1341 """Whois parser for .ie domains |
|
1342 """ |
|
1343 regex = { |
|
1344 'domain_name': 'domain: *(.+)', |
|
1345 'description': 'descr: *(.+)', |
|
1346 'source': 'Source: *(.+)', |
|
1347 'creation_date': 'registration: *(.+)', |
|
1348 'expiration_date': 'renewal: *(.+)', |
|
1349 'name_servers': 'nserver: *(.+)', |
|
1350 'status': 'ren-status: *(.+)', |
|
1351 'admin_id': 'admin-c: *(.+)', |
|
1352 'tech_id': 'tech-c: *(.+)' |
|
1353 } |
|
1354 |
|
1355 def __init__(self, domain, text): |
|
1356 if 'no matching objects' in text: |
|
1357 raise PywhoisError(text) |
|
1358 else: |
|
1359 WhoisEntry.__init__(self, domain, text, self.regex) |