I am using the following to get an image, but it's not properly downloaded and only a small top portion of image is seen. The file size is less than 256 kB. What's wrong and how could I fix it?
async with aiohttp.ClientSession() as session:
async with session.get(url, timeout = 20) as response:
if response.status == 200:
image = await response.content.read(262144) # 256 kiB
else:
print("Check your URL!")
return