mirror of
https://github.com/searxng/searxng.git
synced 2025-07-15 01:09: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
|
@ -24,9 +24,11 @@ paging = True
|
|||
url = 'https://api.deezer.com/'
|
||||
search_url = url + 'search?{query}&index={offset}'
|
||||
|
||||
embedded_url = '<iframe scrolling="no" frameborder="0" allowTransparency="true" ' +\
|
||||
'data-src="https://www.deezer.com/plugins/player?type=tracks&id={audioid}" ' +\
|
||||
'width="540" height="80"></iframe>'
|
||||
embedded_url = (
|
||||
'<iframe scrolling="no" frameborder="0" allowTransparency="true" '
|
||||
+ 'data-src="https://www.deezer.com/plugins/player?type=tracks&id={audioid}" '
|
||||
+ 'width="540" height="80"></iframe>'
|
||||
)
|
||||
|
||||
|
||||
# do search-request
|
||||
|
@ -53,18 +55,12 @@ def response(resp):
|
|||
if url.startswith('http://'):
|
||||
url = 'https' + url[4:]
|
||||
|
||||
content = '{} - {} - {}'.format(
|
||||
result['artist']['name'],
|
||||
result['album']['title'],
|
||||
result['title'])
|
||||
content = '{} - {} - {}'.format(result['artist']['name'], result['album']['title'], result['title'])
|
||||
|
||||
embedded = embedded_url.format(audioid=result['id'])
|
||||
|
||||
# append result
|
||||
results.append({'url': url,
|
||||
'title': title,
|
||||
'embedded': embedded,
|
||||
'content': content})
|
||||
results.append({'url': url, 'title': title, 'embedded': embedded, 'content': content})
|
||||
|
||||
# return results
|
||||
return results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue