Browse Source

Fix error if the user hasn't set api credentials

0xhtml 5 years ago
parent
commit
275b37cc7c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/engines/spotify.py

+ 1 - 1
searx/engines/spotify.py

@@ -39,7 +39,7 @@ def request(query, params):
         'https://accounts.spotify.com/api/token',
         data={'grant_type': 'client_credentials'},
         headers={'Authorization': 'Basic ' + str(base64.b64encode(
-            (api_client_id + ":" + api_client_secret).encode('utf-8')
+            "{}:{}".format(api_client_id, api_client_secret).encode('utf-8')
         ), 'utf-8')}
     )
     j = loads(r.text)