mirror of
https://github.com/searxng/searxng.git
synced 2025-07-12 15:59:21 +02:00
[format.python] initial formatting of the python code
This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
fcdc2c2cd2
commit
3d96a9839a
184 changed files with 2800 additions and 2836 deletions
|
@ -34,9 +34,7 @@ IMG_SRC_FIXES = {
|
|||
|
||||
def request(query, params):
|
||||
|
||||
search_path = search_string.format(
|
||||
query=urlencode({'q': query}),
|
||||
page=params['pageno'])
|
||||
search_path = search_string.format(query=urlencode({'q': query}), page=params['pageno'])
|
||||
|
||||
params['url'] = base_url + search_path
|
||||
|
||||
|
@ -56,13 +54,15 @@ def response(resp):
|
|||
break
|
||||
else:
|
||||
img_src = result['image']['thumb']
|
||||
results.append({
|
||||
'url': result['links']['item'],
|
||||
'title': result['title'],
|
||||
'img_src': img_src,
|
||||
'thumbnail_src': result['image']['thumb'],
|
||||
'author': result['creator'],
|
||||
'template': 'images.html'
|
||||
})
|
||||
results.append(
|
||||
{
|
||||
'url': result['links']['item'],
|
||||
'title': result['title'],
|
||||
'img_src': img_src,
|
||||
'thumbnail_src': result['image']['thumb'],
|
||||
'author': result['creator'],
|
||||
'template': 'images.html',
|
||||
}
|
||||
)
|
||||
|
||||
return results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue