logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: 09154c1f0112f9e726bc6f28982db168334ae34b
parent: 811443957548b2b6587182f1495d9dd15ed88fa5
Author: asciimoo <asciimoo@gmail.com>
Date:   Sun, 27 Oct 2013 14:34:35 +0100

[mod] results engines mods

Diffstat:

searx/engines/__init__.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py @@ -135,6 +135,7 @@ def search(query, request, selected_categories): # deduplication + scoring for i,res in enumerate(flat_res): res['parsed_url'] = urlparse(res['url']) + res['engines'] = [res['engine']] score = (flat_len - i)*settings.weights.get(res['engine'], 1) engines[res['engine']].stats['score_count'] += score duplicated = False @@ -149,7 +150,7 @@ def search(query, request, selected_categories): if len(res.get('content', '')) > len(duplicated.get('content', '')): duplicated['content'] = res['content'] duplicated['score'] += score - duplicated['engine'] += ', '+res['engine'] + duplicated['engines'].append(res['engine']) if duplicated['parsed_url'].scheme == 'https': continue elif res['parsed_url'].scheme == 'https':