Loading searx/engines/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ def score_results(results): duplicated = new_res break if duplicated: if len(res.get('content', '')) > len(duplicated.get('content', '')): # noqa if res.get('content') > duplicated.get('content'): duplicated['content'] = res['content'] duplicated['score'] += score duplicated['engines'].append(res['engine']) Loading searx/engines/json_engine.py +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ def parse(query): def do_query(data, q): ret = [] if not len(q): if not q: return ret qkey = q[0] Loading searx/engines/startpage.py +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ def response(resp): title = link.text_content() content = '' if len(result.xpath('./p[@class="desc"]')): if result.xpath('./p[@class="desc"]'): content = result.xpath('./p[@class="desc"]')[0].text_content() results.append({'url': url, 'title': title, 'content': content}) Loading searx/engines/xpath.py +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ if xpath_results is a string element, then it's already done def extract_text(xpath_results): if type(xpath_results) == list: # it's list of result : concat everything using recursive call if not len(xpath_results): if not xpath_results: raise Exception('Empty url resultset') result = '' for e in xpath_results: Loading searx/engines/yacy.py +3 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ def request(query, params): def response(resp): raw_search_results = loads(resp.text) if not len(raw_search_results): if not raw_search_results: return [] search_results = raw_search_results.get('channels', {})[0].get('items', []) Loading @@ -26,10 +26,10 @@ def response(resp): tmp_result['url'] = result['link'] tmp_result['content'] = '' if len(result['description']): if result['description']: tmp_result['content'] += result['description'] + "<br/>" if len(result['pubDate']): if result['pubDate']: tmp_result['content'] += result['pubDate'] + "<br/>" if result['size'] != '-1': Loading Loading
searx/engines/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ def score_results(results): duplicated = new_res break if duplicated: if len(res.get('content', '')) > len(duplicated.get('content', '')): # noqa if res.get('content') > duplicated.get('content'): duplicated['content'] = res['content'] duplicated['score'] += score duplicated['engines'].append(res['engine']) Loading
searx/engines/json_engine.py +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ def parse(query): def do_query(data, q): ret = [] if not len(q): if not q: return ret qkey = q[0] Loading
searx/engines/startpage.py +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ def response(resp): title = link.text_content() content = '' if len(result.xpath('./p[@class="desc"]')): if result.xpath('./p[@class="desc"]'): content = result.xpath('./p[@class="desc"]')[0].text_content() results.append({'url': url, 'title': title, 'content': content}) Loading
searx/engines/xpath.py +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ if xpath_results is a string element, then it's already done def extract_text(xpath_results): if type(xpath_results) == list: # it's list of result : concat everything using recursive call if not len(xpath_results): if not xpath_results: raise Exception('Empty url resultset') result = '' for e in xpath_results: Loading
searx/engines/yacy.py +3 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ def request(query, params): def response(resp): raw_search_results = loads(resp.text) if not len(raw_search_results): if not raw_search_results: return [] search_results = raw_search_results.get('channels', {})[0].get('items', []) Loading @@ -26,10 +26,10 @@ def response(resp): tmp_result['url'] = result['link'] tmp_result['content'] = '' if len(result['description']): if result['description']: tmp_result['content'] += result['description'] + "<br/>" if len(result['pubDate']): if result['pubDate']: tmp_result['content'] += result['pubDate'] + "<br/>" if result['size'] != '-1': Loading