diff options
author | Cqoicebordel <Cqoicebordel@users.noreply.github.com> | 2014-12-29 21:31:04 +0100 |
---|---|---|
committer | Cqoicebordel <Cqoicebordel@users.noreply.github.com> | 2014-12-29 21:31:04 +0100 |
commit | 5d977056f7aa216eae09a22c3baaff73546f6ff1 (patch) | |
tree | ffd08f6bc1d3268ec6ce8031cbdec7987dfd3763 /searx/engines/searchcode_doc.py | |
parent | 576fdef440e835592f9f5c8dc25398e343687c7a (diff) | |
download | searxng-5d977056f7aa216eae09a22c3baaff73546f6ff1.tar.gz searxng-5d977056f7aa216eae09a22c3baaff73546f6ff1.zip |
Flake8 and Twitter corrections
Lots of Flake8 corrections
Maybe we should change the rule to allow lines of 120 chars. It seems more usable.
Big twitter correction : now it outputs the words in right order...
Diffstat (limited to 'searx/engines/searchcode_doc.py')
-rw-r--r-- | searx/engines/searchcode_doc.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/searx/engines/searchcode_doc.py b/searx/engines/searchcode_doc.py index e07cbeab9..b5b7159be 100644 --- a/searx/engines/searchcode_doc.py +++ b/searx/engines/searchcode_doc.py @@ -31,15 +31,22 @@ 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, |