mirror of
https://github.com/searxng/searxng.git
synced 2024-12-21 00:36:29 +00:00
[mod] https in deezer engine - closes #262
This commit is contained in:
parent
c71ef5d230
commit
6379595e1f
1 changed files with 6 additions and 2 deletions
|
@ -16,11 +16,11 @@ categories = ['music']
|
||||||
paging = True
|
paging = True
|
||||||
|
|
||||||
# search-url
|
# search-url
|
||||||
url = 'http://api.deezer.com/'
|
url = 'https://api.deezer.com/'
|
||||||
search_url = url + 'search?{query}&index={offset}'
|
search_url = url + 'search?{query}&index={offset}'
|
||||||
|
|
||||||
embedded_url = '<iframe scrolling="no" frameborder="0" allowTransparency="true" ' +\
|
embedded_url = '<iframe scrolling="no" frameborder="0" allowTransparency="true" ' +\
|
||||||
'data-src="http://www.deezer.com/plugins/player?type=tracks&id={audioid}" ' +\
|
'data-src="https://www.deezer.com/plugins/player?type=tracks&id={audioid}" ' +\
|
||||||
'width="540" height="80"></iframe>'
|
'width="540" height="80"></iframe>'
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,6 +45,10 @@ def response(resp):
|
||||||
if result['type'] == 'track':
|
if result['type'] == 'track':
|
||||||
title = result['title']
|
title = result['title']
|
||||||
url = result['link']
|
url = result['link']
|
||||||
|
|
||||||
|
if url.startswith('http://'):
|
||||||
|
url = 'https' + url[4:]
|
||||||
|
|
||||||
content = result['artist']['name'] +\
|
content = result['artist']['name'] +\
|
||||||
" • " +\
|
" • " +\
|
||||||
result['album']['title'] +\
|
result['album']['title'] +\
|
||||||
|
|
Loading…
Reference in a new issue