Update main22.py
Browse files
main22.py
CHANGED
|
@@ -247,15 +247,13 @@ def download_file(item):
|
|
| 247 |
file_name = urlparse(download_url).path.split("/")[-1]
|
| 248 |
# 开始下载
|
| 249 |
if '.' not in file_name:
|
| 250 |
-
print("civitai")
|
| 251 |
if len(cookie)>0:
|
| 252 |
cmd = ['aria2c', '--header', f'Cookie:{cookie}', '--console-log-level=error', '-c', '-x', '16', '-s', '16', '-k', '1M', download_url, '-d', lora_dir]
|
| 253 |
else:
|
| 254 |
-
cmd =
|
| 255 |
-
result = subprocess.run(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
|
| 256 |
else:
|
| 257 |
-
cmd =
|
| 258 |
-
|
| 259 |
if result.returncode == 0:
|
| 260 |
# 判断是civitai还是hugging face还是自定义
|
| 261 |
# civitai
|
|
|
|
| 247 |
file_name = urlparse(download_url).path.split("/")[-1]
|
| 248 |
# 开始下载
|
| 249 |
if '.' not in file_name:
|
|
|
|
| 250 |
if len(cookie)>0:
|
| 251 |
cmd = ['aria2c', '--header', f'Cookie:{cookie}', '--console-log-level=error', '-c', '-x', '16', '-s', '16', '-k', '1M', download_url, '-d', lora_dir]
|
| 252 |
else:
|
| 253 |
+
cmd = ['aria2c', '--console-log-level=error', '-c', '-x', '16', '-s', '16', '-k', '1M', download_url, '-d', lora_dir]
|
|
|
|
| 254 |
else:
|
| 255 |
+
cmd = ['aria2c', '--console-log-level=error', '-c', '-x', '16', '-s', '16', '-k', '1M', download_url, '-d', lora_dir ,"-o",file_name]
|
| 256 |
+
result = subprocess.run(cmd ,stderr=subprocess. PIPE, stdout=subprocess.PIPE)
|
| 257 |
if result.returncode == 0:
|
| 258 |
# 判断是civitai还是hugging face还是自定义
|
| 259 |
# civitai
|