diff options
| author | Adam Tauber <adam.tauber@balabit.com> | 2015-03-03 11:32:21 +0100 |
|---|---|---|
| committer | Adam Tauber <adam.tauber@balabit.com> | 2015-03-03 11:32:21 +0100 |
| commit | 6379595e1fa82b3191adb200e75e3a774c7f7746 (patch) | |
| tree | a3d4eea13499398564a9b3a56b9f8d8d1278929e /searx/engines/deezer.py | |
| parent | c71ef5d230bbc5be9b9b3f970fc077641a9943ea (diff) | |
[mod] https in deezer engine - closes #262
Diffstat (limited to 'searx/engines/deezer.py')
| -rw-r--r-- | searx/engines/deezer.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/searx/engines/deezer.py b/searx/engines/deezer.py index 433ceffa1..7fbd3c200 100644 --- a/searx/engines/deezer.py +++ b/searx/engines/deezer.py @@ -16,11 +16,11 @@ categories = ['music'] paging = True # search-url -url = 'http://api.deezer.com/' +url = 'https://api.deezer.com/' search_url = url + 'search?{query}&index={offset}' 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>' @@ -45,6 +45,10 @@ def response(resp): if result['type'] == 'track': title = result['title'] url = result['link'] + + if url.startswith('http://'): + url = 'https' + url[4:] + content = result['artist']['name'] +\ " • " +\ result['album']['title'] +\ |