From aba37f05ee902f364b1075b9973d7361b5184d5e Mon Sep 17 00:00:00 2001 From: Idan Cohen Date: Sat, 12 Nov 2022 13:29:52 +0200 Subject: [PATCH] add path to download_npm_package function --- npm_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm_install.py b/npm_install.py index 09f08be..891dac0 100644 --- a/npm_install.py +++ b/npm_install.py @@ -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))