add mkdir
This commit is contained in:
@@ -15,10 +15,11 @@ def get_all_urls_packages():
|
|||||||
|
|
||||||
def download_npm_package(url:str, path="./"):
|
def download_npm_package(url:str, path="./"):
|
||||||
try:
|
try:
|
||||||
with open(path + url.split("/")[-1], "wb") as npm_package_file:
|
mkdir(path)
|
||||||
npm_package_file.write(requests.get(url))
|
|
||||||
except:
|
except:
|
||||||
raise "Path not exist!\nPlease create the path: " + path
|
pass
|
||||||
|
with open(path + url.split("/")[-1], "wb") as npm_package_file:
|
||||||
|
npm_package_file.write(requests.get(url))
|
||||||
|
|
||||||
|
|
||||||
def download_all_package():
|
def download_all_package():
|
||||||
|
|||||||
Reference in New Issue
Block a user