async def get_token():
async with aiohttp.ClientSession() as session:
async with session.post(site, data=payload, headers=headers, ssl=sslcontext) as resp:
text = await resp.text()
return text
async def get_data(number):
access_token = await get_token()
async with aiohttp.ClientSession() as session:
async with session.get(site2, params=payload1, headers=headers1, ssl=sslcontext) as resp:
text = await resp.text()
print('{:.70}...{}'.format(text, number))
return number, text