bugfix
This commit is contained in:
parent
30636b77ad
commit
e7c6057dc4
@ -189,10 +189,13 @@ async def downloadfile(url, headers=None, params=None, data={}, method='GET'):
|
|||||||
try:
|
try:
|
||||||
async with aiofiles.open(fpath,'wb') as f:
|
async with aiofiles.open(fpath,'wb') as f:
|
||||||
shc = StreamHttpClient()
|
shc = StreamHttpClient()
|
||||||
|
"""
|
||||||
async for chunk in shc(method, url,
|
async for chunk in shc(method, url,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
params=params,
|
params=params,
|
||||||
data=data):
|
data=data):
|
||||||
|
"""
|
||||||
|
async for chunk in shc(method, url):
|
||||||
await f.write(chunk)
|
await f.write(chunk)
|
||||||
return fpath
|
return fpath
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user