add path to download_npm_package function

This commit is contained in:
2022-11-12 13:29:52 +02:00
parent 05fa927fd3
commit aba37f05ee

View File

@@ -14,8 +14,8 @@ def get_all_urls_packages():
return list(dict.fromkeys(findall("https://.+.tgz", content)))
def download_npm_package(url:str):
with open(url.split("/")[-1], "wb") as npm_package_file:
def download_npm_package(url:str, path="./"):
with open(path + url.split("/")[-1], "wb") as npm_package_file:
npm_package_file.write(requests.get(url))