add mkdir

This commit is contained in:
2022-11-12 19:20:54 +02:00
parent c14dbeccda
commit 4e8ecce090

View File

@@ -15,10 +15,11 @@ def get_all_urls_packages():
def download_npm_package(url:str, path="./"):
try:
mkdir(path)
except:
pass
with open(path + url.split("/")[-1], "wb") as npm_package_file:
npm_package_file.write(requests.get(url))
except:
raise "Path not exist!\nPlease create the path: " + path
def download_all_package():