new: Download file

pull/464/head
Arhamyss 2022-07-19 10:07:36 -04:00
parent efa224f54b
commit 47ecc7a4fa
1 changed files with 8 additions and 0 deletions

View File

@ -183,6 +183,14 @@ class AsyncCapture(AbstractManager):
with (dirpath / 'parent').open('w') as _parent:
_parent.write(parent)
if 'downloaded_file_name' in entries:
with(dirpath / '0.data.file_name').open('w') as _downloaded_file_name:
_downloaded_file_name.write(entries['downloaded_file_name'])
if 'downloaded_file' in entries:
with(dirpath / '0.data').open('wb') as _downloaded_file:
_downloaded_file.write(entries['downloaded_file'].getvalue())
if 'error' in entries:
with (dirpath / 'error.txt').open('w') as _error:
json.dump(entries['error'], _error)