Search for domains
        
        :type searchterm: str
        :rtype: list
195135
def search_domain(self, searchterm):
        
        return self.__search(type_attribute=self.__mispdomaintypes(), value=searchterm)
347238
def search_filename(self, searchterm):
        
        return self.__search(type_attribute=self.__mispfilenametypes(), value=searchterm)
1176857
def _find_record(self, domain, _type=None):
        """"""

        def _is_matching(record):
            """filter function for records"""

            if domain and record.get('domain', None) != domain:
                return False
            if _type and record.get('type', None) != _type:
                return False
            return True

        payload = self._get('/search?q={0}&type=record'.format(domain))
        for record in payload:
            if _is_matching(record):
                match = record
                break
        else:
            # no such domain on ns1
            return None

        record = self._get(
            '/zones/{0}/{1}/{2}'.format(match['zone'], match['domain'], match['type']))
        if record.get('message', None):
            return None  # {"message":"record not found"}
        short_answers = [x['answer'][0] for x in record['answers']]

        # ensure a compatibility level with self._list_records
        record['short_answers'] = short_answers
        return record
1098401
def search_records(self, domain, record_type, name=None, data=None):
        
        return domain.search_records(record_type=record_type,
                name=name, data=data)
441029
def tagger(self):
        
        domain = 0
        if domain not in self.domains:
            self.register_domain(domain=domain)
        return self.domains[domain].tagger
880112
def find_types(self, site=None, match=r'^(?!lastfile|spectro|\.).*'):
        
        self._find_paths()
        types = [tag for (site_, tag) in self.paths if site in (None, site_)]
        if match is not None:
            match = re.compile(match)
            return list(filter(match.search, types))
        return types
722003
def list(self, domain=None):
        """"""
        # pylint: disable=arguments-differ
        if domain:
            return self._list(domain)
        url = "{base}".format(
            base="domains"
        )
        domains = self.core.get(url)
        res = []
        for dom in domains:
            domain_uuid = dom.get('identifier')
            url = "{base}".format(
                base=self.local_base_url
            )
            param = {
                'domainUuid': domain_uuid
            }
            encode = urllib.urlencode(param)
            if encode:
                url += "?"
                url += encode
            res += self.core.list(url)
        return res
1156143
def find_subdomains(domain):
    """"""
    result = set()
    response = get('https://findsubdomains.com/subdomains-of/' + domain).text
    matches = findall(r'(?s)<div class="domains js-domain-name">(.*?)</div>', response)
    for match in matches:
        result.add(match.replace(' ', '').replace('\n', ''))
    return list(result)
226285
def lookup_domains(self):
        
        thread_error = False
        thread_wait_timeout = 200
        ind = 1
        total_item_count = len(self.domains)
        for domain in self.domains:
            for nameserver in self.nameservers:
                wait_time = 0
                while threading.active_count() > self.max_threads:
                    time.sleep(1)
                    wait_time += 1
                    if wait_time > thread_wait_timeout:
                        thread_error = True
                        break

                if thread_error:
                    self.results["error"] = "Threads took too long to finish."
                    break
                log_prefix = "%d/%d: " % (ind, total_item_count)
                thread = threading.Thread(target=self.lookup_domain,
                                          args=(domain, nameserver,
                                                log_prefix))
                thread.setDaemon(1)

                thread_open_success = False
                retries = 0
                while not thread_open_success and retries < MAX_THREAD_START_RETRY:
                    try:
                        thread.start()
                        self.threads.append(thread)
                        thread_open_success = True
                    except:
                        retries += 1
                        time.sleep(THREAD_START_DELAY)
                        logging.error("%sThread start failed for %s, retrying... (%d/%d)" % (log_prefix, domain, retries, MAX_THREAD_START_RETRY))

                if retries == MAX_THREAD_START_RETRY:
                    logging.error("%sCan't start a new thread for %s after %d retries." % (log_prefix, domain, retries))

            if thread_error:
                break
            ind += 1

        for thread in self.threads:
            thread.join(self.timeout * 3)
        return self.results
597307
def search(
            self,
            id_list: List,
            negated_classes: List,
            limit: Optional[int] = 100,
            method: Optional[SimAlgorithm] = SimAlgorithm.PHENODIGM) -> SimResult:
        

        return self.filtered_search(
            id_list=id_list,
            negated_classes=negated_classes,
            limit=limit,
            taxon_filter=None,
            category_filter=None,
            method=method
        )
713673
def search_rule(self, search):
        
        return [RouteMapRule(**rule) for rule in self.make_request( 
            resource='search_rule', params={'filter': search})]
1099818
def search(self, base, scope, filterstr='(objectClass=*)',
               attrlist=None, limit=None) -> Generator[Tuple[str, dict], None, None]:
        

        _debug("search", base, scope, filterstr, attrlist, limit)

        # first results
        if attrlist is None:
            attrlist = ldap3.ALL_ATTRIBUTES
        elif isinstance(attrlist, set):
            attrlist = list(attrlist)

        def first_results(obj):
            _debug("---> searching ldap", limit)
            obj.search(
                base, filterstr, scope, attributes=attrlist, paged_size=limit)
            return obj.response

        # get the 1st result
        result_list = self._do_with_retry(first_results)

        # Loop over list of search results
        for result_item in result_list:
            # skip searchResRef for now
            if result_item['type'] != "searchResEntry":
                continue
            dn = result_item['dn']
            attributes = result_item['raw_attributes']
            # did we already retrieve this from cache?
            _debug("---> got ldap result", dn)
            _debug("---> yielding", result_item)
            yield (dn, attributes)

        # we are finished - return results, eat cake
        _debug("---> done")
        return
1680
def filter_by(self, **kwargs):
        
        query = self._copy()
        for field, value in kwargs.items():
            query.domain.append(
                (field, '=', value)
            )
        return query
302372
def search_url(self, searchterm):
        
        return self.__search(type_attribute=self.__mispurltypes(), value=searchterm)
593843
def search_with_additional_term_string(self, filterstr):
        
        filterstr = "(&{}{})".format(self.filterstr, filterstr)

        return self.__class__(
            self.base_dn, self.scope, filterstr, attrlist=self.attrlist
        )
895543
public List<Product> searchFor(final Optional<String> searchTerm) {
        if (searchTerm.isPresent()) {
            return products
                    .stream()
                    .filter(matchingProductsFor(searchTerm.get()))
                    .collect(toList());
        } else {
            return products;
        }

    }
861219
def list_domains(self):
        
        self.connect()
        results = self.server.list_domains(self.session_id)
        return {i['domain']: i['subdomains'] for i in results}