SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[mod] unused imports and whitespaces purged
asciimood13c5aa37b02
diff --git a/searx/engines/filecrop.py b/searx/engines/filecrop.pyindex a1a933db9..52426b84a 100644--- a/searx/engines/filecrop.py+++ b/searx/engines/filecrop.py@@ -1,6 +1,4 @@-from json import loadsfrom urllib import urlencode-from searx.utils import html_to_textfrom HTMLParser import HTMLParserurl = 'http://www.filecrop.com/'@@ -10,7 +8,7 @@ class FilecropResultParser(HTMLParser):def __init__(self):HTMLParser.__init__(self)self.__start_processing = False-+self.results = []self.result = {}@@ -22,7 +20,7 @@ class FilecropResultParser(HTMLParser):if tag == 'tr':if ('bgcolor', '#edeff5') in attrs or ('bgcolor', '#ffffff') in attrs:self.__start_processing = True-+if not self.__start_processing:return@@ -50,7 +48,7 @@ class FilecropResultParser(HTMLParser):self.data_counter = 0self.results.append(self.result)self.result = {}-+def handle_data(self, data):if not self.__start_processing:return@@ -59,7 +57,7 @@ class FilecropResultParser(HTMLParser):self.result['content'] += data + ' 'else:self.result['content'] = data + ' '-+self.data_counter += 1def request(query, params):diff --git a/searx/engines/yacy.py b/searx/engines/yacy.pyindex e24edde56..c93ac522f 100644--- a/searx/engines/yacy.py+++ b/searx/engines/yacy.py@@ -1,5 +1,5 @@from json import loads-from urllib import urlencode, quote+from urllib import urlencodeurl = 'http://localhost:8090'search_url = '/yacysearch.json?{query}&maximumRecords=10'@@ -10,7 +10,7 @@ def request(query, params):def response(resp):raw_search_results = loads(resp.text)-+if not len(raw_search_results):return []@@ -22,10 +22,10 @@ def response(resp):tmp_result = {}tmp_result['title'] = result['title']tmp_result['url'] = result['link']- tmp_result['content'] = ''-+ tmp_result['content'] = ''+if len(result['description']):- tmp_result['content'] += result['description'] +"<br/>"+ tmp_result['content'] += result['description'] +"<br/>"if len(result['pubDate']):tmp_result['content'] += result['pubDate'] + "<br/>"