Update requests.py

This commit is contained in:
恍兮惚兮 2024-03-05 00:19:36 +08:00
parent d2019e0407
commit 4221f28070

View File

@ -26,13 +26,14 @@ class Response(ResponseBase):
if chunk_size:
downloadeddata+=buff[:downloadedSize.value]
if len(downloadeddata)>chunk_size:
while len(downloadeddata)>chunk_size:
yield downloadeddata[:chunk_size]
downloadeddata=downloadeddata[chunk_size:]
else:
yield buff[:downloadedSize.value]
if len(downloadeddata):
yield downloadeddata
while len(downloadeddata):
yield downloadeddata[:chunk_size]
downloadeddata=downloadeddata[chunk_size:]
def raise_for_status(self):
error=GetLastError()