mirror of
https://github.com/searxng/searxng.git
synced 2024-08-24 23:13:33 +02:00
Fix error if the user hasn't set api credentials
This commit is contained in:
parent
ae3eeedb14
commit
275b37cc7c
@ -39,7 +39,7 @@ def request(query, params):
|
|||||||
'https://accounts.spotify.com/api/token',
|
'https://accounts.spotify.com/api/token',
|
||||||
data={'grant_type': 'client_credentials'},
|
data={'grant_type': 'client_credentials'},
|
||||||
headers={'Authorization': 'Basic ' + str(base64.b64encode(
|
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')}
|
), 'utf-8')}
|
||||||
)
|
)
|
||||||
j = loads(r.text)
|
j = loads(r.text)
|
||||||
|
Loading…
Reference in New Issue
Block a user