'Retrieve the web page for a given search.
kind can be \'tt\' (for titles), \'nm\' (for names),
\'char\' (for characters) or \'co\' (for companies).
ton is the title or the name to search.
results is the maximum number of results to be retrieved.'

def _get_search_content(self, kind, ton, results):

    if isinstance(ton, unicode):
        try:
            ton = ton.encode('utf-8')
        except Exception as e:
            try:
                ton = ton.encode('iso8859-1')
            except Exception as e:
                pass
    params = ('q=%s&s=%s&mx=%s' % (quote_plus(ton), kind, str(results)))
    if (kind == 'ep'):
        params = params.replace('s=ep&', 's=tt&ttype=ep&', 1)
    cont = self._retrieve((self.urls['find'] % params))
    if ((cont.find('Your    search    returned    more    than') == (-1)) or (cont.find('displayed    the    exact    matches') == (-1))):
        return cont
    params = ('q=%s&ls=%s&lm=0' % (quote_plus(ton), kind))
    size = (131072 + (results * 512))
    return self._retrieve((self.urls['find'] % params), size=size)
