This commit is contained in:
yumoqing 2025-10-11 13:19:07 +08:00
parent 30636b77ad
commit e7c6057dc4

View File

@ -189,10 +189,13 @@ async def downloadfile(url, headers=None, params=None, data={}, method='GET'):
try:
async with aiofiles.open(fpath,'wb') as f:
shc = StreamHttpClient()
"""
async for chunk in shc(method, url,
headers=headers,
params=params,
data=data):
"""
async for chunk in shc(method, url):
await f.write(chunk)
return fpath
except Exception as e: