'Returns a list of results from Yahoo for the given query.
- type : SEARCH, IMAGE or NEWS,
- start: maximum 1000 results => start 1-100 with count=10, 1000/count,
- count: maximum 50, or 35 for images.
There is no daily limit, however Yahoo BOSS is a paid service.'

def search(self, query, type=SEARCH, start=1, count=10, sort=RELEVANCY, size=None, cached=True, **kwargs):

    if (type not in (SEARCH, IMAGE, NEWS)):
        raise SearchEngineTypeError
    if (type == SEARCH):
        url = (YAHOO + 'web')
    if (type == IMAGE):
        url = (YAHOO + 'images')
    if (type == NEWS):
        url = (YAHOO + 'news')
    if ((not query) or (count < 1) or (start < 1) or (start > (1000 / count))):
        return Results(YAHOO, query, type)
    url = URL(url, method=GET, query={'q': query.replace('    ', '+'), 'start': (1 + ((start - 1) * count)), 'count': min(count, (((type == IMAGE) and 35) or 50)), 'format': 'json'})
    if (self.language is not None):
        market = locale.market(self.language)
        if market:
            url.query['market'] = market.lower()
    url = self._authenticate(url)
    kwargs.setdefault('unicode', True)
    kwargs.setdefault('throttle', self.throttle)
    try:
        data = url.download(cached=cached, **kwargs)
    except HTTP401Authentication:
        raise HTTP401Authentication(('Yahoo    %s    API    is    a    paid    service' % type))
    except HTTP403Forbidden:
        raise SearchEngineLimitError
    data = json.loads(data)
    data = (data.get('bossresponse') or {})
    data = data.get({SEARCH: 'web', IMAGE: 'images', NEWS: 'news'}[type], {})
    results = Results(YAHOO, query, type)
    results.total = int((data.get('totalresults') or 0))
    for x in data.get('results', []):
        r = Result(url=None)
        r.url = self.format(x.get('url', x.get('clickurl')))
        r.title = self.format(x.get('title'))
        r.text = self.format(x.get('abstract'))
        r.date = self.format(x.get('date'))
        r.author = self.format(x.get('source'))
        r.language = self.format(((x.get('language') and x.get('language').split('    ')[0]) or self.language or ''))
        results.append(r)
    return results
