自定义cookie,需要在ClientSession(cookies=自定义cookie字典),不是在session.get()中
示例:
cookies = {'xxx': 0}
async with aiohttp.ClientSession(headers=headers, cookies=cookies) as session:
result_text = None
try:
result = await session.post(url, timeout=timeout, data=data)
result_text = await result.text()
except Exception as e:
raise (e)
return result