mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-10 06:34:24 +08:00
Use requests library to resolve SSL errors. (#1450)
This commit is contained in:
parent
5e5867528d
commit
f63205f86c
@ -893,7 +893,7 @@ class UnifiedManager:
|
|||||||
|
|
||||||
archive_name = f"CNR_temp_{str(uuid.uuid4())}.zip" # should be unpredictable name - security precaution
|
archive_name = f"CNR_temp_{str(uuid.uuid4())}.zip" # should be unpredictable name - security precaution
|
||||||
download_path = os.path.join(get_default_custom_nodes_path(), archive_name)
|
download_path = os.path.join(get_default_custom_nodes_path(), archive_name)
|
||||||
manager_downloader.download_url(node_info.download_url, get_default_custom_nodes_path(), archive_name)
|
manager_downloader.basic_download_url(node_info.download_url, get_default_custom_nodes_path(), archive_name)
|
||||||
|
|
||||||
# 2. extract files into <node_id>
|
# 2. extract files into <node_id>
|
||||||
install_path = self.active_nodes[node_id][1]
|
install_path = self.active_nodes[node_id][1]
|
||||||
|
|||||||
@ -16,7 +16,11 @@ if aria2 is not None:
|
|||||||
aria2 = aria2p.API(aria2p.Client(host=host, port=port, secret=secret))
|
aria2 = aria2p.API(aria2p.Client(host=host, port=port, secret=secret))
|
||||||
|
|
||||||
|
|
||||||
def basic_download_url(url, dest_folder, filename):
|
def basic_download_url(url, dest_folder: str, filename: str):
|
||||||
|
'''
|
||||||
|
Download file from url to dest_folder with filename
|
||||||
|
using requests library.
|
||||||
|
'''
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
# Ensure the destination folder exists
|
# Ensure the destination folder exists
|
||||||
@ -111,4 +115,4 @@ def download_url_with_agent(url, save_path):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
print("Installation was successful.")
|
print("Installation was successful.")
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user