summaryrefslogtreecommitdiff
path: root/searx/engines/searchcode_doc.py
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-12-22 16:26:45 +0100
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-12-22 16:26:45 +0100
commitaf8dac93a8acff5042b7b399c38e348f0bdc32ad (patch)
treeefd4aab48cd0f97a01297d7870036633ad89dc92 /searx/engines/searchcode_doc.py
parentd810763107733cec017b8688c0350dff527f2ed1 (diff)
[enh] fix pep8, improve syntax highlighting
Diffstat (limited to 'searx/engines/searchcode_doc.py')
-rw-r--r--searx/engines/searchcode_doc.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/searx/engines/searchcode_doc.py b/searx/engines/searchcode_doc.py
index e07cbeab9..4d4d1ca5e 100644
--- a/searx/engines/searchcode_doc.py
+++ b/searx/engines/searchcode_doc.py
@@ -31,15 +31,18 @@ def request(query, params):
# get response from search-request
def response(resp):
results = []
-
+
search_results = loads(resp.text)
# parse results
for result in search_results['results']:
href = result['url']
- title = "[" + result['type'] + "] " + result['namespace'] + " " + result['name']
- content = '<span class="highlight">[' + result['type'] + "] " + result['name'] + " " + result['synopsis'] + "</span><br />" + result['description']
-
+ title = "[" + result['type'] + "] " +\
+ result['namespace'] + " " + result['name']
+ content = '<span class="highlight">[' + result['type'] + "] " +\
+ result['name'] + " " + result['synopsis'] +\
+ "</span><br />" + result['description']
+
# append result
results.append({'url': href,
'title': title,