async def imgDownload(img_one,name):
async with aiohttp.ClientSession() as fe:
async with aiohttp.request('GET',img_one) as resp:
print(type(resp.content))
通过异步爬取图片,url是图片地址,但无法写入文件,本来应该是bytes类型,但是出现了这个数据类型,请问该类型怎么写入文件
应该是content.read()得到的才是bytes
详细可以看官网 https://docs.aiohttp.org/en/stable/streams.html