diff --git a/qwarc/aiohttp.py b/qwarc/aiohttp.py index 540376d..e8199ec 100644 --- a/qwarc/aiohttp.py +++ b/qwarc/aiohttp.py @@ -147,6 +147,8 @@ class ClientResponse(aiohttp.client_reqrep.ClientResponse): if payload.exc: raise Exception from payload.exc + if nbytes is not None: + return payload.data.getvalue()[:nbytes] return payload.data.getvalue() async def read(self, nbytes = None):