Update clientsession line
This commit is contained in:
parent
d88a34f1a5
commit
fbb5873884
|
@ -26,7 +26,7 @@ class Spotify:
|
||||||
url = "https://accounts.spotify.com/api/token"
|
url = "https://accounts.spotify.com/api/token"
|
||||||
opts = {"grant_type": "client_credentials"}
|
opts = {"grant_type": "client_credentials"}
|
||||||
while True:
|
while True:
|
||||||
with aiohttp.ClientSession(headers=self.headers) as session:
|
async with aiohttp.ClientSession(headers=self.headers) as session:
|
||||||
response = await session.post(url, data=opts)
|
response = await session.post(url, data=opts)
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
self._token = data.get("access_token")
|
self._token = data.get("access_token")
|
||||||
|
|
Loading…
Reference in a new issue