def METHOD_NAME(self, task, entry, config=None):
    """
    Search for name from torrentleech.
    """
    request_headers = {'User-Agent': 'curl/7.54.0'}
    rss_key = config['rss_key']
    # build the form request:
    data = {'username': config['username'], 'password': config['password']}
    # POST the login form:
    try:
        login = task.requests.post(
            'https://www.torrentleech.org/user/account/login/',
            data=data,
            headers=request_headers,
            allow_redirects=True,
        )
    except RequestException as e:
        raise PluginError('Could not connect to torrentleech: %s' % str(e))
    if login.url.endswith('/user/account/login/'):
        raise PluginError('Could not login to torrentleech, faulty credentials?')
    if not isinstance(config, dict):
        config = {}
        # sort = SORT.get(config.get('sort_by', 'seeds'))
        # if config.get('sort_reverse'):
        # sort += 1
    categories = config.get('category', 'all')
    # Make sure categories is a list
    if not isinstance(categories, list):
        categories = [categories]
    # If there are any text categories, turn them into their id number
    categories = [c if isinstance(c, int) else CATEGORIES[c] for c in categories]
    filter_url = '/categories/{}'.format(','.join(str(c) for c in categories))
    entries = set()
    for search_string in entry.get('search_strings', [entry['title']]):
        query = normalize_unicode(search_string).replace(":", "")
        # urllib.quote will crash if the unicode string has non ascii characters,
        # so encode in utf-8 beforehand
        url = (
            'https://www.torrentleech.org/torrents/browse/list/query/'
            + quote(query.encode('utf-8'))
            + filter_url
        )
        logger.debug('Using {} as torrentleech search url', url)
        results = task.requests.get(url, headers=request_headers, cookies=login.cookies).json()
        for torrent in results['torrentList']:
            entry = Entry()
            entry['download_headers'] = request_headers
            entry['title'] = torrent['name']
            # construct download URL
            torrent_url = 'https://www.torrentleech.org/rss/download/{}/{}/{}'.format(
                torrent['fid'], rss_key, torrent['filename']
            )
            logger.debug('RSS-ified download link: {}', torrent_url)
            entry['url'] = torrent_url
            # seeders/leechers
            entry['torrent_seeds'] = torrent['seeders']
            entry['torrent_leeches'] = torrent['leechers']
            entry['torrent_availability'] = torrent_availability(
                entry['torrent_seeds'], entry['torrent_leeches']
            )
            entry['content_size'] = parse_filesize(str(torrent['size']) + ' b')
            entries.add(entry)
    return sorted(entries, reverse=True, key=lambda x: x.get('torrent_availability'))