I got this function:
async def download(url):
async with aiohttp.ClientSession() as session:
async with session.get(url) as resp:
if resp.status == 200:
return resp
To get the data, I'd need to write:
text = await (await utils.download(url)).text()
How to change download
so I can write like this
text = await utils.download(url).text()
without getting AttributeError: 'coroutine' object has no attribute 'text'
?