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): |
1321 else: |
1323 else: |
1322 # Merge base class regex with specifics |
1324 # Merge base class regex with specifics |
1323 self._regex.update(self.regex) |
1325 self._regex.update(self.regex) |
1324 self.regex = self._regex |
1326 self.regex = self._regex |
1325 WhoisEntry.__init__(self, domain, text, self.regex) |
1327 WhoisEntry.__init__(self, domain, text, self.regex) |
|
1328 |
|
1329 |
|
1330 class WhoisIe(WhoisEntry): |
|
1331 """Whois parser for .ie domains |
|
1332 """ |
|
1333 regex = { |
|
1334 'domain_name': 'domain: *(.+)', |
|
1335 'description': 'descr: *(.+)', |
|
1336 'source': 'Source: *(.+)', |
|
1337 'creation_date': 'registration: *(.+)', |
|
1338 'expiration_date': 'renewal: *(.+)', |
|
1339 'name_servers': 'nserver: *(.+)', |
|
1340 'status': 'ren-status: *(.+)', |
|
1341 'admin_id': 'admin-c: *(.+)', |
|
1342 'tech_id': 'tech-c: *(.+)' |
|
1343 } |
|
1344 |
|
1345 def __init__(self, domain, text): |
|
1346 if 'no matching objects' in text: |
|
1347 raise PywhoisError(text) |
|
1348 else: |
|
1349 WhoisEntry.__init__(self, domain, text, self.regex) |