Beispiel #1
0
def results():

    results = []

    for i in range(30):
        url = u"http://www.google.com/%d" % i
        result = Result.new(url, u"test title %d" % i, u"test desc", source=TestEngine())
        result.priority = i % 15
        result.source.weight  = i % 10
        result.duplicates  =  i % 5
        results.append(result)

    return results
def raw_results():
    results = []
    
    for i in range(30):
        if i < 1:
            url = u"http://www.baidu.com"
        elif i < 2:
            url = u"http://www.baidu.com/"
        elif i < 5:
            url = u"http://www.google.com/"
        elif i < 10:
            url = u"http://www.bing.com/"
        elif i < 30:
            url = u"http://www.reddit.com/"
        result = Result.new(url, u"test title", u"test desc", source=TestEngine())
        results.append(result)

    return results
def raw_results():
    results = []

    for i in range(30):
        if i < 1:
            url = u"http://www.baidu.com"
        elif i < 2:
            url = u"http://www.baidu.com/"
        elif i < 5:
            url = u"http://www.google.com/"
        elif i < 10:
            url = u"http://www.bing.com/"
        elif i < 30:
            url = u"http://www.reddit.com/"
        result = Result.new(url,
                            u"test title",
                            u"test desc",
                            source=TestEngine())
        results.append(result)

    return results
def make_result(url, title=u"test title", description=u"test desc"):
    item = Result.new(url, title, description, source=test_engine)
    return item
Beispiel #5
0
def make_result(url, title=u"test title", description=u"test desc"):
    item = Result.new(url, title, description, source=test_engine)
    return item