1
0
Fork 0
mirror of synced 2024-05-05 13:12:34 +12:00

Update clientsession line

This commit is contained in:
phxntxm 2018-07-14 23:09:51 -05:00
parent d88a34f1a5
commit fbb5873884

View file

@ -26,7 +26,7 @@ class Spotify:
url = "https://accounts.spotify.com/api/token"
opts = {"grant_type": "client_credentials"}
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)
data = await response.json()
self._token = data.get("access_token")