diff options
| author | dalf <alex@al-f.net> | 2014-12-07 16:37:56 +0100 |
|---|---|---|
| committer | dalf <alex@al-f.net> | 2014-12-07 16:37:56 +0100 |
| commit | 7c13d630e4531630ce3c392a7d60752715742291 (patch) | |
| tree | 332019feae5a215d2d54528308792560794d7aa5 /searx/engines/faroo.py | |
| parent | ffcec383b7355c6ca8b60da8579a43019d7d7e6b (diff) | |
[fix] pep8 : engines (errors E121, E127, E128 and E501 still exist)
Diffstat (limited to 'searx/engines/faroo.py')
| -rw-r--r-- | searx/engines/faroo.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/searx/engines/faroo.py b/searx/engines/faroo.py index 8c69c5bee..dada4758d 100644 --- a/searx/engines/faroo.py +++ b/searx/engines/faroo.py @@ -1,8 +1,8 @@ ## Faroo (Web, News) -# +# # @website http://www.faroo.com # @provide-api yes (http://www.faroo.com/hp/api/api.html), require API-key -# +# # @using-api yes # @results JSON # @stable yes @@ -24,9 +24,10 @@ api_key = None url = 'http://www.faroo.com/' search_url = url + 'api?{query}&start={offset}&length={number_of_results}&l={language}&src={categorie}&i=false&f=json&key={api_key}' -search_category = {'general': 'web', +search_category = {'general': 'web', 'news': 'news'} + # do search-request def request(query, params): offset = (params['pageno']-1) * number_of_results + 1 @@ -48,7 +49,7 @@ def request(query, params): query=urlencode({'q': query}), language=language, categorie=categorie, - api_key=api_key ) + api_key=api_key) # using searx User-Agent params['headers']['User-Agent'] = searx_useragent() @@ -101,7 +102,7 @@ def response(resp): results.append({'template': 'images.html', 'url': result['url'], 'title': result['title'], - 'content': result['kwic'], + 'content': result['kwic'], 'img_src': result['iurl']}) # return results |