mirror of
https://github.com/searxng/searxng.git
synced 2025-09-03 08:48:35 +02:00
[fix] pep8 : engines (errors E121, E127, E128 and E501 still exist)
This commit is contained in:
parent
ffcec383b7
commit
7c13d630e4
22 changed files with 109 additions and 97 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue