(self, obj)
Perform a WHOIS email lookup on the query value.
Perform a WHOIS email lookup on the query value.
Perform a WHOIS email lookup on the query value .
def do_whois_email_search(self, obj):
        """Perform a WHOIS email lookup on the query value."""
        client = self._generate_request_instance('whois')
        query = self._get_query_type(obj)
        field = 'email'
        if type(query) == list:
            for item in query:
                results = client.search_whois_by_field(query=item, field=field)
                self._check_response(results)
                for record in results.get('results', []):
                    stats = {'Registered': record.get('registered'),
                             'Updated': record.get('registryUpdatedAt'),
                             'Expires': record.get('expiresAt'),
                             'WHOIS Server': record.get('whoisServer'),
                             'Registrar': record.get('registrar')}
                    self._add_result('WHOIS Email %s' % item,
                                     record.get('domain'), stats)
        else:
            results = client.search_whois_by_field(query=query, field=field)
            self._check_response(results)
            for record in results.get('results', []):
                stats = {'Registered': record.get('registered'),
                         'Updated': record.get('registryUpdatedAt'),
                         'Expires': record.get('expiresAt'),
                         'WHOIS Server': record.get('whoisServer'),
                         'Registrar': record.get('registrar')}
                self._add_result('WHOIS Email %s' % query,
                                 record.get('domain'), stats)
def do_whois_email_search ( self , obj ) : client = self . _generate_request_instance ( 'whois' ) query = self . _get_query_type ( obj ) field = 'email' if type ( query ) == list : for item in query : results = client . search_whois_by_field ( query = item , field = field ) self . _check_response ( results ) for record in results . get ( 'results' , [ ] ) : stats = { 'Registered' : record . get ( 'registered' ) , 'Updated' : record . get ( 'registryUpdatedAt' ) , 'Expires' : record . get ( 'expiresAt' ) , 'WHOIS Server' : record . get ( 'whoisServer' ) , 'Registrar' : record . get ( 'registrar' ) } self . _add_result ( 'WHOIS Email %s' % item , record . get ( 'domain' ) , stats ) else : results = client . search_whois_by_field ( query = query , field = field ) self . _check_response ( results ) for record in results . get ( 'results' , [ ] ) : stats = { 'Registered' : record . get ( 'registered' ) , 'Updated' : record . get ( 'registryUpdatedAt' ) , 'Expires' : record . get ( 'expiresAt' ) , 'WHOIS Server' : record . get ( 'whoisServer' ) , 'Registrar' : record . get ( 'registrar' ) } self . _add_result ( 'WHOIS Email %s' % query , record . get ( 'domain' ) , stats )