TermPY/packages/test.py

25 lines
490 B
Python
Raw Normal View History

2023-08-27 05:04:50 +00:00
#["test", "packages.test", ["netget"]]
2023-08-27 05:03:25 +00:00
# Made By OusmeBlueNinja
import os, sys
def netget(command: list):
print(command, len(command))
if len(command) != 2:
print("comand requires [ url ] [ path ]")
return
url = command[0]
location = command[1]
try:
import wget
wget.download(url, location)
except ImportError:
os.system(f"wget {url} -O {location}")
except:
print("cannot download")