From e12a137a2fd64bb6d3b073ce1a117cc8839717a7 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Sat, 10 Dec 2016 00:30:34 +0100 Subject: [PATCH] [fix] unicode response in deezer and spotify --- searx/engines/deezer.py | 2 +- searx/engines/spotify.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/engines/deezer.py b/searx/engines/deezer.py index 8e87bbeec..3db1af3d2 100644 --- a/searx/engines/deezer.py +++ b/searx/engines/deezer.py @@ -51,7 +51,7 @@ def response(resp): if url.startswith('http://'): url = 'https' + url[4:] - content = '{} - {} - {}'.format( + content = u'{} - {} - {}'.format( result['artist']['name'], result['album']['title'], result['title']) diff --git a/searx/engines/spotify.py b/searx/engines/spotify.py index 0e8e69961..249ba91ef 100644 --- a/searx/engines/spotify.py +++ b/searx/engines/spotify.py @@ -46,7 +46,7 @@ def response(resp): if result['type'] == 'track': title = result['name'] url = result['external_urls']['spotify'] - content = '{} - {} - {}'.format( + content = u'{} - {} - {}'.format( result['artists'][0]['name'], result['album']['name'], result['name'])