Skip to content

Commit

Permalink
update v0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ihmily committed May 13, 2024
1 parent 7be3f21 commit bbdb325
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions quark.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,13 @@ async def quark_file_download(self, fids: List[str], folder: str = '') -> None:
timeout = httpx.Timeout(60.0, connect=60.0)
response = await client.post(download_api, json=data, headers=self.headers, params=params, timeout=timeout)
json_data = response.json()
data_list = json_data['data']
if json_data['status'] == 200 and data_list:
custom_print('文件下载地址列表获取成功')
else:
custom_print('文件下载地址列表获取失败')
data_list = json_data.get('data', None)
if json_data['status'] != 200:
custom_print(f"文件下载地址列表获取失败, {json_data['message']}")
return
elif data_list:
custom_print('文件下载地址列表获取成功')

save_folder = f'downloads/{folder}' if folder else 'downloads'
os.makedirs(save_folder, exist_ok=True)
n = 0
Expand Down

0 comments on commit bbdb325

Please sign in to comment.