'Search for entries on SceneAccess'

@plugin.internet(log)
def search(self, task, entry, config=None):

    session = task.requests
    if (u'sceneaccess.eu' not in session.domain_limiters):
        session.add_domain_limiter(TimedLimiter(u'sceneaccess.eu', u'7    seconds'))
    if (not session.cookies):
        log.debug((u'Logging    in    to    %s...' % URL))
        params = {u'username': config[u'username'], u'password': config[u'password'], u'submit': u'come    on    in'}
        session.post((URL + u'login'), data=params)
    if (u'gravity_multiplier' in config):
        multip = config[u'gravity_multiplier']
    else:
        multip = 1
    base_urls = list()
    entries = set()
    for category in self.process_categories(config):
        base_urls.append((URL + (u'%(url_path)s?method=2%(category_url_string)s' % category)))
    for search_string in entry.get(u'search_strings', [entry[u'title']]):
        search_string_normalized = normalize_unicode(clean_title(search_string))
        search_string_url_fragment = (u'&search=' + quote(search_string_normalized.encode(u'utf8')))
        for url in base_urls:
            url += search_string_url_fragment
            log.debug((u'Search    URL    for    `%s`:    %s' % (search_string, url)))
            page = session.get(url).content
            soup = get_soup(page)
            for result in soup.findAll(u'tr', attrs={u'class': u'tt_row'}):
                entry = Entry()
                entry[u'title'] = result.find(u'a', href=re.compile(u'details\\?id=\\d+'))[u'title']
                entry[u'url'] = (URL + result.find(u'a', href=re.compile(u'.torrent$'))[u'href'])
                entry[u'torrent_seeds'] = result.find(u'td', attrs={u'class': u'ttr_seeders'}).text
                entry[u'torrent_leeches'] = result.find(u'td', attrs={u'class': u'ttr_leechers'}).text
                entry[u'search_sort'] = (torrent_availability(entry[u'torrent_seeds'], entry[u'torrent_leeches']) * multip)
                size = result.find(u'td', attrs={u'class': u'ttr_size'}).text
                size = re.search(u'(\\d+(?:[.,]\\d+)*)\\s?([KMG]B)', size)
                entry[u'content_size'] = parse_filesize(size.group(0))
                entries.add(entry)
    return entries
