add path to download_npm_package function
This commit is contained in:
@@ -14,8 +14,8 @@ def get_all_urls_packages():
|
|||||||
return list(dict.fromkeys(findall("https://.+.tgz", content)))
|
return list(dict.fromkeys(findall("https://.+.tgz", content)))
|
||||||
|
|
||||||
|
|
||||||
def download_npm_package(url:str):
|
def download_npm_package(url:str, path="./"):
|
||||||
with open(url.split("/")[-1], "wb") as npm_package_file:
|
with open(path + url.split("/")[-1], "wb") as npm_package_file:
|
||||||
npm_package_file.write(requests.get(url))
|
npm_package_file.write(requests.get(url))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user