Remove Comment

This commit is contained in:
Whispering Wind
2025-01-10 13:08:19 +03:30
committed by GitHub
parent c2bd6810b7
commit 43dd8a4cdb

View File

@ -33,10 +33,9 @@ def remove_file(file_path):
def download_file(url, destination, chunk_size=8192):
try:
# Ensure the destination directory exists
destination_dir = os.path.dirname(destination)
if destination_dir and not os.path.exists(destination_dir):
os.makedirs(destination_dir) # Create the directory if it doesn't exist
os.makedirs(destination_dir)
response = requests.get(url, stream=True)
response.raise_for_status()